I make it a point to never use a python build that comes from a .deb for
any real development.

The OS vender may require certain python features for its management
scripts, but I don't like my development tools changing out from under me.

Build yourself a python from source, putting it some where in, say, /opt
then modify your PATH in .bashrc to find yours first (or only).

Then always develop in in virtualenv (based on your python) and no
dist-packages directories about it.

If you need to install something in python, use pip, never apt-get (though
you may need apt to install C library dependencies.


On Wed, Jul 16, 2014 at 4:53 PM, Pepsodent Cola <pepsodentc...@gmail.com>
wrote:

> Hi,
> I have been learning and developing my first Django project in Linux Mint
> 14 for about 2 years.  This month I moved my Django project files to Linux
> Mint 17.
> When I run my unit tests then I get this error, which I don't remember
> having when I was testing code in Linux Mint 14.
>
> *IntegrityError: NOT NULL constraint failed:*
> userprofile_userprofile.likes_cheese
>
>
> NOT NULL constraint failed
> I try to change the old code from this.
>
> class UserProfile(models.Model):
>     user = models.OneToOneField(User)
>     likes_cheese = models.*BooleanField()*
>     favourite_hamster_name = models.CharField(max_length=50)
>
> To this.
>
> class UserProfile(models.Model):
>     user = models.OneToOneField(User)
>     likes_cheese = models.*NullBooleanField()*
>     favourite_hamster_name = models.CharField(max_length=50)
>
> But then all kinds of different stuff in the project breaks.  Which makes
> me suspect that nothing was wrong with my code to begin with, that perhaps
> the change of operating system has caused this error.
>
> Did Ubuntu 14.04 or Linux Mint 17 break your Django project files also?
>
>
>
> admin.TabularInline
> Also I think Linux Mint 17 broke admin.py's TabularInline function because
> now the fields looks stacked instead.  I'm not sure if this has anything to
> do with my operating system switch.  Or if it's because of my recent
> experimentations with overriding certain parts of the admin template.
>
> class UserProfileInline(admin.*TabularInline*):
>     model = UserProfile
>     extra = 1
>
> Did Ubuntu 14.04 or Linux Mint 17 break your Django admin?
>
>
>
>  --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> 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/f0b3c781-e088-4ba1-a251-8e78795fd0f1%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f0b3c781-e088-4ba1-a251-8e78795fd0f1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/CAB%2BAj0tBNSVvz7HRubmgDf3CN4wJ5WXc7vy5M_uuRhTn%3D-Q8Yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to