Re: authentication in django

2011-08-28 Thread Kejun He
request.user.is_authenticated() ??? and the do a HttpResponseRedirect to the url you like. https://docs.djangoproject.com/en/1.3/ref/request-response/#django.http.HttpRequest.user https://docs.djangoproject.com/en/1.3/ref/request-response/#django.http.HttpResponseRedirect On Mon, Aug 29, 2011

Re: Django Development environment

2011-08-28 Thread Sam Walters
Ok :) Thankyou. Yes ill try something like that when i have the time later this year! On Sun, Aug 28, 2011 at 7:31 PM, Simon Connah wrote: > > On 28 Aug 2011, at 04:41, Sam Walters wrote: > >> Debug client-side: >> firebug, yslow, a windows computer with ie7 > >

Re: Django Development environment

2011-08-28 Thread Seth
On Aug 22, 3:07 pm, Stephen Jackson wrote: > I am new to the world of Django. I would like to hear from other django > developers describe their dev environment (tools, os, editors, etc.). OS: Mac OS X (Snow Leopard) Editor: TextMate with ProjectPlus plugin,

Re: authentication in django

2011-08-28 Thread Jian Chang
decorator? 2011/8/27 NISA BALAKRISHNAN > Hi, > > I am new to django. > i am making a django app for a logged in user to add movies he > watched. > > how can i block a logged in user from accessing the log in form ? > the url .../accounts/login > > -- > You received

Re: Django Development environment

2011-08-28 Thread kenneth gonsalves
On Fri, 2011-08-26 at 23:44 -0400, Steven Elliott Jr wrote: > > On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote: > >> Mercurial or Git (depends on whether the project is open source or > not) > > Kenneth, > > I think he means whether or not the repository will be public or > private.

Re: How to use email as user login name

2011-08-28 Thread Shawn Milochik
On 08/28/2011 03:26 PM, quasar wrote: Question is how to use email as user login name, and make user name not unique? What's the best way to do that? To use e-mail as login, write your own backend (about four lines of code). You'll be using the 'email' field, not username, because username

Re: why is settings.py executed twice?

2011-08-28 Thread Mike Dewhirst
Best answer is here ... http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html M On 28/08/2011 11:02am, Gelonida N wrote: Hi, This is also one of the things (I just started using django, so I have still quite many questions) , that I don't really understand. It doesn't

Re: template list empty in with django test client

2011-08-28 Thread Juan Pablo Romero Méndez
My fault. I was testing from the console. Within an actual test the request does have the templates. Juan Pablo El día 28 de agosto de 2011 17:50, Juan Pablo Romero Méndez escribió: > Hello, > > I'm using the django test client, like this: > c = Client() r

Re: why is settings.py executed twice?

2011-08-28 Thread Russell Keith-Magee
On Sun, Aug 28, 2011 at 9:02 AM, Gelonida N wrote: > Hi, > > This is also one of the things (I just started using django, so I have > still quite many questions) , that I don't really understand. ... > So it seems settings.py is executed twice. Yes, it is; an exceptionally

template list empty in with django test client

2011-08-28 Thread Juan Pablo Romero Méndez
Hello, I'm using the django test client, like this: >>> c = Client() >>> r = c.get("/content/new/") >>> r.status_code 200 >>> r.templates [] Is this normal? Regards, Juan Pablo -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

How to use email as user login name

2011-08-28 Thread quasar
Question is how to use email as user login name, and make user name not unique? What's the best way to do that? -- 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

Re: Error was: No module named io

2011-08-28 Thread Goran
maybe it is path problem, try to use: from projectname.base.view import io not base.view import io in INSTALLED_APPS use: 'projectname.base', not just 'base', hope it helps, Goran On Aug 28, 2:59 am, CrabbyPete wrote: > I developed my code with python 2.6 and django 1.3.

Delete after specific date

2011-08-28 Thread Goran
I have model with DateTimeField where I store date when object will be deleted. class Something(models.Model): ... end_date = models.DateTimeField(editable=False, blank=True, null=True) after some request my app store future date in that field using: something.end_date =

Re: Where's the code picking apart the info about selected filters in the admin change_list stored in the current session?

2011-08-28 Thread Thomas Weholt
Is this just spam/phising or what? Thomas On Sun, Aug 28, 2011 at 6:44 PM, wrote: > I am out of office right now and will get back to you when I return. If you > don't hear from me, my assistant should contact you shortly. Check out this > massage chair that I

Where's the code picking apart the info about selected filters in the admin change_list stored in the current session?

2011-08-28 Thread Thomas Weholt
Where's the code picking apart the info about selected filters stored in the current session? I see from the source that setting filters in the admin change_list are stored in the session, but I cannot find the code picking the session data apart and building a queryset. Do you have any tips? I

Re: Python Shell

2011-08-28 Thread j0ker
The second problem seems to be caused by a not set environment variable that Django needs. You could do that manually, but the recommended way is to use the shell provided by Django. Just use 'python manage.py shell' instead of IDLE. The missing Variables will be set. That should do the trick. On

Python Shell

2011-08-28 Thread Kheyreddine Hadri
when I use Python shell to work with Django I allways get an error when I use "def" or "for" or "while" : File "", line 2 pass ^ IndentationError: expected an indented block and when I create a template on the IDLE I get this message: Traceback (most recent call last): File

Model.save() does nothing

2011-08-28 Thread j0ker
I'm playing around with Django at the moment and have a strange problem. There is a view function which basicly does nothing else than toggle a boolean value in a model field - or at least should do so. The field definition: class Character(models.Model): ... ready =

Re: Error was: No module named io

2011-08-28 Thread CrabbyPete
Thanks, but that's not the problem. Here is the traceback Traceback: File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ django/core/handlers/base.py" in get_response 101. request.path_info) File

Re: Your Webinar Invitation: Join us for "Django site with 40mil+ rows of data"

2011-08-28 Thread Cal Leeming [Simplicity Media Ltd]
Thanks for 'Derek / gamesbook' for indicating that this webcast software isn't compatible with Linux. I've therefore created a relay of the meeting using WebEx (seems to be same quality/delay) For those with a Linux system, you can use the following details to join the webcast: Host Key: 426916

Re: Django Development environment

2011-08-28 Thread Simon Connah
On 28 Aug 2011, at 04:41, Sam Walters wrote: > Debug client-side: > firebug, yslow, a windows computer with ie7 Rather than using a separate computer with IE 7 I tend to just spin up an Amazon EC2 instance running Windows Server 2003 or Windows Server 2008 for a couple of hours. It makes