Re: Documentation Checked But Unclear: How to supress form.errors from views when needed?

2011-04-03 Thread Sam Walters
I dont understand so you render a view with a form once and you get form errors on the initial view? Or Is there a POST/GET with formdata being submitted generating this issue? *which would be by design as fas as i can tell you want form verification to work Note: http://docs.djangoproject.com/e

Re: noobie cannot get mod_wsgi to import settings

2011-04-03 Thread Sam Walters
Hi I dont usually deal with Apache+WSGI (usually fcgi + nginx) However your script: WSGIScriptAlias /wsgi /var/www/wsgi-scripts One of my apache sites: WSGIScriptAlias / /home/hvv00/hvv/wsgi/hvv.wsgi Point directly this directly to the file. Note: You wont need to chmod 777 anything S

Re: admin interface and urls.py regex issue

2011-04-03 Thread xiao_haozi
On Apr 3, 11:58 pm, Karen Tracey wrote: > On Sun, Apr 3, 2011 at 11:35 PM, xiao_haozi wrote: > > I'm running into some perplexing regex issues in urls.py and getting > > to my admin section. > > It worked before but now that I have another view added in, anything > > beyond the index regex is g

Re: admin interface and urls.py regex issue

2011-04-03 Thread Karen Tracey
On Sun, Apr 3, 2011 at 11:35 PM, xiao_haozi wrote: > I'm running into some perplexing regex issues in urls.py and getting > to my admin section. > It worked before but now that I have another view added in, anything > beyond the index regex is getting fed into the "url/" section rather > than adm

Re: unicode and database oddity

2011-04-03 Thread xiao_haozi
Yeesh. Good call. Talk about embarrassed. I totally missed that. Thanks for the editing eye! On Apr 3, 11:46 pm, Karen Tracey wrote: > On Sun, Apr 3, 2011 at 11:33 PM, xiao_haozi wrote: > > from shortener.models import url > > url = u'http://t04u.be/' > > In the 1st line you are importing a mo

Re: unicode and database oddity

2011-04-03 Thread Karen Tracey
On Sun, Apr 3, 2011 at 11:33 PM, xiao_haozi wrote: > from shortener.models import url > url = u'http://t04u.be/' > In the 1st line you are importing a model (?) named url. In the 2nd you are discarding that url you just imported and rebinding the name url to a unicode string. You no longer have

unicode and database oddity --updated

2011-04-03 Thread xiao_haozi
Hi, sorry for the long message to follow, but I have an odd issue with inserting a value into my database (MySQL). In short, I am grabbing in a url as a variable fed in via urls.py and am getting that value as a unicode. Even if I convert this with smart_str and it's type is then string, I still ra

admin interface and urls.py regex issue

2011-04-03 Thread xiao_haozi
I'm running into some perplexing regex issues in urls.py and getting to my admin section. It worked before but now that I have another view added in, anything beyond the index regex is getting fed into the "url/" section rather than admin: I've included my urls.py section and the 500 error. from

unicode and database oddity

2011-04-03 Thread xiao_haozi
Hi, sorry for the long message to follow, but I have an odd issue with inserting a value into my database (MySQL). In short, I am grabbing in a url as a variable fed in via urls.py and am getting that value as a unicode. Even if I convert this with smart_str and it's type is then string, I still ra

Re: Versioning an app and displaying in template

2011-04-03 Thread christian.posta
Thank you so much for the suggestion. I did find the python-svn bindings and came up with a fairly cogent solution. I blogged about it here: http://www.christianposta.com/blog/?p=74 On Apr 2, 8:53 pm, Aryeh Leib Taurog wrote: > On Apr 2, 1:42 am, "christian.posta" > wrote: > > > I would like to

django-phogologue displays nothing

2011-04-03 Thread minux
Hi fols, I am stuck on this issue for a while: Django Photologue seems great but when I visit a gallery, e.g. http://example.com/photologue/gallery/test/ it displays a blank page (of the pinax hompage template) without any photos, links or menu items. First I had this problem in Pinax instillatio

inlineformset with custom multiwidget has_changed always returns true

