On Sunday, June 1, 2014 7:42:13 PM UTC+1, Thomas wrote:
>
>
> On 2014-05-31, at 4:41 AM, ngangsia akumbo <[email protected] 
> <javascript:>> wrote:
>
> please i need some legit answer please
>
>
> Please give one or two specific examples of functionality you need. There 
> are parameters for fields which can help specialize some behaviours without 
> needing a new model. And there are hooks to allow specialization of 
> behaviours in interpretation or handling when reading or saving values 
> which you may find useful.
>
> afaik there is no large library of model specializations for Django, but 
> that may be because there is no clear large set of specializations that 
> would be useful.
>
> So give an example please. Is it the book name, the book author, or 
> something else which needs extra or restricted behaviours?
>
>                 - Tom
>
>
This is an example. Where did the get all these parameter like CharField, 
DateTimeField etc.
 

> class Item(models.Model):
>     name = models.CharField(max_length=60)
>     created = models.DateTimeField(auto_now_add=True)
>     priority = models.IntegerField(default=0)
>     difficulty = models.IntegerField(default=0)
>     done = models.BooleanField(default=False)
> class ItemAdmin(admin.ModelAdmin):
>     list_display = ["name", "priority", "difficulty", "created", "done"]
>     search_fields = ["name"]
> admin.site.register(Item, ItemAdmin)
>
>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/44996582-811d-4731-a8d6-7133a02459b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to