custom FORMAT_SETTINGS

2016-03-19 Thread Erik Stein
hello -- I'd like to extend Django's localized formats by my own defaults, using the FORMAT_MODULE_PATH setting, e.g. to have those: SHORT_DAY_ONLY_FORMAT = 'd.' SHORT_DAYMONTH_FORMAT = 'd.N.' DATE_RANGE_SEPARATOR = '–' Sadly, in django.utils.formats.get_format Django checks the hard coded

Re: custom FORMAT_SETTINGS

2016-03-18 Thread Erik Stein
Nevermind, I reused the locale-directory for the format-definitions and didn't realize, that the path has to be a python module (or: didn't realize, that the locale directory isn't a module by default). best -- erik On 18.03.2016 11:08, Erik Stein wrote: hello -- I&#

Promote a Place to a Restaurant?

2008-10-17 Thread Erik Stein
Hello -- I could not get an answer on the IRC channel and I'm also not finding the right keywords for a successful search on the subject[1]: You all know the model inheritance example with the classes Place and Restaurant. Imagine I mapped every Place in my street, now one of this empty p

Re: Django Admin Model View Page

2008-06-04 Thread Erik Stein
Ali -- I'm doing a lot of adaptions in newforms-admin, take a look at the ModelAdmin class and it's __call__ method. -- erik Am 04.06.2008 um 23:54 schrieb Ali Sogukpinar: > I am working on a small CRM solution for our internal use. Admin > application is providing almost all the functional

psycopg2 failing in test suite

2007-11-12 Thread Erik Stein
I just migrated the database of my django project from mysql to postgresql. Tested with the development server, the application seems to run fine, but if I run my test suite, the psycopg2 driver fails before the first test passes. psycopg2.InterfaceError: connection already closed

Re: Prevent setting a primary key (compound uniqueness)

2007-10-17 Thread Erik Stein
Am 17.10.2007 um 14:43 schrieb Erik Stein: > Is there a way to tell django not to set a primary key on a table > (and then doing it with custom sql)? Answering myself: To make django happy a define primary_key=True for one of the fields. I added a custom sql file for the

Prevent setting a primary key (compound uniqueness)

2007-10-17 Thread Erik Stein
I know the ticket [1] and the FAQ [2] and the wiki page [3] concerning "Multi-Column Primary Key support". My (legacy) table with ~25000 rows is a m2m-Model, which means that uniqueness must be calculated on the whole row. In other words, no single column can have a constraint on uniquenes