Hi All,

I am completely lost. I *think* that I have read most of the doc that
i can find and I must be pretty dense, because I cannot figure this
one out ...

Let me outline what i have and where i want to go!

model:
# an X
class X(db.Model):
   user = models.ForeignKey(User, unique=True)
   name = db.StringProperty(required=True)

Form:
class XForm(forms.ModelForm):
    name = models.CharField(max_length=100)
    class Meta:
        model = X
        fields = {'name'}

views:
def add_x(request):
  return create_object(request,
                                    form_class=XForm,
                                    post_save_redirect=reverse
('myapp.views.show_x',
kwargs=dict(key='%(key)s')))

I am trying to allow authenticated users the ability to add X. I am
trying to associate a user with a specific X so that only that user
can modify it. How can I do this?
Thanks.

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

Reply via email to