Sunday, January 1, 2012

Re: django-admin.py startproject will NOT work.

On Jan 1, 4:44 am, Bart Nagel <b...@tremby.net> wrote:
> At 2012-01-01 01:12:27 -0800, Chris Kavanagh wrote:
>
> > On Dec 31 2011, 7:13 pm, Bart Nagel <b...@tremby.net> wrote:
> > > When I run that I get
> > > 3 arguments: ['args.py', 'startproject', 'mysite']
>
> > > Paste your own output.
>
> > I get the same as you:
>
> > C:\Python27\Scripts>python args.py startproject mysite
> > 3 arguements: ['args.py', 'startproject', 'mysite']
>
> What's with the spelling error?

LOL, well apparently I don't know how to spell 'argument'.

However, I still got the same output as you (except for correct
spelling).

What exactly were we (you) looking for in this test??

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Creating clean URLS

I had that occur at one point last night ... can't remember the circumstance, but perhaps you are using a form?

On Sun, Jan 1, 2012 at 2:24 PM, Jonas Geiregat <jonas@geiregat.org> wrote:


> I want my url to be free from parameters being passed.
>
> I have handled the request in "twitter_after_auth" function of view
> and
>
> I am redirecting user to the new url "http://localhost/create_cr/"
>
> but instead the url shows some additional parameters that I have
> already handled.

> something like below:-
>
> "http://localhost/create_cr/?
> oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE"
>
> I just want my url to be of something like below:-
>
> "http://localhost/create_cr/"
>

It would be interesting to see some part of the view code for further inspection of the problem.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
AsymptopiaSoftware|Software@theLimit
          http://www.asymptopia.org

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Skip upload of existing S3 Object

Hi,

the form sends the picture to S3 and then S3 calls you on an URL which you specify with " success_action_redirect". This should point to an URL on your server where you then store the key/hash which will be provided in the URL.

Your code uses POST data but S3 will put the metadata in the URL (=GET) (bucket, key and etag)

So just make sure that your forms posts to S3 and you define the success_action_redirect URL.

I think you actually don't need the S3StorageBackend since you are not storing anything or at least it does not actually pass your server.

hope that helps!

Cheers
Ivo


On Jan 1, 2012, at 12:25 , Chris Hasenpflug wrote:

I have a model with an ImageField and am using django-storages
S3BotoStorage backend. To reduce load on the server, I'm using
Amazon's S3 Browser Upload functionality[1] to send images directly to
S3. In order to create the model, my plan is have another view take
the uploaded key and save a model instance of my image.  Currently my
view code looks something like this:

def add_existing_image(request):
   ...
   image_key = request.POST.get('image_key', None)
   im = default_storage.open(image_key)
   i = Image(image=im, owner=user)

However, this seems to re-save the image on S3. I was hoping that
since I'm not directly reading the file it would not need to do so
behind the scenes, but it is. Since the goal is to not incur that
overhead, how should I go about creating model instances of these
files that already exist in my storage?

[1] http://aws.amazon.com/articles/1434

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


Re: Creating clean URLS

> I want my url to be free from parameters being passed.
>
> I have handled the request in "twitter_after_auth" function of view
> and
>
> I am redirecting user to the new url "http://localhost/create_cr/"
>
> but instead the url shows some additional parameters that I have
> already handled.

> something like below:-
>
> "http://localhost/create_cr/?
> oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE"
>
> I just want my url to be of something like below:-
>
> "http://localhost/create_cr/"
>

It would be interesting to see some part of the view code for further inspection of the problem.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Creating clean URLS

I want my url to be free from parameters being passed.

I have handled the request in "twitter_after_auth" function of view
and

I am redirecting user to the new url "http://localhost/create_cr/"

but instead the url shows some additional parameters that I have
already handled.

something like below:-

"http://localhost/create_cr/?
oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE
"

I just want my url to be of something like below:-

"http://localhost/create_cr/"

please help..

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: USStateField default value

Changing 'default' to 'initial' gives me an unexpected argument
'blank' error. If I remove the blank=True attribute, there is no
error,
but the select box is absent from the form!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Expand FlatPage admin interface.

https://docs.djangoproject.com/en/1.3/releases/1.0-porting-guide/#the-admin

On Sun, Jan 1, 2012 at 9:59 PM, Elad Zucker <elad.zucker@gmail.com> wrote:
I am learning Django using the book "Practical Django Project". This isn't such an old book but seems to be very out-dated in terms of django. it Uses the old admin interface which I assume was replaced in version 1.0.
 
To make a long story short, one of the example of the book is to add a keyword items to a flatpage model. this is done by doing somthing like that :
page = models.ForeignKey(FlatPage, edit_inline=models.STACKED,....)
 
Now, I am trying to do the same using the new admin interface but with no luck. I can use admin.StackedInline but how do I associate it with the flatpage model ?
 
Hope I am clear here.
 
Thanks,
Elad

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.