﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2360	user centric/object centric generic crud tools	django@…	Jacob	"Hi,

I am trying to figure out the best way to deal with object/user centric
object creation. I am building a site that lets users create objects
tied to their identities, for e.g. having users posting news entries,
etc.

Currently one can make a wrapper to deal with checking a user's access
for viewing (object_detail), editing (update_object), and deleting
(delete_object), since we have an object instance which we can fetch
and do some tests on, prior to handing it to a generic view. (or better
yet, dealing with object.related_set)  (this is discussed on
http://www.b-list.org/weblog/2006/07/03/django-tips-scaling-application
and
http://www.pointy-stick.com/blog/2006/06/29/django-tips-extending-gen...
)

Unless I am mistaken, one cannot use the create_update.create_object
function with one of the model's fields pre-populated (in this case,
user_id/author_id). This is unfortunate, since it means making a custom
function for object creation.

I am trying to figure out a way to build a generic function for
relational object creation. i.e. being able to call something like
create_update.create_object(model=Post,relation=user.post_set) so the
function could call relation.create(instance based on form data). This
would also hide/ignore the POSTed settings which are immutable (i.e.
user's id)

Am I missing something, or is this possibly something that should go
into generic views, or should I code my own function? Can it be made
generic enough. "	enhancement	closed	Generic views		normal	wontfix			Unreviewed	0	0	0	0	0	0
