Changing the Language does not work with Internet Explorer

2010-10-15 Thread Thomas Neumeier

Hi,

I've got a django site which uses the built in view to change the users 
language:

urls.py: (r'^i18n/', include('django.conf.urls.i18n')),
template:


{% csrf_token %}

{% for lang in LANGUAGES %}
{% ifequal lang.0 "de" %}
	src="{{STATIC_IMAGES_URL}}de.jpg" name="language" value="{{ lang.0 }}" />

{% else %}
src="{{STATIC_IMAGES_URL}}en.jpg" name="language" value="{{ lang.0 }}" />

{% endifequal %}
{% endfor %}



This works with Chrome, Firefox and Safari, but not with Internet 
Explorer (tested version 6, 8 and 9). Every time I hit the link, it just 
does not change the language.

It seems that IE does not set the cookie.
To check this, I tried to login in into the admin. This works, but there 
seems not to be set a cookie either (I cant find one in the folder).
How is the session_id set with setlang and admin and why does it work in 
the admin, but not in setlang?


Hoping for help
Thomas

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



Change Default Permissions

2010-05-16 Thread Thomas Neumeier

Hi,

i've got an app with one model. this model is filled with some data from
a fixture.
now i want to remove the add and delete permission for all present and
future users for this specific model. the change perm should stay.
how can i do this?

Thanks

PS: using django 1.1.1

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



Admin pre-save hooks

2010-05-05 Thread Thomas Neumeier

Hi,

I've got two apps, called A and B.
A has a model called X and B has model called Y.
B hooks into the X's save-Method via the pre_save-Signal and throws an 
IntegrityError under dertain conditions.
Everything like in: 
http://docs.djangoproject.com/en/dev/ref/signals/#ref-signals

This works perfectly.
Now I want the Admin to react on this IntegrityError.
This is no problem for Y, because i can override the AdminForm and throw 
a ValidationError in the clean_field method.


But how can i make the admin of A react on the IntegrityError without 
touching As admin.py?


Thanks
Thomas

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



manage.py runserver --adminmedia

2010-04-28 Thread Thomas Neumeier
Hi,
im trying to setup django grappelli.
i'm using django 1.1.1, and grappelli 3
the setup works fine, as long as I specify the --adminmedia flag.
but when i run the manage.py test command i get exactly the same tests
failing as if i would run the test command on a clean django install.
i thougt, it might help to specify the value of the --adminmedia flag
in settings.py or similar. but i could not find a solution, how to do
this.
well this somekind related to grappelli, but i think the main reason
is the --adminmedi flag, so im posting this here.
does anybody know how to solve this issue?
Thanks
Thomas

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



manage.py runserver --adminmedia

2010-04-28 Thread Thomas Neumeier

Hi,

I'm trying to install django-grappelli.
the admin media is perfectly found, if I run the development server: 
"python manage.py runserver --adminmedia=/path/to/grappelli/media".
i would like to make a change to settings.py so i can leave out the 
--adminmedia flag, when calling manage.py runserver.

how can i do this?

Thanks in advance
Thoms

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