thnx jonas...i figured datz wat i mite do...so django has a limitation on imports like in da case i mentioned?
On Mar 29, 2:51 pm, Jonas Obrist <ojiido...@gmail.com> wrote: > On 03/29/2010 10:28 AM, vamsy krishna wrote: > > > hi...am very new to django and am having some problem with my code... > > > say i've two modules...mod1 n mod2...n views in both modules have > > certain generic functions which i need to import from each other...as > > in > > > (in views.py of mod1) > > > from mod2.views import xyz > > > (and in views.py of mod2) > > > from mod1.views import abc > > > and this ofcourse is throwing an import error saying cannot import > > name xyz...how do i get this working? thanks in advance > > I recommend creating an utils.py (or however you want to name that) and > put 'xyz' and 'abc' in there. Then do: > > in mod1.views.py: > > from utils import xyz, abc > > in mod2.views.py: > > from utils import xyz, abc -- 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.