Re: I18N and caching: page don't change language until I press F5 in browser

2011-11-05 Thread Salvatore Iovene
On Sat, Nov 5, 2011 at 7:43 AM, Torsten Bronger wrote: > Sending e.g. "Expires: ..." so that the page expires immediately > solved the problem. Sending an Expires header so that the page expires immediately does work, but it feels like fixing a headache with a guillotine. The browser should cache

Re: Site Administration Page

2011-11-05 Thread Nora Youssef
No it's (http://127.0.0.1:8000/admin/) On Nov 4, 11:49 pm, Jesramz wrote: > Is your url pointing to (http://127.0.0.1:8080/admin/)  ? -- 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@googlegroup

Using the same storage backend for media and static files.

2011-11-05 Thread Ian Lewis
Hi, I'm a developer for django-storages who maintains the AWS S3 boto backend. I get a lot of requests and questions about how to use s3boto as a backend for both media and for the staticfiles contrib app but with different settings. The issue is that the storage backends are created without any

Django-HttpRedirect fails in Internet explorer

2011-11-05 Thread phoenix27
Hi all, I have a Facebook application using Django. In one of my views I use following piece of code to make user logged-in. In IE, return HttpResponseRedirect line fails with error message "This content cannot be displayed in a frame...", although other browsers are working fine. Do you have an

Re: I18N and caching: page don't change language until I press F5 in browser

2011-11-05 Thread Torsten Bronger
Hallöchen! Salvatore Iovene writes: > On Sat, Nov 5, 2011 at 7:43 AM, Torsten Bronger > wrote: > >> Sending e.g. "Expires: ..." so that the page expires immediately >> solved the problem. > > Sending an Expires header so that the page expires immediately > does work, but it feels like fixing a h

Re: Using the same storage backend for media and static files.

2011-11-05 Thread JHeasly
Hi Ian — You might get better traction with your question over on the django-developerslist. And thanks for your django-storages work! — John -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Using the same storage backend for media and static files.

2011-11-05 Thread Kurtis Mullins
Hey Ian, I actually talked with Rich Leland about this. He gave me a pretty informative reply. Basically, he mentioned that he subclassed S3BotoStorage and just specified another bucket on init. I'm not sure on any specific implementation details there. He said "It's not pretty, but it works". T

Re: Relation not found error while dealing with foreign keys and forms

