OS X install, not in home directory?

2010-04-24 Thread Rob
Hi, Maybe this is more of a general python question, but when I run `sudo python setup.py install` it insists on putting the django package in ~/ Library/Python/2.6/site-packages. I want to install it in the system site-packages, so it get's picked up by apache and mod_wsgi. For now I'll hand co

Re: OS X install, not in home directory?

2010-04-24 Thread pjmorse
On Apr 24, 3:03 am, Rob wrote: > Maybe this is more of a general python question, but when I run `sudo > python setup.py install` it insists on putting the django package in ~/ > Library/Python/2.6/site-packages.  I want to install it in the system > site-packages, so it get's picked up by apache

Localization and date format

2010-04-24 Thread pjmorse
Is there any way to force a particular localization on date formatting? Our site (Django 1.0.2, Python 2.5) was set up with "UK" as the language code for the U.K. This apparently didn't cause any problems for years, but now that the person who made that decision is out of arm's reach, it's been di

Test failing on @login_required view

2010-04-24 Thread eka (Esteban)
Hi all, I'm trying to build a test for a view that's decorated with @login_required, since I failed to make it work, I did a simple test and still can't make it pass. Here is the code for the simple test and the view: def test_login(self): user = self._create_new_user() self.assertTrue(u

Re: error with forms

2010-04-24 Thread Daniel Roseman
On Apr 17, 1:14 am, JoJo wrote: > Hi all, i have an error here im not sure what it means can anyone help > me > > here is my models.py file## > class AddStuffForm(forms.Form): > >         title = forms.CharField(max_length=100) >         body = forms.CharField(widget = forms.Textarea()) > >      

Re: form class

2010-04-24 Thread Daniel Roseman
On Apr 23, 9:03 pm, xpanta wrote: > Thank you for the answers. > > The link provided by George is an excellent resource and I should > thank him for that. > > However my task is a bit simpler. Let's say I own a car company and I > have dealers in various cities. By clicking on each city name I get

Re: Localization and date format

2010-04-24 Thread Skylar Saveland
I presume that you mean date formatting in the templates: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date you can use the strftime format bits iirc: http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior you can set the default with a setting http://docs.