Re: problems with custom template library

2008-02-03 Thread Jonathan Lukens
This is a good idea for consistency, but did nothing to fix the problem. Is the a Category class somewhere in Django that I don't know about that could be conflicting?? On Feb 3, 2008 8:15 AM, Ned Batchelder <[EMAIL PROTECTED]> wrote: > It looks like you are using different styles of importing

Re: problems with custom template library

2008-02-03 Thread Ned Batchelder
It looks like you are using different styles of importing your models in different places: views.py: from weblog.models import Category, Entry blog_extras.py: from lukenslanguages.weblog.models import Entry I can't quite see how that leads to your "cannot import name Category" error,

Re: problems with custom template library

2008-02-03 Thread jonathan . lukens
Hi Ned, I figured as much, but since without the 'try' made no difference, I thought I'd give it a whirl here is the source. 'lukenslanguages' is the project directory. #lukenslanguages/weblog/models.py from django.db import models class Category(models.Model): name = models.CharField

Re: problems with custom template library

2008-02-03 Thread Ned Batchelder
When Kenneth suggested "try: @register.filter", he meant, try: "@register.filter", that is, the word "try:" was not meant to go in the file. You may have an import problem in your models file. Can you post more of the source so that we can take a look? --Ned. http://nedbatchelder.com/blog [E

Re: problems with custom template library

2008-02-03 Thread jonathan . lukens
Thanks for the input. > try: @register.filter <--- without the '()' so long as this is in the file, I get a syntax error if I run the file from the command prompt, with the caret pointing to the '@', with or without the '()'. I get the same thing if I do this after the function: try: register

Re: problems with custom template library

2008-02-02 Thread Kenneth Gonsalves
On 03-Feb-08, at 8:06 AM, [EMAIL PROTECTED] wrote: > @register.filter() try: @register.filter <--- without the '()' -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ Foss Conference for the common man: http://registration.fossconf.in/web/ --~--~-~--~

Re: problems with custom template library

2008-02-02 Thread Kenneth Gonsalves
On 03-Feb-08, at 8:06 AM, [EMAIL PROTECTED] wrote: > I have tried 'breaking' the filter module by entering all manner of > syntax errors in the file, deleting the import statements, leaving it > blank, etc. No matter what I do the error message is the same. this error message is hardcoded - it