On Mon, Jun 15, 2009 at 4:39 PM, greatlemer <greatle...@googlemail.com>wrote:
> > Hi everyone, > > I was creating some custom template tags and attempted to import my > models through the following import at the top of the file: > > from ..models import * > > Unfortunately this seems to be attempting to import from django.models > (which doesn't exist) rather than myapp.models and therefore throws up > an error when I try to use it. Is there any possible way that I will > be able to perform this import without specifying the app name (as I > was trying to keep things as generic as possible) or am I just going > to have to bite the bullet and hard-code the app name in there? > > Cheers, > > G > > > Unfortunately for the time being you're going to need to bite the bullet. Django does some *very* nasty things when loading templatetags that are almost certainly the source of your problem. This is considered a bug, however it won't get fixed until the 1.2 release cycle in all likelyhood (only bugs that break things very badly are being considered for 1.1 at this point). Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---