Questions tagged [django-1.7]

Django 1.7 is the version of the Django framework, released September 2014. Please only use this tag if your question relates specifically to this version.

Django 1.7 depends on Python 2.7 and supports Python 3.4, support for Python 2.6 has been dropped.

Tag questions that address any of these new features:

  • Schema migrations
  • App-loading refactor
  • New method on Field subclasses
  • Calling custom QuerySet methods from the Manager
  • Using a custom manager when traversing reverse relations
  • New Prefetch object for advanced prefetch_related operations
  • Admin shortcuts support time zones
  • Using database cursors as context managers

If the question is not specific targeting features from this release please add . For questions about the new Schema migrations tool, please add .

See the Django 1.7 release notes for more information

394 questions
15
votes
2 answers

Django 1.7 blank CharField/TextField convention

Using Django's new migration framework, let's say I have the following model that already exists in the database: class TestModel(models.Model): field_1 = models.CharField(max_length=20) I now want to add a new TextField to the model, so it…
Jeremy Swinarton
  • 517
  • 1
  • 5
  • 14
15
votes
2 answers

Models inside tests - Django 1.7 issue

I'm trying to port my project to use Django 1.7. Everything is fine except 1 thing. Models inside tests folders. Django 1.7 new migrations run migrate command internally. Before syncdb was ran. That means if a model is not included in migrations -…
tunarob
  • 2,768
  • 4
  • 31
  • 48
15
votes
3 answers

Can not create South database models in Django 1.7

Django 1.7 has built-in database migration mechanizm. However, I'd like to run South migrations for the ols third-party django apps. I failed to to 'syncdb' management command with Django 1.7 in order to create South…
Daria
  • 753
  • 7
  • 22
14
votes
2 answers

django 1.7 and connection pooling to PostgreSQL?

What are the differences between the django apps (Django-PostgresPool, djorm-ext-pool, django-db-pool) and PG Bouncer or PG Pool? Do the apps use one of the last two packages? In this article, the author says that there is a patch starting with…
Michael
  • 8,357
  • 20
  • 58
  • 86
14
votes
3 answers

Runtime error:App registry isn't ready yet

I am trying to create a script that populates a database with test users. I am new to Django and Python. I keep on getting: Runtime error: App registry isn't ready yet. Here is the output and error: starting population script Traceback (most…
jot240
  • 187
  • 1
  • 1
  • 8
12
votes
3 answers

How to solve the ImportError: cannot import name simplejson in Django

I'm trying to build a realtime chat app in Django(1.7.1). It seems that I needed to install Redis and ishout.js. So I installed them by following the instructions. After making the project in Django, I put 'drealtime' under the INSTALLED_APPS, and…
Sungpah Lee
  • 1,003
  • 1
  • 13
  • 31
12
votes
5 answers

Django 1.7 makemigrations freezing/hanging

I'm finally upgrading from Django 1.6 to 1.7, and removing South in the process. I followed the official Django instructions and removed all my old numbered migrations. Now I'm trying to run python manage.py makemigrations to get the new…
jdotjdot
  • 16,134
  • 13
  • 66
  • 118
11
votes
3 answers

Django 1.7 app config ImportError: No module named appname.apps

I'm trying to setup a custom application configuration for one of my Django app called 'articles' following the documentation at https://docs.djangoproject.com/en/dev/ref/applications/, but I keep getting ImportError: No module named articles.apps…
mennanov
  • 1,195
  • 3
  • 16
  • 27
11
votes
3 answers

How to JSON serialize __dict__ of a Django model?

I want to serialize the values of a single model in Django. Because I want to use get(), values() is not available. However, I read on Google Groups that you can access the values with __dict__. from django.http import HttpResponse, Http404 import…
danijar
  • 32,406
  • 45
  • 166
  • 297
11
votes
2 answers

Django-registration compatibility issue with django 1.7

I've been using [django-registration] (https://bitbucket.org/ubernostrum/django-registration) and now I have started using django 1.7b1 and here is the error I am getting the error copied below. It is being raised from django-registration in…
Nima
  • 3,129
  • 1
  • 21
  • 20
10
votes
1 answer

Deleting related objects deletes the ForeignKey object

I have the following models: class User(models.Model): user_question = models.ForeignKey(UserQuestion) class Question(models.Model): text = models.CharField(max_length=255) class UserQuestion(models.Model): answer =…
Crystal
  • 5,960
  • 4
  • 21
  • 27
10
votes
1 answer

add help text to a read only field in django admin view

Below is my admin view: @admin.register(AuditStashAwsMasterPolicies) class AuditPoliciesAdmin(reversion.VersionAdmin): exclude = ['source_policy_path', 'source_state', 'target_state'] readonly_fields = ['comparison_date', 'source',…
Justin S
  • 1,409
  • 4
  • 22
  • 38
10
votes
0 answers

Django 1.7 + PostgreSQL needs restart to recognize new database entries

I have a Django page called /candidates which is supposed to fetch all Candidate entries in the database. The problem is whenever I create a new Candidate entry, the /candidates page doesn't show anything but when I check django-admin I can verify…
DigitalDouble
  • 1,747
  • 14
  • 26
10
votes
1 answer

Django creating a custom model field

I am trying to create a custom field in Django which will take a decimal currency value (example: £1.56) and save it in the database as an Integer (example: 156) to store currency values. This is what I have so far (I have put fixed values to…
LondonAppDev
  • 8,501
  • 8
  • 60
  • 87
10
votes
2 answers

Alter model to add "through" relationship to order a ManytoMany field - Django 1.7 migration modification

I am trying to add an order to a ManyToMany field that I created a while ago. I basically want to order pictures in collections of pictures. I am running on Django 1.7, so no more South migrations (I was trying to follow this tutorial:…
Alb Dum
  • 1,121
  • 3
  • 11
  • 26
1 2
3
26 27