Yeah. I did think that. As far as I'm aware there aren't any errors in any of the views, however the views.py file for scripts it is an empty file. I'm guessing this is the problem in itself.
Is it syntactically correct to have a views.py which is empty but exists? I'm not really sure of the process Django will use to validate the view. I've also pasted the stack trace to Dpaste: http://dpaste.com/64942/ On Jul 14, 8:35 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi Mike, > > > > > > > I'm running a standalone script outside of the web server to do some > > maintainence tasks. > > > In particular I need to return the absolute url from one of my models, > > however when I call the get_absolute_url() method, I'm getting a > > ViewDoesNotExist exception raised. A view exists however upon further > > investigation I've found that this line of code is causing me some > > real problems: > > > return urlresolvers.reverse('satchmo_product', kwargs={'product_slug': > > self.slug}) > > > Basically it appears that Django is concatenating the view path or > > similar, so instead of either searching in: > > satchmo.shop.views or satchmo.scripts.views > > > Its actually searching in satcho.shop.views.satchmo.scripts.views > > > Anyone got any idea how I could overide Django to tell it where to > > search for the view or similar? > > Do you have a stack trace you can DPaste? > > The urlresolvers.reverse function throws an exception if *any* of your > URLs anywhere in the project have a bad view and not necessarily the > one you are trying to reverse map. So, check that you don't have any > URL mappings with undefined view functions (or views with syntax > errors). > > Since 'satchmo_product' is a named URL mapping, Django should resolve > that to the right Satchmo view directly without going through any > searches. > > -Rajesh D --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---