Re: Is it safe to alter Django generated tables in MySQL to have composite PK?

2010-05-02 Thread johan sommerfeld
I tried this before and I think it was the admin app that broke. Also ser this link http://code.djangoproject.com/wiki/MultipleColumnPrimaryKeys /J On Saturday, May 1, 2010, Continuation wrote: > > On Apr 30, 9:42 pm, Nick Arnett wrote: > >> If you don't have data in the table, just drop it an

Re: Problem using django-typogrify and smartypants

2010-04-14 Thread johan sommerfeld
Have you tried to run the actual code in django shell? Have you imported it corectly (paste some code from where the exception gets thrown. /J On Thursday, April 15, 2010, HiddenWolf wrote: > Hi all, > > I'm trying to get a blog app working, and I keep running into the > weirdest error. > > Bot

Re: ChoiceField invalid literal for int() with base 10: ''

2010-04-13 Thread johan sommerfeld
You could try using initial=0. /J On Tuesday, April 13, 2010, geraldcor wrote: > Hello all, > > I know the error "invalid literal for int() with base 10: '' " has > been discussed a lot in the past, but this seems to be unique to my > situation. > > I have 2 choice fields as defined below for b

Re: Is the DoesNotExist exception the only way to check if an object exists?

2010-04-09 Thread johan sommerfeld
If you don't want to use exception (which I do when doing something similar). You can use filter and then check the length of the array returned. def my_view( request , pk ): obj = Class.objects.filter( pk = pk) if len(obj) != 1: return bad_key_view obj = obj[0] # Do someth

Re: Error when following the tutorial

2010-04-08 Thread johan sommerfeld
Sometimes removing all .pyc files helps. /J On Wed, Apr 7, 2010 at 11:39 PM, Shawn Milochik wrote: > Try to do ./manage.py shell and import your poll model. > > Once you can do that, you will have figured out the solution to this > problem as a by-product. > I don't expect it to work first try,

Re: Considering Django: How simple is customising django-admin?

2010-04-08 Thread johan sommerfeld
#1 This can be done. One to Many and foreign keys shows up in django admin as multiple choice or select box. You can also make foreign key related models inline meaning that you can add one or possibly multiple entries to another model and automatically reference them to the entry you are about to

Re: Deployment with Apache. Help !

2010-04-07 Thread Johan Sommerfeld
I had a similar problem when I went from "manage.py runserver" It was because I had some debugging prints within the code. Could it be that? /J On 7 apr 2010, at 17.09, Pep wrote: > Hi everybody ! > > I didn't find the answer. I deployed my django project on a webserver > with apache. First, I