Günlük

Django Models Düzenle


21 Mart 2015 16:29 tarihinde Mehmet Özgür Bayhan tarafından yazılmıştır.


Django base model:

    def __unicode__(self):
        return '%s' % self.title

    class Meta:
        verbose_name_plural = u"Günlükler"
        verbose_name = u"Günlük"
        ordering = ["-posted"]

 

Django admin save override :

    def save_model(self, request, obj, form, change):
        # custom stuff here
        obj.save()

 


Yorum Yazın:


Arama

Arşivler

"Even a man who is pure in heart, and says his prayers by night, may become a wolf when the wolfbane blooms, and the autumn moon is bright."

Listen Me!