Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cannot assign None, does not allow null values
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
onoxo  
View profile  
 More options Nov 27 2009, 4:57 pm
From: onoxo <vedran.ko...@gmail.com>
Date: Fri, 27 Nov 2009 13:57:13 -0800 (PST)
Local: Fri, Nov 27 2009 4:57 pm
Subject: Cannot assign None, does not allow null values
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
onoxo  
View profile  
 More options Nov 27 2009, 5:27 pm
From: onoxo <vedran.ko...@gmail.com>
Date: Fri, 27 Nov 2009 14:27:24 -0800 (PST)
Local: Fri, Nov 27 2009 5:27 pm
Subject: Re: Cannot assign None, does not allow null values
btw. here is a full code:

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

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

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Valenta  
View profile  
 More options Nov 27 2009, 9:32 pm
From: Tim Valenta <tonightslasts...@gmail.com>
Date: Fri, 27 Nov 2009 18:32:28 -0800 (PST)
Local: Fri, Nov 27 2009 9:32 pm
Subject: Re: Cannot assign None, does not allow null values
You've got a lot of models in that file.  Which one are you trying to
save when it throws the error?

By the way, I notice that your "ItemWithMedia" class is probably
creating a database table.. if you never need to manipulate it direct
(ie, you only make subclasses of it), I might suggest putting this in
the definition:

    class ItemWithMedia(models.Model):
        # ... all of your old stuff goes here
        class Meta:
            abstract = True

That way Django knows it's just a base class.

Not sure what the problem is, yet...

On Nov 27, 3:27 pm, onoxo <vedran.ko...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
onoxo  
View profile  
 More options Nov 28 2009, 3:07 am
From: onoxo <vedran.ko...@gmail.com>
Date: Sat, 28 Nov 2009 00:07:43 -0800 (PST)
Local: Sat, Nov 28 2009 3:07 am
Subject: Re: Cannot assign None, does not allow null values
Hi!

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

and it makes this error with each class that has published propertie.

On Nov 28, 3:32 am, Tim Valenta <tonightslasts...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Lundberg  
View profile  
 More options Nov 28 2009, 5:20 am
From: Martin Lundberg <martin.lundb...@gmail.com>
Date: Sat, 28 Nov 2009 11:20:29 +0100
Local: Sat, Nov 28 2009 5:20 am
Subject: Re: Cannot assign None, does not allow null values

Is it not that you forget to give the published property a value?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »