getting problem while submiting in dynamic form

2012-03-18 Thread shweta
hi, i m trying to create dynamic form with corresponding fields using following code. But getting problem while submiting value. If i entered blank value then error is : Attribute Error: 'module' object has no attribute '' in forms.py and if I entered value for salary then error is: Attribute

getting problem while submiting in dynamic form

2012-03-18 Thread shweta chaughule
hi, i m trying to create dynamic form with corresponding fields using following code. But getting problem while submiting value. If i entered blank value then error is : Attribute Error: 'module' object has no attribute '' in forms.py and if I entered value for salary then error is: Attribute

Re: problem with admin settings

2012-03-18 Thread Swaroop Shankar V
Sophia, Could you please provide me with your settings.py file? On Mar 19, 2012 4:04 AM, "Sophia" wrote: > Swaroop, > > I run sync.db this is what it shows after running sync.db : > > Creating tables ... > Installing custom SQL ... > Installing indexes ... > No fixtures

Add user page extend.

2012-03-18 Thread yillkid
I can add new field to the UserProfile class, for example I add a integer field to take down the account valid days. But, if I want to add this filed to "/admin/auth/user/add/" page, then admin can modify the value when add user (link user_name/password input), how should I do ? -- You

Looking for a round trip example of adding/editing/saving a record using class-based views

2012-03-18 Thread Lee Hinde
I'm looking for something like the vote function in step 4 of the tutorial, but using class-based views.py. Any pointers would be appreciated. Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: problem with admin settings

2012-03-18 Thread Sophia
Swaroop, I run sync.db this is what it shows after running sync.db : Creating tables ... Installing custom SQL ... Installing indexes ... No fixtures found. Process finished with exit code 0 without any error, but it still doesn't work, would you please help me with it, I really stuck :( On

Re: NullBooleanField default to unknown

2012-03-18 Thread Mike Dewhirst
I did a bit of playing around and found the same as you did. I think the bottom line is that a boolean field of any type can only realistically hold two values. The NullBoolean must only be a workaround to support various form logic. If you truly need a third value then an IntegerField is

Re: Trouble setting up website with mysql as backend

2012-03-18 Thread CLIFFORD ILKAY
On 03/17/2012 04:49 PM, Swaroop Shankar V wrote: Hello All, I was developing a website and the development was all done using sqlite database. Now the development is almost complete so i need to test the site using mysql. When i did a syncdb on a fresh database i got the following error: [snip]

django registration and weird date validation data

2012-03-18 Thread nicolas HERSOG
Hi everyone, I added django registration to my app and i'm facing a problem with date validation. In my settings.py I have this : DATE_INPUT_FORMATS = ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B % d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y')

Re: model can return a count but no data

2012-03-18 Thread Maarten Japink
Great! this works. Thank you so much Kevin. 2012/3/18 Kevin Wetzels > > On Sunday, March 18, 2012 12:55:31 PM UTC+1, Maarten Japink wrote: >> >> I 'm working on a taxonomie. >> These are my models: >> >> class Classificatie(models.Model): >>

Re: New way to run your Django projects

2012-03-18 Thread Justin Holmes
I feel the need to inject, once again, that the Twisted WSGI container rocks. On Sun, Mar 18, 2012 at 12:40 PM, Bolang wrote: > Hi Alexander, > What is the advantage of using gevent-fastcgi instead of simply using > nginx and maybe with gunicorn? > > > > On 03/18/2012 12:59

Re: model can return a count but no data

2012-03-18 Thread Kevin Wetzels
On Sunday, March 18, 2012 12:55:31 PM UTC+1, Maarten Japink wrote: > > I 'm working on a taxonomie. > These are my models: > > class Classificatie(models.Model): > name=models.CharField(max_length=60) > > def __unicode__(self): > return self.name > > class

Re: VERY strange unicode encode error on internet connection

2012-03-18 Thread ionic drive
Karen, sometimes its only good to get pushed by someone else. I also think, that the code is going down different paths. I thought I might have overseen something. I just have to inspect my code further. Thanks for the hint Ionic On Sun, 2012-03-18 at 12:48 -0400, Karen Tracey wrote: > On

Re: VERY strange unicode encode error on internet connection

2012-03-18 Thread Karen Tracey
On Sun, Mar 18, 2012 at 8:37 AM, ionic drive wrote: > hello django friends, > > I am facing a VERY strange unicode encode error on internet connection. > No Error when network(LAN/internet) is disabled. > > Situation: > > In a template I do have a link to a

Re: New way to run your Django projects

2012-03-18 Thread Bolang
Hi Alexander, What is the advantage of using gevent-fastcgi instead of simply using nginx and maybe with gunicorn? On 03/18/2012 12:59 PM, Alexander wrote: Hello everybody, I'm working on gevent coroutine based library FastCGI server implementation and I's ready for testing. It most likely

Re: how to display development server page

2012-03-18 Thread Karen Tracey
On Sat, Mar 17, 2012 at 1:23 AM, Alex Glaros wrote: > Newbie trying to run Django for the first time. > > I'm using a hosted Linux server; I run python manage.py runserver, and > get: > > Validating models... > > 0 errors found > Django version 1.3.1, using settings

Fwd: adding a button on clicking save and continue editing in django admin

2012-03-18 Thread dummyman dummyman
- Hi, I want to add a new button on clicking a save and continue editing in django admin add I have created admin folder in my project and all those prelims im done with it Where exactly i should add the html code in change_form.html ? i cannot add in submit_line.html coz it will affect other

Re: syncdb failure in new project with 1.4c2

2012-03-18 Thread Karen Tracey
On Sat, Mar 17, 2012 at 3:16 PM, Thomas Lockhart wrote: > locale.getdefaultlocale() should return something other than (None,None) if > environment variables are set but istm that this should fail gracefully (or > not fail at all; the ticket suggests a solution using a

Re: Trouble setting up website with mysql as backend

2012-03-18 Thread Sithembewena Lloyd Dube
Congrats :) On Sun, Mar 18, 2012 at 8:55 AM, Swaroop Shankar V wrote: > As Alasdair pointed out, i had few custom permission which had pretty big > name. I reduce it and it got fixed. Thank you both for helping me out. > > Thanks and Regards, > Swaroop Shankar V > > > > On

model can return a count but no data

2012-03-18 Thread Maarten Japink
I 'm working on a taxonomie. These are my models: class Classificatie(models.Model): name=models.CharField(max_length=60) def __unicode__(self): return self.name class Taxonomie(models.Model): name=models.CharField(max_length=60) level=models.ForeignKey(Classificatie)

Re: Strange south migration, after django updating (from 1.2.5 to 1.2.7)

2012-03-18 Thread shiva
Andrew Godwin answered for this question in South mailing-list: http://groups.google.com/group/south-users/t/e0f228eb09a11ec9 2012/3/18 shiva : > Hi! > > In our project, we have south 0.7.3 and django 1.2.5. After updating > django, to version 1.2.7 I have got strange

Strange south migration, after django updating (from 1.2.5 to 1.2.7)

2012-03-18 Thread shiva
Hi! In our project, we have south 0.7.3 and django 1.2.5. After updating django, to version 1.2.7 I have got strange south migration, with equal backwards and forwards content. Models and migrations listed here: https://gist.github.com/2069316 Can anyone describe, why did it happend? Thanks!

New way to run your Django projects

2012-03-18 Thread Alexander
Hello everybody, I'm working on gevent coroutine based library FastCGI server implementation and I's ready for testing. It most likely contains lots of bugs and it would be great if you help to catch some of them. Just install gevent-fastcgi package: $ easy_install gevent-fastcgi Then include

intriguing django session save behavior

