Re: Some creating Forms from models snags.

2014-07-10 Thread Don Fox
Problem went away after PyCharm indicated that two imports be removed? Not really sure whet the problem was! On Wednesday, July 9, 2014 12:09:40 AM UTC-4, Lachlan Musicman wrote: > > On 9 July 2014 13:19, Don Fox wrote: > > > > > > I should have mentioned that I already

Re: Some creating Forms from models snags.

2014-07-08 Thread Lachlan Musicman
On 9 July 2014 13:19, Don Fox wrote: > > > I should have mentioned that I already had this method in the models.py: > > class Article (models.Model): > pub_date = models.DateField() > headline = models.CharField(max_length = 30) > content =

Re: Some creating Forms from models snags.

2014-07-08 Thread Don Fox
On Tuesday, July 8, 2014 10:30:23 PM UTC-4, Lachlan Musicman wrote: > > There is no class Article in any of those blocks. That's why. > > Try adding this to models.py this: > > class Article(models.Model): > name = models.CharField(max_length=25) > body = models.TextField() > author =

Re: Some creating Forms from models snags.

2014-07-08 Thread Lachlan Musicman
Or something like this: https://docs.djangoproject.com/en/1.6/intro/overview/ L. On 9 July 2014 12:29, Lachlan Musicman wrote: > There is no class Article in any of those blocks. That's why. > > Try adding this to models.py this: > > class Article(models.Model): > name =

Re: Some creating Forms from models snags.

2014-07-08 Thread Lachlan Musicman
There is no class Article in any of those blocks. That's why. Try adding this to models.py this: class Article(models.Model): name = models.CharField(max_length=25) body = models.TextField() author = models.ForeignKey(Author) That should help. cheers L. On 9 July 2014 11:31, Don Fox