Re: [Django] #11985: not generating all fields

2009-10-06 Thread Django
#11985: not generating all fields
+---
  Reporter:  maciejplonski  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution:  worksforme |  Keywords:  orm   
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by kmtracey):

  * status:  reopened => closed
  * resolution:  => worksforme

Comment:

 Cutting and pasting exactly what you have posted into a new app's
 models.py file, adding an import for datetime, and running manage.py sql
 on the new app, produces SQL that includes the is_mod and is_active
 fields:

 {{{
 k...@lbox:~/software/web/playground$ python manage.py sql 
 BEGIN;
 CREATE TABLE "_user" (
 "id" integer NOT NULL PRIMARY KEY,
 "username" varchar(30) NOT NULL UNIQUE,
 "first_name" varchar(30) NOT NULL,
 "last_name" varchar(30) NOT NULL,
 "email" varchar(75) NOT NULL,
 "public_email" bool NOT NULL,
 "password" varchar(128) NOT NULL,
 "is_active" bool NOT NULL,
 "is_mod" bool NOT NULL,
 "last_login" datetime NOT NULL,
 "date_joined" datetime NOT NULL
 )
 ;
 COMMIT;
 }}}

 Really, Django SQL generation for tables is not fundamentally broken.
 Whatever is going on is something weird in your setup.  The right place to
 figure out what that is is django-users or the IRC channel.

 I will also note you posted the model definitions for 'user' and 'group'
 but the SQL generated for 'fuser' and 'fgroup'.  You really need to post
 (in one of those other places, not here) exactly what you are using, not
 something kind of like it.  Figuring out what is wrong with something kind
 of different from what you are actually using is going to be very hard.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11985: not generating all fields

2009-10-06 Thread Django
#11985: not generating all fields
+---
  Reporter:  maciejplonski  | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution: |  Keywords:  orm   
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by maciejplonski):

  * status:  closed => reopened
  * resolution:  worksforme =>

Comment:

 no, I deleted database and did syncdb again - there is still no 'is_mod'
 and 'is_active' field in database

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11985: not generating all fields

2009-10-05 Thread Django
#11985: not generating all fields
+---
  Reporter:  maciejplonski  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution:  worksforme |  Keywords:  orm   
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => worksforme
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I suspect the problem here is that you have previously synchronized the
 database, and it's the old table you are seeing.

 Regardless, this is a user query, not a bug - it should be asked on
 django-users, not the ticket tracker.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11985: not generating all fields

2009-10-05 Thread Django
#11985: not generating all fields
---+
 Reporter:  maciejplonski  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.1   
 Keywords:  orm|   Stage:  Unreviewed
Has_patch:  0  |  
---+
 hi,

 got model:


 {{{
 class user(models.Model):
 username = models.CharField('login', max_length=30, unique=True)
 first_name = models.CharField('imie', max_length=30, blank=True)
 last_name = models.CharField('nazwisko', max_length=30, blank=True)
 email = models.EmailField('e-mail', blank=True)
 public_email = models.BooleanField('pokazac e-mail publicznie?',
 default=False)
 password = models.CharField('password', max_length=128)
 is_active = models.BooleanField(default=False)
 is_mod = models.BooleanField(default=False)
 last_login = models.DateTimeField('ostatnio zalogowany',
 default=datetime.datetime.now)
 date_joined = models.DateTimeField('data rejestracji',
 default=datetime.datetime.now)
 }}}

 but after generating tables in sql, there is no 'is_mod' and 'is_active'
 field in the table with users, but field 'public_email' exists in the
 database

 to be more complicated, I've got also another model in this app:

 {{{
 class group(models.Model):
 name = models.CharField('nazwa', max_length=80, unique=True)
 is_mod = models.BooleanField('jest moderatorem', default = False)
 }}}

 and in the table with groups, field 'is_mod' exists

 sqlall is giving:

 {{{
 BEGIN;
 CREATE TABLE `users_fgroup` (
 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
 `name` varchar(80) NOT NULL UNIQUE,
 `is_mod` bool NOT NULL
 )
 ;
 CREATE TABLE `users_fuser` (
 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
 `username` varchar(30) NOT NULL UNIQUE,
 `first_name` varchar(30) NOT NULL,
 `last_name` varchar(30) NOT NULL,
 `email` varchar(75) NOT NULL,
 `public_email` bool NOT NULL,
 `password` varchar(128) NOT NULL,
 `last_login` datetime NOT NULL,
 `date_joined` datetime NOT NULL
 )
 ;
 COMMIT;
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---