Custom Admin Form for listing all url

2013-11-02 Thread Vanni Brutto
hi, i want to make a custom form in admin.py for modify the form of a model that should show a combobox with all urlpattern name defined in urls.py. I tryed with this code (i'm a python/django newbie, sorry ;)): def fasullo(): pass class NameURLForm(forms.ModelForm): class Meta:

Re: ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before access

2013-11-02 Thread hjwp
Weirdly I'm getting this error when I 'am' running manage.py. I'm doing something slightly weird, in that I'm using Popen from inside another python process to run python manage.py. Still, it worked a few weeks back and just started happening. Any tips on where to look to debug it? On Thursd

Re: Complex query reduction

2013-11-02 Thread Daniele Procida
On Fri, Nov 1, 2013, Javier Guerra Giraldez wrote: >have you tried eliminating the second IN relationship? something like > >entities = entity.get_descendants() > >items = BibliographicRecord.objects.filter >(authored__researcher__person__member_of__entity__in=entities).distinct() Indeed I have

Re: psycopg2._psycopg.cursor missing cursor.fetchnone/cursor.fetchall

2013-11-02 Thread Vernon D. Cole
One problem you are having is a typographical error: The cursor method is "Fetch One" not "Fetch None". On Friday, November 1, 2013 8:46:17 AM UTC+1, hjr1 wrote: > > Hi all. > > I am trying to use django.db.connection with psycog2 (postgres). I can run > something like cursor=connection.curs