reqquest.user is not defined

2011-07-20 Thread bahare hoseini
hi there, i've installed *AuthenticationMiddleWare *& *SessionMidleWare *in MIDDLEWARE_CLASSES in setting.py, but wherever i use (request.user) my web page such as log_in page,is loaded as if it doesn't know request.user => there is no limit to access pages!! could you please tell me why? thanks,

Re: https / nginx / uwsgi / django problems with authentification

2011-07-20 Thread Roberto De Ioris
> Hi, > > I'm not sure whether I have to change my django configuration or my > nginx cofiguration. > (Thus posted to gmane.comp.python.django.user and to > gmane.comp.web.nginx.english) > > I have following setup: > > - nginx listening on https > - most static contents like .css .js images served

Is there a way to insert data from a csv file into my database?

2011-07-20 Thread Eiram
Greetings, I'm a newbie in databases, and I was wondering if there is possible to insert data from a csv file into one of the tables of my database. I heard that you can use a tool called pgloader, but I don't know how to use this tool or if it is possible to do this with django. Does anyone knows

Re: problem with BooleanField form

2011-07-20 Thread ed
I'm using the following javascript, so I can't check the HTML, can I? How would I go about debugging this? function bookmark_save() { var item = $(this).parent(); var data = { url: item.find("#id_url").val(), title: item.find("#id_title").val(),

https / nginx / uwsgi / django problems with authentification

2011-07-20 Thread Gelonida N
Hi, I'm not sure whether I have to change my django configuration or my nginx cofiguration. (Thus posted to gmane.comp.python.django.user and to gmane.comp.web.nginx.english) I have following setup: - nginx listening on https - most static contents like .css .js images served by nginx - everythi

Re: Receiving [Django] ERROR via email even if DEBUG = True

2011-07-20 Thread SmileyChris
It certainly sounds like DEBUG isn't actually True. To test, from a manage.py shell: from django.conf import settings assert settings.DEBUG No error there? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visi

Re: How to disable specific field validaton in form?

2011-07-20 Thread SmileyChris
Would it be acceptable to just not bind the form at all in the situation where you want to return the more complex form? Something like: YourForm(initial=dict(request.POST.items())) -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

Re: problem with BooleanField form

2011-07-20 Thread SmileyChris
It should definitely be {'share': True} if you've checked the box and submitted the form. Have you ensured your checkbox inside the form tag you're submitting in HTML? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on

problem with BooleanField form

2011-07-20 Thread ed
I'm learning Django by following the turorials in Django 1.0 Website Development by Ayman Hourieh. I've been banging my head for a while on this and I know it's probably something really simple that I'm missing. I'm using the following form: class BookmarkSaveForm(forms.Form): share = fo

Re: 'settings' referenced before assignment

2011-07-20 Thread ydjango
Thank you. That was exactly the issue. I renamed the local variable. On Jul 20, 2:04 pm, Ian Clelland wrote: > On Wed, Jul 20, 2011 at 1:14 PM, ydjango wrote: > > Occasionally I see this error in my app, > > > UnboundLocalError: local variable 'settings' referenced before > > assignment > > > I

Re: 'settings' referenced before assignment

2011-07-20 Thread Ian Clelland
On Wed, Jul 20, 2011 at 1:14 PM, ydjango wrote: > Occasionally I see this error in my app, > > UnboundLocalError: local variable 'settings' referenced before > assignment > > I have in my views .py > > from django.conf import settings > other imports... > > def new_view(request): >if

Pycrypto----> DLL load failed: The specified module could not be found.

2011-07-20 Thread Lycan
Hello In my views.py i have this line of code "from Crypto.Hash import SHA256", it works fine on localhost.But when i try to launch my live website(using Apache 2.2 and mod_wsgi), I am seeing the following error: ImportError at /accounts/profile/apps DLL load failed: The specified module could no

'settings' referenced before assignment

2011-07-20 Thread ydjango
Occasionally I see this error in my app, UnboundLocalError: local variable 'settings' referenced before assignment I have in my views .py from django.conf import settings other imports... def new_view(request): if not request.user.is_authenticated(): return HttpResponseR

Re: Improperly Configured Remote User Middleware

2011-07-20 Thread John
I changed my uat instance to point at PostgreSQL instead of SQLite and now it works. I touched nothing relating to this issue, but it looks like it worked itself out. I would imagine there was some caching of something somewhere that was not getting overwritten. Thanks anyway. On Jul 20, 12:35 pm

Re: get django/lighttpd "hello world" page

2011-07-20 Thread Phil
thanks Javier. On Jul 20, 8:13 pm, Javier Guerra Giraldez wrote: > On Wed, Jul 20, 2011 at 2:02 PM, Phil wrote: > >            "host" => "my ip address", > > sometimes flup (and other fastcgi launchers) bind only to the > 127.0.0.1 IP.  if you want to put the webserver and webapp on > different

Re: get django/lighttpd "hello world" page

2011-07-20 Thread Javier Guerra Giraldez
On Wed, Jul 20, 2011 at 2:02 PM, Phil wrote: >            "host" => "my ip address", sometimes flup (and other fastcgi launchers) bind only to the 127.0.0.1 IP. if you want to put the webserver and webapp on different machines, be sure to bind to all IPs (typically setting "0" as IP on the launc

Re: get django/lighttpd "hello world" page

2011-07-20 Thread Phil
thanks Javier! I switched it to port 8080 now. I have a "lighttpd/lighttpd.conf" with the following... server.document-root = "/var/www" $HTTP["host"] =~ "(^|\.)mydomain\.com$" { fastcgi.server = ( "/var/www/mydomain.fcgi" => ( "main" => ( # Use host / port instead of soc

Re: get django/lighttpd "hello world" page

2011-07-20 Thread Javier Guerra Giraldez
On Wed, Jul 20, 2011 at 1:42 PM, Phil wrote: > if I can get a standard HTML to display on port 80 with lighttpd does > that still mean I have to use a different port for fcgi? absolutely. the port used between the webserver and webapp must _not_ be the same where the browsers connect to the webs

Re: get django/lighttpd "hello world" page

2011-07-20 Thread Phil
if I can get a standard HTML to display on port 80 with lighttpd does that still mean I have to use a different port for fcgi? On Jul 18, 10:59 pm, Javier Guerra Giraldez wrote: > On Mon, Jul 18, 2011 at 4:55 PM, Phil wrote: > > I did run "./manage.py runfcgi > > method=threaded host=my ip addre

Improperly Configured Remote User Middleware

2011-07-20 Thread John
I am trying to get sso working with apache and Django. I have the REMOTE_USER being filled correctly with mod_auth_kerb, and I followed the simple directions listed at https://docs.djangoproject.com/en/dev/howto/auth-remote-user/ in an attempt to enable Django's REMOTE_USER authentication. I am ab

Running Django on a Shared-Hosting Provider with Apache

2011-07-20 Thread Rick Beacham
Running Django on a Shared-Hosting Provider with Apache When i go to run the mysite.fcgi it prints out itself in the browser..Is there something wrong here? I have followed the steps to the tee.. http://localhost/mysite.fcgi print out this: import sys, os # Add a custom Python path. sys.pat

Re: Odp: Re: Django admin - utf8 filename

2011-07-20 Thread urukay
Why not to change filename during the upload? Radovan http://www.yau.sk On 19. Júl, 17:24 h., galgal wrote: > OK I managed to do that - I can upload utf8 files now. > But after uploading it i can't see file form field to change file:/ -- You received this message because you are subscribed to

Re: How to best use gunicorn with multiple virtualenv's

2011-07-20 Thread Shawn Milochik
I just create a different user account for each application I'm running. So each user account has its own virtualenv, gunicorn, etc. Obviously just one nginx instance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

How to disable specific field validaton in form?

2011-07-20 Thread galgal
I need to disable field validation in ModelForm. I want this validation not to validate some field. I have some situations (AJAX rendering form) when I want to return more complex form with additional fields. I pass POST to the form and render new one with post fields saved. Some new fields are

Re: Pasta root

2011-07-20 Thread Tom Evans
On Wed, Jul 20, 2011 at 1:47 PM, Andre Terra wrote: > Oh, I didn't know that. Has that always been the case or was that feature > added in a recent version? > > Anyway, thanks, Tom! > > > Cheers, > AT > 4 years ago :) https://code.djangoproject.com/changeset/5379 Cheers Tom -- You received

Re: creating dynamic forms with django

2011-07-20 Thread ken paul
Hey you know the link actually has what I want thanks Kenneth On Wed, Jul 20, 2011 at 3:27 PM, ken paul wrote: > Thank man but what I mean is like you create a dynamic class > ||new_class=type('myform',(forms.Form),{attrib})|| but the dict with attribs > is a bit complex coz the form attributes

Re: Pasta root

2011-07-20 Thread Andre Terra
Oh, I didn't know that. Has that always been the case or was that feature added in a recent version? Anyway, thanks, Tom! Cheers, AT On Wed, Jul 20, 2011 at 9:44 AM, Tom Evans wrote: > On Wed, Jul 20, 2011 at 1:01 PM, Andre Terra wrote: > > From what I'm seeing, you haven't created your own

Re: Pasta root

2011-07-20 Thread Tom Evans
On Wed, Jul 20, 2011 at 1:01 PM, Andre Terra wrote: > From what I'm seeing, you haven't created your own context processor, > and the default processors do not add MEDIA_URL to the context. > django.core.context_processors.media adds MEDIA_URL to the context, and is in TEMPLATE_CONTEXT_PROCESSORS

Re: creating dynamic forms with django

2011-07-20 Thread ken paul
Thank man but what I mean is like you create a dynamic class ||new_class=type('myform',(forms.Form),{attrib})|| but the dict with attribs is a bit complex coz the form attributes have there own attributes and widgets Kenneth On Wed, Jul 20, 2011 at 1:00 PM, NISA BALAKRISHNAN < snisa.balakrish...@

Komodo IDE better screenshots (worth reading!)

2011-07-20 Thread Cal Leeming [Simplicity Media Ltd]
For me, looks are extremely important when it comes to an IDE, especially when I spend 12+ hours a day doing nothing but Django/Python development. When looking at Komodo, I *almost* rejected it on the basis that all the available screenshots looks hideous. OSX: http://www.i-cherubini.it/mauro/bl

Receiving [Django] ERROR via email even if DEBUG = True

2011-07-20 Thread Federico Capoano
Hi, i'm using django 1.4 alpha from SVN. I get email notification for errors on my local machine which I use to develop. How can I turn these notifications off? DEBUG is True on my settings.py. Thanks -- You received this message because you are subscribed to the Google Groups "Django users"

Re: DeprecationWarning displayed in test, not in dev

2011-07-20 Thread Andre Terra
Great! Thank you Tom and Russ for the heads up. Cheers, AT On 7/20/11, Tom Evans wrote: > On Wed, Jul 20, 2011 at 3:24 AM, Russell Keith-Magee > wrote: >> The problem here actually lies with Python. >> >> For some reason, Python 2.7 changed the reporting behavior of Warnings >> so that Depreca

Re: Pasta root

2011-07-20 Thread Andre Terra
>From what I'm seeing, you haven't created your own context processor, and the default processors do not add MEDIA_URL to the context. In other words, MEDIA_URL will always be null unless you explicitly pass it to the template. You could do this on every view, or write a context processor that aut

Re: DeprecationWarning displayed in test, not in dev

2011-07-20 Thread Tom Evans
On Wed, Jul 20, 2011 at 3:24 AM, Russell Keith-Magee wrote: > The problem here actually lies with Python. > > For some reason, Python 2.7 changed the reporting behavior of Warnings > so that DeprecationWarning is ignored by default [1]. So, because > you're developing in Python 2.7, you don't see

Re: creating dynamic forms with django

2011-07-20 Thread NISA BALAKRISHNAN
may be dis link helps u: http://uswaretech.com/blog/2008/10/dynamic-forms-with-django/ On Wed, Jul 20, 2011 at 12:46 PM, ken paul wrote: > hey can anyone get a way of writing dynamic form classes with django. I > have tried but putting the attributes became a bit hard. > Kenneth > > -- > You re

Re: Pasta root

2011-07-20 Thread Jussiê Vieira Toledo
ok, sorry I did not see that it was only in English. At first everything is configured ok, and processors of the templates here's the code: TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.auth" "django.core.context_processors.request" # "grappelli.context_processor

creating dynamic forms with django

2011-07-20 Thread ken paul
hey can anyone get a way of writing dynamic form classes with django. I have tried but putting the attributes became a bit hard. Kenneth -- 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@googlegrou

Re: NameError at /admin/

2011-07-20 Thread lokesh
Hi, In admin.py yourprojectname is missing. Instead of from news.models import Articles, try from yourprojectname.news.models import Articles. Lokesh S On Jul 18, 7:06 pm, arthur_mwai wrote: > I wanted to register an app called "news" in the admin site and i got > this error: > > NameError a

Re: How to get parent id in inline html

2011-07-20 Thread Burcu Hamamcıoğlu
I found the solution; change_view view sends a parameter named "object_id" to the html. This was enough helpfull for me. 20 Temmuz 2011 00:03 tarihinde Burcu Hamamcıoğlu yazdı: > Hi all, I've customized edit_inline.html for my inline section. I > need parent model's id/pk in the inline templat