Re: using modelformsets

2009-07-06 Thread Eric Abrahamsen
On Jul 5, 2009, at 11:32 PM, Matthias Kestenholz wrote: > > Hi, > > On Sun, Jul 5, 2009 at 11:42 PM, Eric Abrahamsen > wrote: >> >> I'm somehow failing to use modelformsets, this is the relevant view >> and error traceback: >> >> http://dpaste.org/evHq/ >> >> I'm validating a whole bunch of fo

Re: Global custom tags

2009-07-06 Thread diogobaeder
Great, guys! Solved! Now I have a global custom tag for recursive nested list in all the views! Nice! :-) Next step: see if my hosting privider has python-memcache to put these guys under a cache... doesn't sound nice to have these repeated queries on a bank, considering they won't change so much

Re: syncdb is not doing anything

2009-07-06 Thread chefsmart
It had just slipped my mind that syncdb won't sync modifications to models. Won't forget it now hopefully. But why then do I still see some output from manage.py sql command? Also, the sql being output is syntactically wrong. Regards, CM. On Jul 6, 10:41 am, Luc Saffre wrote: > I often got con

Re: Newbie problem: AttributeError with ModelForm

2009-07-06 Thread Geoff
Thanks Daniel that was the answer. As someone from a database background I like the way Django can do so much from it's models with little coding. Regards Geoff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Re: Using a dynamically created ImageField filename prior to save?

2009-07-06 Thread Andrew Turner
2009/7/5 Mirat Can Bayrak : > I have another question. You are naming images as hash of random number. > There is a small chance to produce same name i think. It is not good way to > give name ha? The slug field has a unique=True argument, so if the same file name does happen to be produced, it

request.path or request.path_info?

2009-07-06 Thread Bastien
Hi, I could not find any valuable documentation about the differences between request.path and request.path_info. anybody knows a bit about them? Thanks, Bastien --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Common report values?

2009-07-06 Thread Joshua Russo
I have a seriese of reports that have a signature section with the name below. The name does not change very often but it will change at some point and I want a layman to be able to change the name without having to edit the scary looking template files. Can I specify an arbitrary field from an ar

User Authentication Redirect Loop

2009-07-06 Thread Darren Mansell
Hello. I'm trying to log a user in using the @login_required decorator. I've followed the examples on http://docs.djangoproject.com/en/dev/topics/auth/#topics-auth but I can't get it to stop spiraling into a redirect loop. I've tried everything I can think of but I'm out of ideas. Please help. My

Django as python ORM in project

2009-07-06 Thread zayatzz
Hi I keep coming up things to do and this time the project is not completely a web project. I want to write something in python, but use some of the data in web too. For that reason i started looking for different python ORM's and apparently there are many, but someone suggested to use django as

Django and dojo

2009-07-06 Thread Joshua Partogi
Dear all, Not trying to flame here, but I've just read Jacob's post here: http://article.gmane.org/gmane.comp.web.dojo.user/3603 What made django developers changed their mind not to bundle dojo in 1.0 ? Is there any history to that? Kind regards, -- Join Scrum8.com. http://blog.scrum8.com ht

Re: syncdb is not doing anything

2009-07-06 Thread Phil
Hi, you may want to try sqlreset keyword to get the right sql output for your db and put it down into the db directly (copy\paste) something like this: python manage.py sqlreset yourapp this will drop old tables and create all new ones. Though all data is going to be lost. syncdb doesn't change

Re: Problem with Reverse

2009-07-06 Thread Phil
Hi, agree with that - does it work if you go through the url first? Cheers, Phil On Jul 6, 3:21 am, Karen Tracey wrote: > On Sat, Jul 4, 2009 at 11:44 PM, tam...@gmail.com wrote: > > > Hi, > > > I am trying to decouple my views.py with respect to my url.py but I > > have a problem. > > > -I d

Project creating Problem in Windows

2009-07-06 Thread somepalli
I installed python 2.5.4 and DJango 1.0 in my windows xp. DJango working properly. But here i am not able get the mysite folder i am getting like following C:\Documents and Settings\Administrator\Desktop\django_website>django- admin.py startproject mysite C:\Documents and Settings\Administrato

Model Validations on foreign keys

2009-07-06 Thread Neelesh
Hi, I've gone through the excellent http://wiki.github.com/HonzaKral/django/model-validation and the corresponding ticket #6845. I have an issue when it comes to validating aggregations. For example, class Voucher(Model): pass class LedgerEntry(Model): amount=DecimalField(...) voucher

Re: Django as python ORM in project

2009-07-06 Thread dartdog
your link just goes to the overview SO page (can't find your post),, If you post what you have in mind here you might get some useful feedback. On Jul 6, 6:55 am, zayatzz wrote: > Hi > > I keep coming up things to do and this time the project is not > completely a web project. I want to write s

Re: Apache with Django

2009-07-06 Thread WilsonOfCanada
@ Kenneth: If I do not use runserver, what command should I use to run the python scripts for production servers? @ Boštjan: I am not sure if I even setup a connection between them. In httpd.conf, I only added: ServerName www.domainname.ca SetHandler python-program PythonHandl

Re: Apache with Django

2009-07-06 Thread Mike Ramirez
On Sunday 05 July 2009 09:01:13 pm Kenneth Gonsalves wrote: > On Monday 06 July 2009 09:01:53 WilsonOfCanada wrote: > > When running a production server, I was wondering if I still use > > "python manage.py runserver [ip]:[port]" because the cmd says it is > > running a development server. > > > >

using python libraries in django?

2009-07-06 Thread djangonoob
Hi all, i was wondering if we can use python libraries in Django? Do we need to type in any form of extra commands ? For instance, if i want to use the urllib library, how do i do that? Best Regards. --~--~-~--~~~---~--~~ You received this message because you are

Re: using python libraries in django?

2009-07-06 Thread Alex Gaynor
On Mon, Jul 6, 2009 at 8:30 AM, djangonoob wrote: > > Hi all, > i was wondering if we can use python libraries in Django? > > Do we need to type in any form of extra commands ? > > For instance, if i want to use the urllib library, how do i do that? > > Best Regards. > > > Django is just python,

Re: syncdb is not doing anything

2009-07-06 Thread JL
Given that you mention that you already have a lot of data in your db, I really recommend you check out South (http://south.aeracode.org/). South is an application that adds migrations to your Django application. When I develop new applications and the dataset is small, I'll usually just use a co

Re: Django as python ORM in project

2009-07-06 Thread zayatzz
Apparently the system has cut the link, but you can still copypaste everything between the () to your browser addressbar. What i have in mind is sort of chatroom for company customer support. Beeing able to post into that system from website(django) is just one part, everything else - logging the

Re: Django and dojo

2009-07-06 Thread Russell Keith-Magee
On Mon, Jul 6, 2009 at 8:38 PM, Joshua Partogi wrote: > Dear all, > > Not trying to flame here, but I've just read Jacob's post here: > http://article.gmane.org/gmane.comp.web.dojo.user/3603 > > What made django developers changed their mind not to bundle dojo in 1.0 ? > Is there any history to th

Re: Problem with Reverse

2009-07-06 Thread Rodrigue
Are there other urls defined in your file? If so, do the views they reference exist already? Django tries to load all the views it finds in all url files defined. It seems to me that you may have a url mapped to a 'select' view but that view does not exist. On Jul 6, 12:32 pm, Phil wrote: > Hi,

Re: Common report values?

2009-07-06 Thread Daniel Hilton
Couldn't you use something like django-chunks for this? Specify a single chunk something like footer and then pull it in for every report? HTH Dan 2009/7/6 Joshua Russo > > I have a seriese of reports that have a signature section with the > name below. The name does not change very often but

context objects get cached/stored across requests, somehow

2009-07-06 Thread Haes
Hi, I've created a view which displays a simple list of all objects of one model. If a 'search_string' URL parameter is defined, the list is filtered by this search string and the search string itself will be displayed in the template as well. Please have a look at the complete view here: http://

Re: Project creating Problem in Windows

2009-07-06 Thread Xiong Chiamiov
On Jul 6, 5:18 am, somepalli wrote: > I installed python 2.5.4 and DJango 1.0 in my windows xp. > > DJango working properly. > > But here i am not able get the mysite folder i am getting like > following > > C:\Documents and Settings\Administrator\Desktop\django_website>django- > admin.py startpr

Tree in ModelChoiceField

2009-07-06 Thread Oraculum
I'm trying to build a hierarchical tree and I am receiving the following error to give a bind in my choice, someone could tell me in what I'm missing: [error] TemplateSyntaxError at /plano_conta/listar/ Caught an exception while rendering: 'list' object has no attribute 'all' [/error] [model]

Re: Django as python ORM in project

2009-07-06 Thread Xiong Chiamiov
> What i want to know is that should i use django ORM for it. > Should i use any other kind of python orm instead of django orm? But > then i would essentially need to use 2 different systems for one > project which does not sound like a good idea. > > Theoretically... can 2 somewhat different ORM

Re: Django as python ORM in project

2009-07-06 Thread Alex Gaynor
On Mon, Jul 6, 2009 at 10:42 AM, Xiong Chiamiov wrote: > > > What i want to know is that should i use django ORM for it. > > Should i use any other kind of python orm instead of django orm? But > > then i would essentially need to use 2 different systems for one > > project which does not sound li

Re: context objects get cached/stored across requests, somehow

2009-07-06 Thread Brian Neal
On Jul 6, 10:08 am, Haes wrote: > Hi, > > I've created a view which displays a simple list of all objects of one > model. If a 'search_string' URL parameter is defined, the list is > filtered by this search string and the search string itself will be > displayed in the template as well. > Please

Re: Admin of an Admin for an E-Commerce Page

2009-07-06 Thread Xiong Chiamiov
On Jul 5, 12:44 pm, Nick wrote: > I'm looking to write an e-commerce page with very minimal admin > functionality, but which also has an extended admin that would > facilitate the rest of the basic admin tasks.  For example, the basic > admin could add products but shouldn't have to know any html

Re: extracting MySQL-python-1.2.3c1.tar.gz

2009-07-06 Thread Xiong Chiamiov
On Jul 5, 6:47 am, mikel wrote: > Setting up Django is going fine until configuring MySQL. It requires > MySQLdb, which I downloaded from sourceforge as MySQL- > python-1.2.3c1.tar.gz (and MySQL-python-1.2.2.tar.gz) on Mac OS X, > Redhat, and Windows. When I try decompressing then extracting the

Re: Best way to handle HEAD method

2009-07-06 Thread Andrew Fong
Thanks for the response. I'm using Apache/mod_wsgi and getting error messages in production because my handlers don't know how to handle a HEAD request. If the server is supposed to automatically translate the HEAD requests into GETs, then I probably have something set up incorrectly. Any idea whe

SQLite and Null Character

2009-07-06 Thread Andrew Fong
I'm using a SQLite3 backend on Python 2.6 and saving a unicode string with the null character (u'\x00') results in everything after that character being truncated. For example: m = MyModel(name=u'abc\x00def') m.save() MyModel.objects.get(pk=m.pk).name # => u'abc' I've tried using both the sqlit

Re: SQLite and Null Character

2009-07-06 Thread Alex Gaynor
On Mon, Jul 6, 2009 at 11:52 AM, Andrew Fong wrote: > > I'm using a SQLite3 backend on Python 2.6 and saving a unicode string > with the null character (u'\x00') results in everything after that > character being truncated. > > For example: > > m = MyModel(name=u'abc\x00def') > m.save() > MyModel

Re: context objects get cached/stored across requests, somehow

2009-07-06 Thread Haes
On Jul 6, 5:53 pm, Brian Neal wrote: > > I believe you have been hit with one of the famous Python gotchas. > > http://www.ferg.org/projects/python_gotchas.html#contents_item_6 Your're absolutely right. Thanks alot for the tip! Cheers. --~--~-~--~~~---~--~~ You

Re: Apache with Django

2009-07-06 Thread WilsonOfCanada
I am using Apache and mod_python with the some of the changes suggested in http://docs.djangoproject.com/en/dev/howto/deployment/modpython/ as shown in the fourth posting. I can start Apache Service Control and the Test Configuration does not show any errors; however when my ip address or my doma

Re: Apache with Django

2009-07-06 Thread Mike Ramirez
On Monday 06 July 2009 10:16:14 am WilsonOfCanada wrote: > I am using Apache and mod_python with the some of the changes > suggested in > http://docs.djangoproject.com/en/dev/howto/deployment/modpython/ as shown > in the fourth posting. I can start Apache Service Control and the Test > Configurati

Re: Django and chat

2009-07-06 Thread Subramanyam Vemu
Hi Juanjux Did you deploy the above chat application in any production site or so do you have any stats like how many max users it can handle Thanks in advance Regards Subramanyam On Sun, Jul 5, 2009 at 7:54 PM, Juanjux (Google) wrote: > > Hi Ivan, > > It's not based on Django, but it's easil

Re: send_mail error

2009-07-06 Thread Guri
On Jul 5, 12:37 am, Dj Gilcrease wrote: > You have the following set correctly in your settings.py? > > EMAIL_HOST > EMAIL_HOST_USER > EMAIL_HOST_PASSWORD Thanks for the info. After setting above values and running smtpd on machine, It throws following exception "SMTPServerDisconnected at /as

Speaker for pyArkansas 2009

2009-07-06 Thread gslindstrom
Hello, pyArkansas, an annual gathering of Python enthusiasts, will be held November 14 on the campus of the University of Central Arkansas (Conway, AR). The format of the event is "mini-conference" with a heavy dose of tutorials (we also have talks and open space) and would like to offer a Djang

Re: Common report values?

2009-07-06 Thread Joshua Russo
I'll check it out. Thanks. On Jul 6, 1:23 pm, Daniel Hilton wrote: > Couldn't you use something like django-chunks for this? > > Specify a single chunk something like footer and then pull it in for every > report? > > HTH > Dan > > 2009/7/6 Joshua Russo > > > > > I have a seriese of reports tha

Re: SQLite and Null Character

2009-07-06 Thread Andrew Fong
The SQLite shell doesn't like the null character either. Not sure how to escape it though. For that matter, I'm not sure how to escape anything in SQLite. The only way I could enter in unicode was to pass it in directly (e.g as opposed to some ASCII representation to unicode) or to use a binary bl

Re: Managing settings.py from admin site

2009-07-06 Thread Julián C . Pérez
Thank you, Graham In fact... my post was just a wondering, maybe to use on personal projects... because it would be risky in a production enviroment Right now best thing I could do is to keep clean and isolated the settings file On Jul 2, 6:22 pm, Graham Dumpleton wrote: > On Jul 3, 9:11 am, Jul

Deletion of individual rows i formset

2009-07-06 Thread Sonal Breed
Hi all, I have been trying to achieve following scenario: 1. I have a model named ContactRow class ContactRow(models.Model): """Emergency contact row model """ card = models.ForeignKey(ContactCard, related_name='data') # ContactCard is another model. name = models.CharField(max_length=22)

django photo sharing site

2009-07-06 Thread Himalayan
Hi I am looking to create a photo sharing site for my personal use. I'd like to start with a django application with open source code that I can change for my needs. That way I'd learn about django and python also. Any pointers? Thanks. --~--~-~--~~~---~--~~ You

Re: psycopyg setup error: no build_ext

2009-07-06 Thread Justin Johnson
I corrected the build_ext error and successfully built/installed by adding the full path to pg_config in setup.cfg. On Jun 23, 10:19 am, Chris Haynes wrote: > Using what I believe is the latest version of psycopyg, I get: > > 509 ~/Desktop/psycopg2-2.0.9$ python setup.py build > running build >

WSGIScriptAlias without access to apache config?

2009-07-06 Thread Durand
Hi, I'm wondering whether I can use django in a shared hosting environment where I don't have access to the main apache configuration. I've read that it is not possible to use a .htaccess but are there any other methods? Is there a way I can just get wsgi to load django into memory without WSGISc

photo management application suggestion...

2009-07-06 Thread vedran
i need help to select app that has drag and drop reordering feature, does the django-photologue app has that feature?( http://code.google.com/p/django-photologue/) tnx, vedran . vedran kolac .

Re: Deletion of individual rows i formset

2009-07-06 Thread Sonal Breed
Hi all, was able to fix it by hook or by crook :-) I added a boolean field in the model form and used that as the checkboxfield in template to have a reference on the specific row in formset. still would like to know if there is any nicer way to achieve this. Thanks, Sonal On Jul 6, 2:14 pm, So

Re: WSGIScriptAlias without access to apache config?

2009-07-06 Thread Graham Dumpleton
On Jul 7, 8:17 am, Durand wrote: > Hi, > > I'm wondering whether I can use django in a shared hosting environment > where I don't have access to the main apache configuration. For cheap, large scale commodity web hosting sites only if they provide FASTCGI support to you. Even then, only if the

Re: Deletion of individual rows i formset

2009-07-06 Thread Michael
On Mon, Jul 6, 2009 at 5:14 PM, Sonal Breed wrote: > > Hi all, > I have been trying to achieve following scenario: > 1. I have a model named ContactRow > class ContactRow(models.Model): > """Emergency contact row model """ > card = models.ForeignKey(ContactCard, related_name='data') # > Contact

Re: Best way to handle HEAD method

2009-07-06 Thread Graham Dumpleton
On Jul 7, 2:14 am, Andrew Fong wrote: > Thanks for the response. I'm using Apache/mod_wsgi and getting error > messages in production because my handlers don't know how to handle a > HEAD request. If the server is supposed to automatically translate the > HEAD requests into GETs, then I probabl

Re: WSGIScriptAlias without access to apache config?

2009-07-06 Thread Durand
Thanks for replying! The host I'm using (vlexo.com) is really good and very friendly, so I can theoretically ask for an admin to help but I'd rather figure it out myself. I actually asked for wsgi to be installed so that I can do something like this, figuring that I'll be able to run django wit

Re: WSGIScriptAlias without access to apache config?

2009-07-06 Thread Kenneth Gonsalves
On Tuesday 07 July 2009 05:10:38 Durand wrote: > Thanks for replying! > The host I'm using (vlexo.com) is really good and very friendly, so I can > theoretically ask for an admin to help but I'd rather figure it out myself. > I actually asked for wsgi to be installed so that I can do something lik

Re: problem with manage.py runfcgi and the pidfile parameter

2009-07-06 Thread aaron smith
AH. I figured it out. There weren't any errors thrown because the stoud was being redirected to null, and there were permission denied errors to create files in /var/run/ On Sun, Jul 5, 2009 at 4:44 PM, aaron smith wrote: > Just as another illustration of the problem. I'm using the example in >

Re: WSGIScriptAlias without access to apache config?

2009-07-06 Thread Durand
Its actually a free host. My friends and I are developing the site part time, but we go to school as well and we can't really afford a proper host at the moment. The details are here if you care: http://vlexo.com/free.php On Tue, 07 Jul 2009 01:27:04 +0100, Kenneth Gonsalves wrote: > > On Tu

Re: changes to views and forms are not reflected in browser

2009-07-06 Thread neridaj
Karen, thanks for pointing me in the right direction as far as troubleshooting goes. I switched to development on my local machine instead of my production environment and things are working as expected, however, knowing that the issue is related to the python apache module how do I resolve this i

Re: WSGIScriptAlias without access to apache config?

2009-07-06 Thread Graham Dumpleton
On Jul 7, 9:40 am, Durand wrote: > Thanks for replying! > The host I'm using (vlexo.com) is really good and very friendly, so I can > theoretically ask for an admin to help but I'd rather figure it out myself. I > actually asked for wsgi to be installed so that I can do something like this,

Re: WSGIScriptAlias without access to apache config?

2009-07-06 Thread Kenneth Gonsalves
On Tuesday 07 July 2009 06:33:39 Durand wrote: > Its actually a free host. My friends and I are developing the site part > time, but we go to school as well and we can't really afford a proper host > at the moment. The details are here if you care: http://vlexo.com/free.php ok, I understand. But

Re: "django-notification" app installation

2009-07-06 Thread Anthony
On Jul 2, 10:42 pm, Rama Vadakattu wrote: > after import notification > > just try to do this > > dir(notification) > which list all the methods ,classes in the > package > and see what it contains then atleast you will get a rough idea of > what is going wrong. > Thank you for your s

Re: syncdb is not doing anything

2009-07-06 Thread chefsmart
Thank you for the comments. I have taken a look at South and am moving towards integrating it in my app. The incorrect sql being generated was resolved by restarting the computer, so now I do not have anything to show to you!! Regards, CM On Jul 6, 6:39 pm, JL wrote: > Given that you mention t

Retrieving nested choices.

2009-07-06 Thread Magnus Valle
I have a CharField model with nested choices, like this one: MEDIA_CHOICES = ( ('Audio', ( ('vinyl', 'Vinyl'), ('cd', 'CD'), ) ), ('Video', ( ('vhs', 'VHS Tape'), ('dvd', 'DVD'), ) ), ('unknown', 'Unknown'), ) In

Re: Retrieving nested choices.

2009-07-06 Thread Alex Gaynor
On Tue, Jul 7, 2009 at 12:16 AM, Magnus Valle wrote: > > I have a CharField model with nested choices, like this one: > > MEDIA_CHOICES = ( >('Audio', ( >('vinyl', 'Vinyl'), >('cd', 'CD'), >) >), >('Video', ( >('vhs', 'VHS Tape'), >

Re: Retrieving nested choices.

2009-07-06 Thread Magnus Valle
Alex Gaynor wrote: > > > On Tue, Jul 7, 2009 at 12:16 AM, Magnus Valle > wrote: > > > I have a CharField model with nested choices, like this one: > > MEDIA_CHOICES = ( >('Audio', ( >('vinyl', 'Vinyl'), >('cd', 'CD'),

'unicode' object has no attribute 'user' when sending e-mail

2009-07-06 Thread alecs
I'm trying to send a e-mail, but getting this error. Don't know what to do... Any ideas? Thanks in advance. def urlsend(request, username): if request.method == 'POST': form = SendMailForm(request.POST) if form.is_valid(): subject = form.cleaned_data['subject']