Can anyone explain why reverse() never seems to work?

2008-12-20 Thread Bradley Wright
Given the following code, can anyone explain why Django can't reverse this, because I'm of the opinion that reverse is the flakiest function ever: << models.py >> class Post(models.Model): """created is a datetime object""" @permalink def get_absolute_url(self): params = dict

Re: Can anyone explain why reverse() never seems to work?

2008-12-21 Thread Bradley Wright
Cheers, I was just doing something stupid then. :) --~--~-~--~~~---~--~~ 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 grou

Re: Overwriting Django Authentication / Session Logic

2008-12-21 Thread Bradley Wright
I have the same issue, but my issue is that Django is interfacing with a web service and ideally will have *no user database* on the front end. All the examples I've seen involve essentially copying the user from LDAP/wherever and sticking them in the User model, which: a) Is duplication across s

Re: Request dictionary in view

2008-12-21 Thread Bradley Wright
Request isn't ending up in the context, try installing: http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request It's not enabled by default, and you need it to make request available in templates. --~--~-~--~~~---~--~~ You re

Re: Overwriting Django Authentication / Session Logic

2008-12-21 Thread Bradley Wright
On Sun, Dec 21, 2008 at 8:00 PM, Sahil R Cooner wrote: > You don't have to store anything in the database you can just use the models > to store > information then return that the user is authenticated...I can post a code > example for you I > have made using ldap auth without storing to a data

Re: Creating Dybamic "models"

2008-07-20 Thread Bradley Wright
On Jul 20, 8:45 am, festersen <[EMAIL PROTECTED]> wrote: > > In a more upscaled version I > > could have 10 different article types, where all of them are slightly > > different. > > maybe you want to read some notes about "inheritance" The "inheritance" being referring to: http://www.djangoproj

Re: Multi-Table DB Inheritance (Finding Child Model)

2008-07-25 Thread Bradley Wright
On Jul 25, 7:03 am, "Adam Fast" <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using Multi-Table Inheritance as the basis of a tumblelog - all > the common pieces of data are stored on the base class / table > (StreamItem) > > I'm doing a StreamItem.objects.all() and looping through the items. > But

Re: Apache ImportError: Could not import settings

2009-02-02 Thread Bradley Wright
I had the following vhost.conf, which worked for me (before I switched to WSGI): NameVirtualHost 127.0.0.1 # dynamic Django site ServerAdmin myem...@mysite.com ServerName mysite.com SetHandler python-program PythonHandler django.core.handlers.modpython PythonDebug Off

Re: mod_python and import path

2009-02-08 Thread Bradley Wright
On Feb 8, 4:39 am, Jeff wrote: > I installed django today and have not been able to get it to work with > apache, or itself really.  I have the path in the sys.path and have > set the settings module to point to it, but it cannot find it.  It > works fine when I use 'python manage.py shell' or 'p

Re: mod_python and import path

2009-02-08 Thread Bradley Wright
On Feb 8, 4:25 pm, Jeff wrote: > I actually got it to work by changing the PYTHONPATH from '/var/www/ > django/legend' to just '/var/www/django'.  Not sure if this is only > due to my version of python or what.  But thank you for the help. It's because Python tries to look inside the directories

Managing static assets in Django - almost solved

2009-02-27 Thread Bradley Wright
As an ex-Yahoo!, I'm usually looking for ways to improve my YSlow [1] and static asset handling capabilities in any project. Traditionally, this is something Django has been very weak at, as it focuses mostly on the database and application stack of the project. So between myself and a colleague w

Re: Django HTML Editor

2008-06-14 Thread Bradley Wright
On Jun 14, 7:06 am, Ngu Soon Hui <[EMAIL PROTECTED]> wrote: > I want a free HTML editor that is compatible with Django template's > syntax. I just want to edit my Django power application's HTML faster. > When I say compatible, I mean that the editor shouldn't screw up all > the Django template's

Re: Is it bad to use GET parameters for model entities management in my views?

2008-06-19 Thread Bradley Wright
Hi, On Jun 19, 4:31 am, Vasiliy Gladkov <[EMAIL PROTECTED]> wrote: > As i want to allow site editor to edit pages in convenient way without > built-in django admin, i use request.GET parameters like "http:// > localhost:8000/somepage?action=edit" Like inline editing (Flickr-style), right? > A

Re: upload is working, but how to store the path in the imagefield?

2008-06-21 Thread Bradley Wright
It gets saved to your MEDIA_ROOT directory, unless you specify: http://www.djangoproject.com/documentation/model-api/#filefield image = models.ImageField(upload_to='some/path') which will upload the image to that directory under the MEDIA_ROOT path. If you're using a custom form, you also ne

Re: Stability of trunk and 1.0 target: experience, testimonials?

2008-07-03 Thread Bradley Wright
Hi, On Jul 3, 6:58 am, Ramdas S <[EMAIL PROTECTED]> wrote: > It is any day better than PHP.. This is almost definitely the wrong list to be writing comparisons, but as a long-time PHP user (and now a Django user), I have to say that PHP is not as bad or useless as Python apologists tend to make