btw. here is a full code:

models.py
http://snipt.net/vedran/django-models-cannot-assign-none?key=ba151d53cbe8e7c6fd8cfd7993c72897

admin.py
http://snipt.net/vedran/django-admin-cannot-assign-none?key=53222b89cf415d0a0a7750f1510ab8a1

so... when i go to create new Actual item i get this error:
Cannot assign None: "Actual.published" does not allow null values.




On Nov 27, 10:57 pm, onoxo <vedran.ko...@gmail.com> wrote:
> i get this error when i try to create new item in admin site.
>
> here is my models.py
> import datetime
> from django.db import models
> from tinymce import models as tinymce_models
> from filebrowser.fields import FileBrowseField
>
> class ItemWithMedia(models.Model):
>     created = models.DateTimeField(auto_now_add=True)
>     modified = models.DateTimeField(auto_now=True)
>
> class Actual(ItemWithMedia):
>     published = models.DateField('Published')
>     title_hr = models.CharField('(hr)', max_length=200)
>     title_en = models.CharField('(en)', max_length=200)
>     body_text_hr = models.TextField('(hr)')
>     body_text_en = models.TextField('(en)')
>
>     def __unicode__(self):
>         return self.title_hr
>
>     class Meta:
>         verbose_name = "Aktualno"
>         verbose_name_plural = "Aktualni"
>         ordering = ['-published']
>
> what could be the problem?

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to