2011-11-05 Thread Furbee
As a workaround to this bug, you could get the group separately, and attach all of the group fields to the staff form manually until a fix is implemented. Something like (hasn't been tested, you may need to assign each NICSGroupType field to a form field): staff = Staff.objects.using('gold').get(u

django backlog

2011-11-05 Thread idle
Hello. How can I found value of django socket backlog, and change that value? Its return error: "connect() to unix:/home/webmaster/django_base/site/ server.sock failed (11: Resource temporarily unavailable)" under heavy load, the workaround is to increase backlog. -- You received this message

FAQ app 2011

2011-11-05 Thread Mike
I've been searching for a FAQ app for Django and found several but no commentary as to which is best and still maintained, etc. This group looks to have mentioned the subject last in 2006 and refers to this: http://simon.net.nz/articles/simple-faq-application-for-django/&usg=AFQjCNFwcCQGBUOKI_lMz

Re: [Django] #17167: ModelForm model=class not honoring reference fields with secondary database

2011-11-05 Thread Furbee
No, that is incorrect. The Foreign key does not cross database boundaries. The employee table is in the secondary database, and the department table is also in the secondary database. The foreign key from from the employee table to the department table, both in the same secondary database. Furbeen

Pyjamas in Django

2011-11-05 Thread Chandrakant Kumar
Hello all, Has anyone around here used Pyjamas(pyjs.org) with django. I went through the tutorial and it feels right, using a single language(python) for development. Is it production ready? I want to use it in my current project. -- You received this message because you are subscribed to th

Re: [Django] #17167: ModelForm model=class not honoring reference fields with secondary database

2011-11-05 Thread Karen Tracey
On Sat, Nov 5, 2011 at 1:33 PM, Furbee wrote: > No, that is incorrect. The Foreign key does not cross database boundaries. > The employee table is in the secondary database, and the department table > is also in the secondary database. The foreign key from from the employee > table to the departm

Re: Django login() fails when using custom Facebook backend

2011-11-05 Thread Simon Bächler
Hi Some browsers (IE and Safari 5.0) don't store a cookie from within an iframe. For IE you can fix this by using special response headers. Set this in a middleware: def process_response(self, request, response): """ p3p headers for allowing cookies in Internet Explorer. more inf

How do I define a default (override-able) primary key field on an abstract model?

2011-11-05 Thread g
How do I define a custom primary key field on Base that can be overridden by B without an error? class Base(Model): class Meta: abstract = True id = SomeAwesomeIDField(primary_key=True) other_common_field = AwesomeField() class A(Base): pass class

Re: How do I define a default (override-able) primary key field on an abstract model?

2011-11-05 Thread Kurtis Mullins
I don't think the problem is overriding the Primary Key. I could be wrong, but I think the actual problem here is that you can not use OneToOneFields, ManyToManyFields, or ForeignKeys as primary keys. I'm not sure how it would work on a database level. Like I said, I could be wrong -- but that's my

Re: How do I define a default (override-able) primary key field on an abstract model?

2011-11-05 Thread Furbee
I can't speak to the reference field being used as a primary key, but the initial error is that you have multiple primary keys on the single model B. If it 'is-a' class Base, it inherits id as a primary key, and also defines a and a primary key. You cannot have multiple primary key fieds, hence "ta

Re: How do I define a default (override-able) primary key field on an abstract model?

2011-11-05 Thread Kurtis Mullins
Good point, Furbee! "g", I was going to suggest just overriding that "id" field -- but I read the docs real quick and they say: "It is an error to have fields in the abstract base class with the same name as those in the child (and Django will raise an exception)." https://docs.djangoproject.com/

Re: Django class based views - not keen - anyone else??

2011-11-05 Thread Cal Leeming [Simplicity Media Ltd]
Thanks for the response Kurtis - yeah I probably should put some time aside to at least give them a try.. the 'mixin' stuff looks quite intriguing! Cal On Fri, Nov 4, 2011 at 11:33 PM, Kurtis Mullins wrote: > Hey Cal, > > Yeah the documentation is a bit lacking. It's kinda difficult to put the >

Disable debugging for all, but allow debug toolbar for one host

2011-11-05 Thread Gelonida N
Hi, If I understood well, then the Django debug toolbar is only working if debugging is enabled. What I wanted to do is is to disable the explicit django error messages for all but one specific IP address and to disable the django debug toolbar for this one address. -- You received this messag

Re: Django class based views - not keen - anyone else??

2011-11-05 Thread Flavia Missi
The real power of generic class based views is in the mixins, I've been using CBV for the last 2 months, and it attended me not only in ordinary situations. The docs aren't 100% yet, but the implementation is not hard to understand. IMHO, you really should give it a try. ;) []'s On Sat, Nov 5, 2

Re: How do I define a default (override-able) primary key field on an abstract model?

2011-11-05 Thread g
I do not guess I was clear with my problem, so I am going to try to state it more clearly. I know that I am defining two primary keys and this is the problem. Using a OneToOneField as a primary key is fine. However, I want to set up the base abstract model to *only* define the primary key (id = S

Re: Translation problem with percent sign

2011-11-05 Thread Martin Tiršel
On Fri, 04 Nov 2011 15:54:04 +0100, Martin J. Laubach wrote: Just remove the line with "python-format" from your translation since it isn't a format string after all. mjl Thanks, this is working. But after makemessages It comes again so I have to fix this line every time.