Guest User

Untitled

a guest
Jul 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. # the coolness:
  2. limited_choices = {'app_label':'regions', 'model__in':('regionpoint', 'regionshape')}
  3. content_type = models.ForeignKey(generic_models.ContentType, limit_choices_to=limited_choices)
  4.  
  5. #where limited choices is like the **kwargs for a filter command
Add Comment
Please, Sign In to add comment