manage.py takes the wrong model for sql

2010-01-13 Thread Benjamin W.
Hi, I have a strange problem: I've just set up a development version of my app. (the app is hosted on webfaction). Now I got 2 versions off my app: myapp myapp_dev Both apps (should be) completely seperated, each has his own djago instance and a own apache. The problem: When I go to myapp_dev to

Re: Additional field in junction table

2010-01-10 Thread Benjamin W.
Guess I had some potatoes on my eyes. Thank you! On Jan 10, 7:24 pm, Daniel Roseman wrote: > On Jan 10, 5:48 pm, "Benjamin W." wrote: > > > Hi, > > > I have a model with a ManyToManyField. > > The junction table ist automatically created by django. >

Additional field in junction table

2010-01-10 Thread Benjamin W.
Hi, I have a model with a ManyToManyField. The junction table ist automatically created by django. In my application it is needed to save additional information for every relation that is created, so I would need an additional field in the junction table. It's difficult to explan, so I've created

Re: Change charset of HttpResponse

2010-01-09 Thread Benjamin W.
Thanks Karen, I'll take a look at this. On Jan 9, 6:03 pm, Karen Tracey wrote: > On Sat, Jan 9, 2010 at 11:26 AM, Benjamin W. wrote: > > how can I change the charset of an HttpRespone? > > I tried something like this: > > >    response = HttpResponse(mimetyp

Change charset of HttpResponse

2010-01-09 Thread Benjamin W.
Hi there, how can I change the charset of an HttpRespone? I tried something like this: response = HttpResponse(mimetype='text/csv') response['Content-Disposition'] = 'attachment; filename=test.csv' response['charset'] = 'ISO-8859-1' But this doesn't work - I still get an UTF-8 encode

how to get ManyToMany relations?

2009-12-27 Thread Benjamin W.
Hi there, I've problems to access manyToMany relartions. I got the following model: class ModelType(models.Model): description = models.CharField(max_length=100) def __unicode__(self): return u"%s" % (self.description) class CarModel(models.Model): descrip

Problem with serving static files

2009-11-18 Thread Benjamin W.
Hi there, I'm new to django and got my first little problem. I want to use a css file in my template. So I read this: http://docs.djangoproject.com/en/dev/howto/static-files/ I set up everything, but I don't get the file. My config: urls.py: urlpatterns = patterns('', (r'^polls/', includ