2011-04-03 Thread jerhun
When using a custom multiform widget for time in a modelform, if that modelform represents the 'extra' item in an inlineformset The has_changed method always returns true on post even if the 'extra' item was not changed. In the debugger the changed_data attribute shows the fields with the custom wi

Re: Confusion with ROOT_URLCONF

2011-04-03 Thread andy
I'm not really a pro with the who path stuff but this is how I see it. ROOT_URLCONF = 'projectname.urls' In my project I can import projectname and projectname.urls. generally all django project have a __init__.py file which makes it a module, so in your case soco-site should be a valid module wi

Re: Confusion with ROOT_URLCONF

2011-04-03 Thread Roy Smith
On Apr 3, 4:58 pm, Shawn Milochik wrote: > In short, it has to be on your PYTHONPATH or in the local directory. OK, then I'm still not getting how this works. The full path to my setting and urls files are: /Users/roy/s7/soco/soco-site/settings.py /Users/roy/s7/soco/soco-site/urls.py If I have

Re: admin cannot edit records with 'add' as primary key

2011-04-03 Thread Marc Aymerich
On Fri, Apr 1, 2011 at 8:39 PM, Marwan Al-Sabbagh < marwan.alsabb...@gmail.com> wrote: > Hi, > just wanted to confirm that this is a bug before posting it on > tracker. Any comments are welcome it will be my first bug report on > django :) > > Problem > > If you have a model with a pri

Re: Odd problem with queryset

2011-04-03 Thread Adam Tonks
At the suggestion of someone on IRC, I tried accessing the first result from within my template, using {{ thread.original_author.0 }} (where original_author is the name of the function with the return statement), and that works fine. It's a workaround, but not ideal, as I'll be using it in vari

Odd problem with queryset

2011-04-03 Thread Adam Tonks
I have a function in a model to return the first post in a forum thread. At the moment, it looks like this: return Post.objects.filter(thread = self.pk).order_by('created') When I run it in my test forum, the code returns two posts: [, ] I then add a [0] to the end of the statement, to just r

Re: Confusion with ROOT_URLCONF

2011-04-03 Thread Shawn Milochik
In short, it has to be on your PYTHONPATH or in the local directory. If you're importing from the local directory it always works (assuming the subdirectory contains a file named __init__.py). The other path, 'foo.urls' works because 'foo' is in your PYTHONPATH. Do whatever makes sense to you and

Re: Confusion with ROOT_URLCONF

2011-04-03 Thread Roy Smith
On Apr 3, 2:55 pm, andy wrote: > Well I'm guess you don't have to. Both ROOT_URLCONF = "foo.urls" and > ROOT_URLCONF = "urls" seem to work fine. Interesting, I just tried it that way, and sure enough it does work. I had simply been following the examples in the tutorial, which showed the foo.urls

Re: Confusion with ROOT_URLCONF

2011-04-03 Thread andy
Well I'm guess you don't have to. Both ROOT_URLCONF = "foo.urls" and ROOT_URLCONF = "urls" seem to work fine. On Apr 3, 8:11 am, Roy Smith wrote: > I don't understand how ROOT_URLCONF is declared in settings.py.  If I > put all my apps (and my settings.py file) in a directory "foo", I'm > suppose

Do you combine you Django decorators?

2011-04-03 Thread andy
Do you use several Django decorators for your views or do you combine the common ones into one or two custom decorators? This is just something that I have been a bit curious about for a while now as I tend to hate using more that one decorator per view. I have often thought about combining them.

Confusion with ROOT_URLCONF

2011-04-03 Thread Roy Smith
I don't understand how ROOT_URLCONF is declared in settings.py. If I put all my apps (and my settings.py file) in a directory "foo", I'm supposed to do: ROOT_URLCONF = "foo.urls" This seems counter-intuitive to me. When I run my app (by running "python manage.py runserver"), I'm already in the

Re: Hi, I'm trying to reset my db (using multiple dbs) but flush andreset don't seem to drop the tables.

2011-04-03 Thread delegbede
I don't know much about Posgresql 8.3, I use mysql. In my experience, you can choose to add the model and then do a migrate. As in manage.py schemamigration [app] --auto. That would create a migration and then you can do a manage.py migrate auto. You must have south installed on your system. W