2012-03-18 Thread pyramid...@gmail.com
If i clear my cookies and run this view, i get a new session key each page load. If I comment out the print, and output the session key in the template, new session key each load. If I print session key in both view and template, the session key is 'saved' and remains the same each page load.

VERY strange unicode encode error on internet connection

2012-03-18 Thread ionic drive
hello django friends, I am facing a VERY strange unicode encode error on internet connection. No Error when network(LAN/internet) is disabled. Situation: In a template I do have a link to a site(google) in this a URL a '/u' is included. I am testing this in my virtual-machine so I

Re: logs complaining about 404 url(css-files)

2012-03-18 Thread ionic drive
sorry friends, bad news. I stopped investigation further on that issue as it is not urgent and minor. I stopped sending mails on 404 errors and switched back to use the logs to inspect 404s again. Maybe in the future I am able to fix this strange 404 issue with IE-versions. Kind regards,

Re: Storing many to many fields

2012-03-18 Thread dummyman dummyman
HI, One more question How do i update a manytomany field which is a self referential field ie it points to the same table. Consider for example facebooksession contains a field called friends friends = models.ManyToManyField("self",db_column='uid',blank=True,null=True) On Sun, Mar 18, 2012

Re: problem with admin settings

2012-03-18 Thread Martynas Sklizmantas
http://flask.pocoo.org/ On Sun, Mar 18, 2012 at 11:45 AM, Sophia wrote: > Actually I use PyCharm environment, and I right click on the database file > and click synchronization 'database.db', I think that would do the syncdb > that we use in command prompt. But here I

Re: problem with admin settings

2012-03-18 Thread Sophia
Actually I use PyCharm environment, and I right click on the database file and click synchronization 'database.db', I think that would do the syncdb that we use in command prompt. But here I still have the problem. On Saturday, March 17, 2012 2:46:25 PM UTC-7, Swaroop Shankar wrote: > > Did

Re: Storing many to many fields

2012-03-18 Thread dummyman dummyman
thnk u very much i got it :) On Sun, Mar 18, 2012 at 3:57 PM, Ian Lewis wrote: > Hi, > > facebook_session.books_name is a RelatedManager on the Books model class. > > You need to add books to the list with the add() method. > > book = Books(book_name="name",

Re: how to display development server page

2012-03-18 Thread Eugene Gavrish
Just that very case I suggested for my recipe with ip address of your remote server On 17 мар, 19:00, Alex Glaros wrote: > thanks sayakurt > > I'm on my PC at home, logged onto a SSH session on the host Linux > server.  So I'm typing the command on the server. > > Thanks, >

Re: Storing many to many fields

2012-03-18 Thread Ian Lewis
Hi, facebook_session.books_name is a RelatedManager on the Books model class. You need to add books to the list with the add() method. book = Books(book_name="name", book_category="category") book.save() facebook_session.books_name.add(book) See:

Re: Running manage.py commands in Windows Power Shell

2012-03-18 Thread orschiro
Hello Sam, Let's assume we're having the following script test.py containing nothing more than a print statement and a raw_input. print "Test" raw_input() When I launch test.py in PowerShell like that: PS C:\Users\Robert> .\test.py Then C:\Python27\python.exe is launched in a new

Storing many to many fields

2012-03-18 Thread dummyman dummyman
Hi I ve to models class FacebookSession(models.Model): access_token = models.CharField(max_length = 250,unique=True) expires = models.IntegerField(null=True) user = models.ForeignKey(User, null=True) uid = models.BigIntegerField(unique=True, null=True) birthday =

Re: Trouble setting up website with mysql as backend

2012-03-18 Thread Swaroop Shankar V
As Alasdair pointed out, i had few custom permission which had pretty big name. I reduce it and it got fixed. Thank you both for helping me out. Thanks and Regards, Swaroop Shankar V On Sun, Mar 18, 2012 at 6:27 AM, Sithembewena Lloyd Dube wrote: > ^^ What Alasdair said. If