This is probably more of a Python question than a Django question but
I am having a little trouble referencing sibling packages.

My structure is like so:

projectpath/
  - app1/
       views.py
       forms.py
          class Form1
  - app2/
       views.py
       forms.py

Alright, I would like to reuse one of the forms, say Form1 inside of
the views for app2. So inside of the function I try this:

def viewfunction(request):
 from app1.forms import Form1

which fails pretty badly, I have also tried this:

def viewfunction(request):
  from projectpath.app1.forms import Form1

If anyone knows how to reuse classes from one application directory to
another please let me know your secrets :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to