I am trying to add django permissions when a type add a source iusing the
following model
from __future__ import unicode_literals
from django.db import models
"""Class for Data Sources"""
class DataSource(models.Model):
display_name = models.CharField(max_length=20)
code_name = models.CharField(max_length=20)
def __unicode__(self):
return self.display_name
list_display = ['display_name', 'code_name', ]
search_fields = ['display_name', 'code_name', ]
""" Class for Data Types"""
class DataType(models.Model):
display_name = models.CharField(max_length=20)
code_name = models.CharField(max_length=20)
data_sources = models.ManyToManyField(DataSource)
for data_source in data_sources:
def __unicode__(self):
return self.display_name
list_display = ['display_name', 'code_name', ]
search_fields = ['display_name', 'code_name', ]
I want it to add auth|permission|type Type equals what ever the type is
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/18a9c567-0a76-4068-a787-c7553eac8fd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.