#5634: Queryset in newform: form_for_model()
------------------------------------------------------+---------------------
Reporter:  MarioGonzalez <gonzalemario @t gmail.com>  |       Owner:  nobody    
   
  Status:  new                                        |   Component:  
Uncategorized
 Version:  SVN                                        |    Keywords:            
   
   Stage:  Unreviewed                                 |   Has_patch:  0         
   
------------------------------------------------------+---------------------
 Hello:

  I usually show forms using form_for_model(), however there's something I
 think is missing. My model is something like:


 {{{
 class TransferFile(models.Model):
         file = models.FileField(upload_to="/some/path/in/my/system/")
         owner = models.ForeignKey(User, db_column="owner", db_index=True)
         authorized_account = models.ManyToManyField(User,
 related_name="authorized_account")

         class Admin:
                 pass

         class Meta:
                 permissions = (
                         ('send_file', 'Can send files'),
 }}}


 In my DB I've got lot of users, each one with different groups and
 permissions, and I don't want to show them in my form. So, I want to pass
 a parameter in form_for_model() to change the queryset. I wrote a patch
 for that, I know it needs improvements but it's for explain my idea.
 Please see the talk we're having in http://groups.google.com/group/django-
 developers/t/1e4714a469a1a814

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5634>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to