In my case this work well: from ..forms import MessageSearchForm
Maybe we have other solution for this? On 23 сен, 16:46, Anton Danilchenko <anton.danilche...@gmail.com> wrote: > Hi! > > I have created templatetag (used Django 1.2.3) in templatetags/ > board.py file. I need import form class from application. > > Structure of project is: > + board/ > +++ views.py > +++ forms.py > +++ templatetags/ > +++++ board.py > + ... some other project applications ... > > How can I do import of form from the file forms.py? > > I try to do this: > 1) from models import Message > 2) from board.models import Message > 3) from myprojectname.board.models import Message > > All this not work and show error message like this: "'board' is not a > valid tag library: ImportError raised loading > board.templatetags.board: No module named models" > > Please help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.