Questions tagged [django-1.8]

Django 1.8 is a version of the Django framework, released April 2015. It is a Long Term Support (LTS) release, and was supported until April 2018. Please only use this tag if your question relates specifically to this version.

Django 1.8 requires Python 2.7, 3.2 (until the end of 2016), 3.3, 3.4, or 3.5.

Here are some of the salient features of Django 1.8:

398 questions
75
votes
4 answers

Update to Django 1.8 - AttributeError: django.test.TestCase has no attribute 'cls_atomics'

I updated a Django 1.7 project to Django 1.8 and now get errors when I run the tests (that are subclasses of django.test.TestCase). Traceback (most recent call last): File "env\lib\site-packages\django\test\testcases.py", line 962, in…
habakuk
  • 2,416
  • 2
  • 27
  • 45
71
votes
4 answers

What should I use instead of syncdb in Django 1.9?

Take a look at this: $ pypy ./manage.py syncdb /usr/lib64/pypy-2.4.0/site-packages/django/core/management/commands/syncdb.py:24: RemovedInDjango19Warning: The syncdb command will be removed in Django 1.9 warnings.warn("The syncdb command will be…
d33tah
  • 8,728
  • 10
  • 51
  • 128
60
votes
6 answers

Not able to create super user with Django manage.py

Trying to create a super user for my database: manage.py createsuperuser Getting a sad recursive message: Superuser creation skipped due to not running in a TTY. You can run manage.py createsuperuser in your project to create one…
gerosalesc
  • 2,613
  • 3
  • 21
  • 41
49
votes
8 answers

auth_user error with Django 1.8 and syncdb / migrate

When upgrading to Django 1.8 (with zc.buildout) and running syncdb or migrate, I get this message: django.db.utils.ProgrammingError: relation "auth_user" does not exist One of my models contains django.contrib.auth.models.User: user =…
mpso
  • 1,091
  • 1
  • 13
  • 25
46
votes
1 answer

How to redo a migration on django 1.8 after using --fake

Something went wrong on my migrations, I added a new datetimefield to a model then I used makemigrations and migrate. python manage.py makemigrations python manage.py migrate But after this the migrate got an "table already exists error". I…
Fernando Freitas Alves
  • 3,381
  • 3
  • 22
  • 42
39
votes
5 answers

Django app works fine, but getting a TEMPLATE_* warning message

When I use runserver, it gives this warning message: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default…
codingcoding
  • 692
  • 1
  • 8
  • 13
37
votes
3 answers

Selecting specific fields using select_related in Django

I have two models Article and Blog related using a foreign key. I want to select only blog name while extracting the article. articles = Articles.objects.all().select_related('blog__name') The query generated shows that it selected all the fields…
37
votes
3 answers

"Models aren't loaded yet" error while populating in Django 1.8 or later

I am using this code to populate my database: import os def populate(): python_cat = add_cat('Python') add_page(cat=python_cat, title="Official Python Tutorial", url="http://docs.python.org/2/tutorial/") …
Atul tyagi
  • 375
  • 1
  • 3
  • 6
35
votes
6 answers

Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually

I am trying to migrate from Django 1.6 to Django 1.8. I was using South for managing migrations in Django 1.6. I have successfully created new migration files by python manage.py makemigrations. while running python manage.py migrate --fake-initial,…
Shubham
  • 2,753
  • 3
  • 27
  • 44
35
votes
3 answers

"Fixed default value provided" after upgrading to Django 1.8

Django 1.8 now has some problem detection for models, which is nice. However, for one warning that it is giving me, I understand the problem, but I don't understand how the hint that it is giving me is any better. This is my (bad) model…
Troy
  • 19,207
  • 19
  • 68
  • 96
28
votes
4 answers

Annotate with value of latest related in Django 1.8 using conditional annotation

I have the following models: class City(models.Model): ... class Census(models.Model): city = models.ForeignKey(City) date = models.DateTimeField() value = models.BigIntegerField() Now I'd like to annotate a City-queryset with the…
Se Norm
  • 1,515
  • 4
  • 23
  • 37
25
votes
1 answer

Upgrading from Django 1.6 (with south) to 1.8 doesn't modify 'last_login' on the user table

I have upgraded from Django 1.6.5 (with south migrations) to Django 1.8. I have followed the instructions here: https://docs.djangoproject.com/en/1.8/topics/migrations/#upgrading-from-south So, I remove South, delete my previous migrations and run…
LondonAppDev
  • 5,838
  • 7
  • 50
  • 74
23
votes
4 answers

Auto register Django auth models using custom admin site

I implemented authentication management using Django auth with the default admin site but then I wanted to use my own AdminSite to rewrite some behaviors: class OptiAdmin(admin.AdminSite): site_title = "Optimizer site's admin" #...Other…
21
votes
5 answers

Django 1.8 ArrayField append & extend

Django 1.8 will come with new advanced field types including ArrayField these rely on PostgreSQL and are implemented at a DB level. PostgreSQL's array field implements an append method. However I can't find any documentation on appending an item to…
SColvin
  • 6,647
  • 4
  • 39
  • 51
19
votes
1 answer

How can i get all models in django 1.8

I am using this code in my admin.py from django.db.models import get_models, get_app for model in get_models(get_app('myapp')): admin.site.register(model) But i get warning that get_models is deprecated How can i do that in django 1.8
user3214546
  • 5,483
  • 9
  • 42
  • 82
1
2 3
26 27