In the Creating forms from Models documentation 
*https://docs.djangoproject.com/en/1.6/topics/forms/modelforms/ *I'm having 
some problems.

First I'm placing the code from the first block (green section), where the 
class ArticleForms is defined in the shell in a *forms.py *file in a myapp 
app of a project.

Second, the models in the second and third green blocks are located in the 
myapp/models.py with the class AuthorForm and class BookForm classes in the 
from the first block commented out.  


On arriving at the 4th green block that has

>>> from myapp.models import Article>>> from myapp.forms import ArticleForm

I get this response from a syncdb:



File 
"/Users/donfox1/Projects/DjangoExplorations/PycharmProjects/classBased/myapp/forms.py",
 
line 17, in <module>

    from myapp.models import Article

ImportError: cannot import name Article

DONs-iMac:classBased donfox1$ 


Can anyone tell me why I can't import my Article class from my 
app/models.py.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d0812a2c-ef08-4615-8255-7657ad6c49e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to