(self, app, model)
return {
            'app_label': app.label,
            'app_path': app.path,
            'model': model,
            'model_name': model_name,
            'model_name_slug': self.camel_to_slug(model_name),
            'model_name_plural': model_name_plural,
            'model_name_plural_slug': self.camel_to_slug(model_name_plural),
            'model_fields': self.get_field_names_for_model(model),
            'slug_field': slug_field,
            'slug_field_name': slug_field_name,
            'lookup_field': lookup_field
        }
Creates a dictionary of model attributes that will be used in the templates.
Creates a dictionary of model attributes that will be used in the templates.
Creates a dictionary of model attributes that will be used in the templates .
def model_attributes(self, app, model):
        """
            Creates a dictionary of model attributes that will be used in the templates.
        """
        model_name = model.__name__
        model_name_plural = self.model_name_plural(model)
        slug_field = self.get_unique_slug_field_name(model)
        slug_field_name = slug_field.name if slug_field else "slug"
        lookup_field = slug_field_name if slug_field else "pk"
        return {
            'app_label': app.label,
            'app_path': app.path,
            'model': model,
            'model_name': model_name,
            'model_name_slug': self.camel_to_slug(model_name),
            'model_name_plural': model_name_plural,
            'model_name_plural_slug': self.camel_to_slug(model_name_plural),
            'model_fields': self.get_field_names_for_model(model),
            'slug_field': slug_field,
            'slug_field_name': slug_field_name,
            'lookup_field': lookup_field
        }
def model_attributes ( self , app , model ) : model_name = model . __name__ model_name_plural = self . model_name_plural ( model ) slug_field = self . get_unique_slug_field_name ( model ) slug_field_name = slug_field . name if slug_field else "slug" lookup_field = slug_field_name if slug_field else "pk" return { 'app_label' : app . label , 'app_path' : app . path , 'model' : model , 'model_name' : model_name , 'model_name_slug' : self . camel_to_slug ( model_name ) , 'model_name_plural' : model_name_plural , 'model_name_plural_slug' : self . camel_to_slug ( model_name_plural ) , 'model_fields' : self . get_field_names_for_model ( model ) , 'slug_field' : slug_field , 'slug_field_name' : slug_field_name , 'lookup_field' : lookup_field }