Re: No module named shortcuts

2010-09-12 Thread Albert Hopkins
On Sun, 2010-09-12 at 08:59 -0700, jean polo wrote: > sorry but I'm not sure to get what I'm supposed to find with this ? Something in your project is shadowing the django framework's namespace, so .e.g 1. You have created your own module or package and did a import django or

Re: No module named shortcuts

2010-09-12 Thread Albert Hopkins
On Sun, 2010-09-12 at 07:28 -0700, jean polo wrote: > mmh, if I create another project and use his settings.py in the non- > working one it works.. > I can't see what's wrong with my settings file, here it is in case > someone wants to have a look at it: Then try this: $ ./manage.py shell

Re: Django + Postgres

2010-08-31 Thread Albert Hopkins
On Tue, 2010-08-31 at 04:30 -0700, Robbington wrote: > Hi, > > I seem to be having a problem setting up django and postgresql. > > I have created a database and switched users to postgres then sync'd > the database successfully in my django project directory. But it isn't > finding the admin page

Re: Ability to use PSP templates with Django?

2010-08-21 Thread Albert Hopkins
On Fri, 2010-08-20 at 14:00 -0700, Kevin wrote: > I come from the world of mod_python and really enjoyed the PSP > template system, where I can embed Python code directly in my template > for dynamically generating menus and such. > > What is the recommended method of calling a PSP template from i

Apache and mod_wsgi memory help

2010-08-05 Thread Albert Hopkins
... Or perhaps mod_wsgi is not the way to go. Basically I have this situation. I have a Django app that also has an xmlrpc interface via the wiki recipe[1]. All works fine until I enabled the ability to upload files. Since they're binary files I use the xmlrpc binary type. Well this loads th

get_or_create() method and mandatory values

2010-01-25 Thread Albert Hopkins
I have a model as such class Foo(models.Model): someattr = ... anotherattr = ForeignKey(...) >From within my view I want to do this: bar, created = Foo.objects.get_or_create(someattr=somevalue) if created: bar.anotherattr = anothervalue bar.save() But the problem is I get an exce

Re: How to query ManyToManyFields

2008-02-22 Thread Albert Hopkins
On Thu, 2008-02-21 at 17:17 -0600, Brett Hoerner wrote: > On Thu, Feb 21, 2008 at 5:06 PM, Albert Hopkins <[EMAIL PROTECTED]> wrote: > > I have a model with a M2M field and I want to filter based on the field > > being empty. How do I do this? I tried > > MyMo

How to query ManyToManyFields

2008-02-21 Thread Albert Hopkins
I have a model with a M2M field and I want to filter based on the field being empty. How do I do this? I tried MyModel.objects.filter(m2mfield=[]) but that raises a (MySQL) exception. -a --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: exclude issue with M2M Field

2008-02-12 Thread Albert Hopkins
On Tue, 2008-02-12 at 13:55 -0600, James Bennett wrote: > On Feb 12, 2008 1:46 PM, Albert Hopkins <[EMAIL PROTECTED]> wrote: > > It seems that 'exclude'ing on a M2M field does not have the effect I > > anticipated. Am I doing something wrong? Basically I have th

exclude issue with M2M Field

2008-02-12 Thread Albert Hopkins
It seems that 'exclude'ing on a M2M field does not have the effect I anticipated. Am I doing something wrong? Basically I have the following models == class Platform(models.Model): name = models.Charfield(..., unique=True) class Release(models.Model): ... platforms = models

Re: Stylesheet Inheritance

2008-02-01 Thread Albert Hopkins
On Fri, 2008-02-01 at 09:57 -0800, quizkiwi wrote: > I am having trouble getting my stylesheet to appear in each html > file. I have a base template that contains the path to the css file. > Each page that extends the base template simply adds the path of the > css file on to its current uri to