Re: how to debug restful django apps?

2010-07-27 Thread berto
Do you have access to the Django app? Can you set settings.DEBUG = True to get the full traceback? If you set the ADMINS tuple in the settings you also can get an email with the traceback when DEBUG = False. The email backend can also be configured with the EMAIL_BACKENDS setting, so you can, fo

testing with multiple databases

2010-07-27 Thread berto
Hello Djangonauts, I am using django in an application that has multiple distinct databases, each with unique data (i.e. not master/slave type configuration). I've created an app (django-admin.py startapp) for each database and the settings.py defines DATABASE_ROUTERS where I specify what databas

Using a ManyToManyField's intermediate table?

2006-11-19 Thread berto
Hi, I created a couple of models: PreferenceOption(models.Model): name = models.CharField(maxlength=32) [...] Preference(models.Model): name = models.CharField(maxlength=64) options = models.ManyToManyField(PreferenceOption, blank=True, null=True) [...] In the database this

Re: ImageField

2006-10-18 Thread berto
subject = models.CharField(maxlength=64) body = models.TextField() images = models.ManyToManyField(Image, null=True, blank=True) --- That's off the top of my head, but it should work. Now you can have zero or as many images as you need in your blog post. -berto. On Oct 16, 2:38 am, &qu

Override automatic manipulators

2006-10-05 Thread berto
cle's AddManipulator would make entry.type.name = 'myproject.myapp.Article'. I have found some threads discussing how to make an Add/ChangeManipulator, but they don't cover how to override the default ones. Is this not possible or discouraged for som

Re: Generically reference an app?

2006-06-18 Thread berto
Awesome, thanks! Here's the relevant bit for anyone else that stumbles upon this entry: from django.db.models.loading import get_app desired_app = get_app('desired_app') from desired_app.models import SomeModel --~--~-~--~~~---~--~~ You received this message bec

Generically reference an app?

2006-06-18 Thread berto
rrent project? Something like: from django.thisproject.apps.some_app import SomeModel This would be very similar to the way one accesses the settings.py stuff using: from django.conf.settings import FOO Thanks! -berto. --~--~-~--~~~---~--~~ You received this me

Delete session on server?

2006-04-24 Thread berto
Hi everyone, Is it possible to delete a user's session on the server? For example, say I log into the admin section on a public machine and don't log out. Is there a session file that I can delete on the server? In PHP world, it was possible to delete the sess_* from a temp directory. Is ther

top-level model

2006-01-07 Thread berto
ch entry user and group permissions (not even attempted yet). Any advice is greatly appreciated. Thanks! -berto.