Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#20431 closed Uncategorized (invalid)

syc db reference - needed in tutorial doc - after poll/ adds unicode and was_published_recently()

Reported by: David Sadler Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


I'm a complete newbie, and this might be unimportant. However, for others like me...

I had to go back and syncdb after modifying the Poll/ file to include unicode and more importantly the was_published_recently. Otherwise the shell complains, and it disrupts the "step-by-step".

I hope this is helpful and not a waste of your time.

I'm super impressed with django! having worked a lot with SQL over the years, and accustomed to creating tables, fields, indx etc by hand. Your synch db is almost like magic to me! Maybe this is a motivator while I'm requesting it be pointed out again =)


Change History (3)

comment:1 Changed 5 years ago by slave2theman@…

Your captcha spam detector is super annoying!

comment:2 Changed 5 years ago by Baptiste Mispelon

Resolution: invalid
Status: newclosed


Thanks for your report.

You don't need to run syncdb when adding methods to an existing model (syncdb is necessary when you add new models).

What you need to do however is restart the shell, but that's already mentionned in the documentation: "Save these changes and start a new Python interactive shell by running python shell again."

In consequence, I'm marking this as invalid.

comment:3 Changed 5 years ago by Horst Gutmann

Is was_published_recently a new field of the model that should be persisted in the database? If so then yes, you have to update the database somehow, be it via resetdb/syncdb/... or a migration using something like Django South.

Note: See TracTickets for help on using tickets.
Back to Top