On Tue, Jun 14, 2011 at 1:53 PM, Satyajit Sarangi
<[email protected]> wrote:
> I want to create a model that brings user_id of the user_auth table as
> foreign key , layer_id from layer table(defined by me) as also a
> foreign key . Combine both to form a primary key . and have another
> integer called perm .
> My model looks like this
>                        perm.table = user_type =
> ContentType.objects.get_for_model('maps_parking')

https://docs.djangoproject.com/en/1.3/ref/contrib/contenttypes/#django.contrib.contenttypes.models.ContentTypeManager.get_for_model

get_for_model takes a model type (eg User) or a model instance. It
does not take a string.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to