Re: new session ID is created for every request from IE 7

2009-08-19 Thread Kelvan
I have a similar problem with FF and Etch (with Django 1.0 and 1.1 tested). Works when running on my notebook (Ubuntu 9.10a4 with Django 1.1). I'm using Apache/mod_python. On 13 Aug., 23:07, humble wrote: > Hi Malcolm > > Thanks for your suggestion. I did to try using a FQDN to configure IE > fo

Re: new session ID is created for every request from IE 7

2009-08-19 Thread Kelvan
Tested without apache on the server, seems to work. I think my problem has another reason. On Aug 19, 1:05 pm, Kelvan wrote: > I have a similar problem with FF and Etch (with Django 1.0 and 1.1 > tested). > Works when running on my notebook (Ubuntu 9.10a4 with Django 1.1). > I&#x

Re: new session ID is created for every request from IE 7

2009-08-19 Thread Kelvan
Setting SESSION_ENGINE to 'django.contrib.sessions.backends.cached_db' in Django 1.1 solved my problem. Sorry for my "spam". On Aug 19, 2:03 pm, Kelvan wrote: > Tested without apache on the server, seems to work. > I think my problem has another reason. > > O

Django1.1 logs me out after few seconds inactivity

2009-08-20 Thread Kelvan
I've a big problem with user authentification, my application get an username and a hashkey to verify if the user is logged in. I wrote a function that check this, it worked fine to log in the user with: user.backend = 'django.contrib.auth.backends.ModelBackend' login( request, user ) Login work

Redirect loop

2009-08-24 Thread Kelvan
Hey folks, I've a strange problem at the moment with auth and login decorator. If a user is logged in index page have to redirect to portal, if the user is not logged in portal have to redirect to login-screen/index. Seems to be not a big problem, I thought, but my following code creates a loop.

Re: Reduce number of calls to database

2015-06-05 Thread kelvan
On Fri Jun 5 08:32:52 2015 GMT+0100, Cherie Pun wrote: > > Thanks! Would this still give 404 errors when a certain object does not > exist? Nope, but if you really need to ensure all ids exist in the database, compare the length of your level_ids with levels.count() Make sure there are no dupli

verbose_name/i18n sometimes doesn't work in one app

2009-09-23 Thread kelvan . mailinglist
Hi, I've a project with 2 apps, I'm using the meta class for defining verbose_name(_plural), register in admin.py. For The first app it works good, in the second django shows often the (buggy) generic name, for example: "Lv a_types"(the space is on the wrong place I think) and "possibilitys"

Invalid block tag: 'reverse'

2009-12-03 Thread kelvan . mailinglist
Hi, Due the fact that the url tag fails accepting variable I installed the reversetag from http://github.com/ulope/django-reversetag Putting it in INSTALLED_APPS works (django seems to found it) But django means that reverse is a invalid blocktag: http://pastebin.com/m28915e56 Is there a trick

Re: Invalid block tag: 'reverse'

2009-12-03 Thread kelvan . mailinglist
2009/12/3 Daniel Roseman On Dec 3, 2:14 pm, kelvan.mailingl...@gmail.com wrote: > Hi, > > Due the fact that the url tag fails accepting variable I installed the reversetag fromhttp://github.com/ulope/django-reversetag > Putting it in INSTALLED_APPS works (django seems to f

Get name from request.path

2009-12-25 Thread kelvan . mailinglist
Hi, I'm trying to get the url name of the request.path, resolve only shows if the url exists. Is there a function that returns the name of the urlpath? happy holidays, florian signature.asc Description: OpenPGP digital signature

Re: Get name from request.path

2009-12-25 Thread kelvan . mailinglist
request.META['HTTP_HOST'] just return the webadress from the server, I need the name I gave an url un urls.py. Like reverse just the other way florian 2009/12/25 Shawn Milochik Try this: request.META['HTTP_HOST'] If not, check the docs for the request object: http://docs

Re: Get name from request.path

2009-12-28 Thread kelvan . mailinglist
I've the site_name with link to the required permission in the db to show only menu entries the user is allowed to see. It's ugly but I couldn't find a nicer way. The menus can have a parent if it's a submenu, so I need to know the actual mainmenu to load the submenus. If you know a nice way to

Re: Any way to make get_or_create() to create an object without saving it to database?

2010-02-03 Thread kelvan . mailinglist
I have a similar problem. In my database is a result class. You need an exam, a user and the points to create a result and points are without null-values. Now I want to use Result.objects.get_or_create(exam=e,user=u) to get the result if there already is one or create a new one. This won't work

Re: Any way to make get_or_create() to create an object without saving it to database?

2010-02-05 Thread kelvan . mailinglist
Oh, nice. thx 2010/2/4 Tom Evans On Wed, Feb 3, 2010 at 9:44 PM,   wrote: > I have a similar problem. In my database is a result class. > You need an exam, a user and the points to create a result and points are > without null-values. > N