Re: problem to save..
http://www.djangoproject.com/documentation/authentication/ This should be a good start! Also check out chapter 12 of django book at www.djangobook.com. Justin On Jul 26, 12:08 am, "Marco A." <[EMAIL PROTECTED]> wrote: > I am a newbie ! > > I doesnt have esperience whit django and web developing.. so I have some > problem to make the thing running good :| > > There are an example of User Build-in model usage ? > > Thanks > > MA. > > 2007/7/25, De Rowe <[EMAIL PROTECTED]>: > > > > > On Wed, 25 Jul 2007 15:33:19 +0200, Horst Gutmann <[EMAIL PROTECTED]> > > wrote: > > > > Marco A. wrote: > > >> HI ! > > >> In model I have : > > > >> from django.db import models > > > >> # Create your models here. > > >> class User(models.Model): > > >> User = models.CharField(maxlength=200) > > >> Pasw = models.CharField(maxlength=16) > > >> def __unicode__(self): > > >> return self.question > > >> def was_published_today(self): > > >> return self.User > > >> class Admin: > > >>pass > > > > Have you sync'd the database? Btw.: why do you give fields uppercase > > > names? > > > > - Horst > > > Lastly, why not use the built-in User model that comes with Django? Using > > it allows your users to be seen by all apps under your project. --~--~-~--~~~---~--~~ 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 from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problem to save..
I am a newbie ! I doesnt have esperience whit django and web developing.. so I have some problem to make the thing running good :| There are an example of User Build-in model usage ? Thanks MA. 2007/7/25, De Rowe <[EMAIL PROTECTED]>: > > > > > On Wed, 25 Jul 2007 15:33:19 +0200, Horst Gutmann <[EMAIL PROTECTED]> > wrote: > > > > Marco A. wrote: > >> HI ! > >> In model I have : > >> > >> from django.db import models > >> > >> # Create your models here. > >> class User(models.Model): > >> User = models.CharField(maxlength=200) > >> Pasw = models.CharField(maxlength=16) > >> def __unicode__(self): > >> return self.question > >> def was_published_today(self): > >> return self.User > >> class Admin: > >>pass > >> > >> > > > > Have you sync'd the database? Btw.: why do you give fields uppercase > > names? > > > > - Horst > > > > Lastly, why not use the built-in User model that comes with Django? Using > it allows your users to be seen by all apps under your project. > > > > > --~--~-~--~~~---~--~~ 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 from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problem to save..
On Wed, 25 Jul 2007 15:33:19 +0200, Horst Gutmann <[EMAIL PROTECTED]> wrote: > > Marco A. wrote: >> HI ! >> In model I have : >> >> from django.db import models >> >> # Create your models here. >> class User(models.Model): >> User = models.CharField(maxlength=200) >> Pasw = models.CharField(maxlength=16) >> def __unicode__(self): >> return self.question >> def was_published_today(self): >> return self.User >> class Admin: >>pass >> >> > > Have you sync'd the database? Btw.: why do you give fields uppercase > names? > > - Horst > Lastly, why not use the built-in User model that comes with Django? Using it allows your users to be seen by all apps under your project. --~--~-~--~~~---~--~~ 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 from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problem to save..
Marco A. wrote: > HI ! > In model I have : > > from django.db import models > > # Create your models here. > class User(models.Model): > User = models.CharField(maxlength=200) > Pasw = models.CharField(maxlength=16) > def __unicode__(self): > return self.question > def was_published_today(self): > return self.User > class Admin: >pass > > > > class Cit(models.Model): > Dad = models.ForeignKey (User) > Cit = models.CharField(maxlength=16) > def __unicode__(self): > return self.choice > class Admin: > pass > > > > I try in python shell to manage this model : > from mysite.polls.models import User,Cit Luigi = User(User='Luigi',Pasw='Luigi') Luigi.save() > Traceback (most recent call last): > File "", line 1, in > File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line > 247, in save > ','.join(placeholders)), db_values) > File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", > line 19, in execute > return self.cursor.execute(sql, params) > File "/usr/lib/python2.5/site-packages/MySQLdb/cursors.py", line 164, > in execute > self.errorhandler(self, exc, value) > File "/usr/lib/python2.5/site-packages/MySQLdb/connections.py", line > 35, in defaulterrorhandler > raise errorclass, errorvalue > OperationalError: (1054, "Unknown column 'User' in 'field list'") > Have you sync'd the database? Btw.: why do you give fields uppercase names? - Horst --~--~-~--~~~---~--~~ 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 from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---