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
Filter by
Sorted by
Tagged with
0 votes
1 answer
66 views

How do I use the same render in 2 separate view functions? (django)

The project_list() view lists all the projects that already exist and gives you the option to add a new one. new_project() handles the creation of that new project then redirects to either the project(...
pompousPanda's user avatar
1 vote
1 answer
2k views

How to read CSV file from POST?

I've been stuck for hours on this csv problem. The following code is run after a form is posted : fichier_en_lecture = request.FILES['fichier_csv'].read() nom_du_fichier = request.FILES['fichier_csv']...
Brachamul's user avatar
  • 1,916
11 votes
3 answers
24k views

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 ...
mennanov's user avatar
  • 1,195
3 votes
1 answer
1k views

How to read environment variable from Apache updating from Django 1.6.5 to 1.7

I want to read environment variables from Apache vhost config file and store them into Django settings. Before updating to Django 1.7 everything was fine but now it is broken. It seems the problem ...
Marco Frattallone's user avatar
1 vote
2 answers
166 views

django load object name by language

I have models defined like that class Foo(Model): id = AutoField(primary_key = True) code = CharField(blank = False, unique = False, max_length = 64) class FooName(Model): id = ...
adontz's user avatar
  • 1,438
2 votes
0 answers
95 views

Django 1.7 migrations: how to handle unbound methods?

I'm working on a django 1.6 project running on python 2.7 and we're about to upgrade to 1.7 and utilize the new migration tools. The migration system seems unable to handle unbound methods in python ...
SverkerSbrg's user avatar
1 vote
1 answer
849 views

Accessing User.get_absolute_url in Django 1.7

I just upgraded from Django 1.5 to 1.7 and now my user objects don't have the get_absolute_url method on them. This used to work: In [1]: from django.contrib.auth.models import User In [2]: u = ...
dshap's user avatar
  • 1,392
9 votes
1 answer
4k views

Django 1.7 - Accidentally Dropped One Table. How To Recover It?

I have accidentally dropped a table in Django 1.7 project. I ran makemigrations & migrate. Both commands didn't recognized that table has dropped. So they had no affect. Should I remove code ...
Chillar Anand's user avatar
8 votes
3 answers
2k views

Django fixtures save with default value

I'm using Django 1.7 and I have a problem with my fixtures. I would like Django to use the default value or use the save() method to create unspecified values. Here are my current objects: # File: ...
achedeuzot's user avatar
  • 4,224
1 vote
1 answer
630 views

Django: Why does my image field form not validate?

I have this model: fs = FileSystemStorage(location='/var/tmp/media/uploads/photos') class Picture(models.Model): """ vom user hochgeladenes bild """ image_field = ...
JasonTS's user avatar
  • 2,559
4 votes
1 answer
165 views

Django 1.7 migrations not being picked up

Using Django 1.7 and it's new migration I am running into a strange issue. I split my settings files up into 3 files which I have always done pre version 1.7 eg... /settings __init__.py base.py ...
Prometheus's user avatar
18 votes
4 answers
36k views

Django 1.7 upgrade error: AppRegistryNotReady: Models aren't loaded yet

I am trying to upgrade a project from Django 1.6 to 1.7. So far, I have created a new virtualenv with all the same installs and upgraded the Django version to the new release. I need to upgrade from ...
Pete Drennan's user avatar
1 vote
1 answer
123 views

Create an Activity Class Django

I am working on a project that needs to create an entry for every change done in the system and the changes done in the database, for example: Jane update her profile profile address to 1st Street No....
Leonardo's user avatar
  • 2,484
15 votes
2 answers
2k views

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 ...
tunarob's user avatar
  • 2,878
144 votes
2 answers
58k views

How to migrate back from initial migration in Django 1.7?

I created a new app with some models and now I noticed that some of the models are poorly thought out. As I haven't committed the code the sensible thing would be to migrate the database to last good ...
Seppo Erviälä's user avatar
1 vote
0 answers
647 views

Installed Django Allauth, can't find login page

I have just installed Django Allauth according to the documentation, with the aim of just enabling normal account login (no social for now). When I go to: http://localhost:8000/accounts/ I get this: ...
Jonas Bolin's user avatar
4 votes
2 answers
2k views

django-pipeline not working at all

I were fighting with this for for hours, please, help me fix this or kill me =( I am getting 404 for all 4 files in view. No compiled files anywhere. Python 3.4.0 in virtualenv, Django 1.7 RC3. Btw:...
val_'s user avatar
  • 377
8 votes
2 answers
829 views

Using Django's StaticLiveServerCase with staging server as well

I've witten a few functional tests using the StaticLiveServerCase. This works great for local testing, but now I'd like to test my staging server as well. The author of the book I'm reading suggests ...
Thijs van Dien's user avatar
0 votes
1 answer
1k views

What is wrong with my custom model field?

I try to implement an image field that you can assign a string to and it will automatically fetch the image from that URL. Reading it afterwards, it will hold the path to the local copy. Therefore, I ...
danijar's user avatar
  • 33.4k
8 votes
1 answer
1k views

PyDev + Django - undefined variables from import

Specifically, any querysets are causing this: users = User.objects.all().order_by('user_group__user_group_description', 'user_name') all() is saying Undefined variable from import This is on any ...
TyrantWave's user avatar
  • 4,613
152 votes
36 answers
147k views

Django 1.7 - makemigrations not detecting changes

As the title says, I can't seem to get migrations working. The app was originally under 1.6, so I understand that migrations won't be there initially, and indeed if I run python manage.py migrate I ...
TyrantWave's user avatar
  • 4,613
0 votes
2 answers
224 views

NoReverseMatch Exception in django named group url

I am new to django and playing with urls and stuck on this problem, I have a view in my views.py which reverse url to a different view def index(request): username = request.session.get('username') ...
Dheerendra's user avatar
  • 1,518
41 votes
4 answers
33k views

Django: AppRegistryNotReady()

Python: 2.7; Django: 1.7; Mac 10.9.4 I'm following the tutorial of Tango with Django At Chapter 5, the tutorial teaches how to create a population script, which can automatically create some data ...
user2988464's user avatar
  • 3,301
7 votes
2 answers
6k views

Use custom directory for "templatetags"

some one know if its likely use custom directory for "templatetags" eje: "my-project/templatetags" Normal My-Project-Name My-App __init__.py templatetags __init__.py Need Some ...
Colpaisa's user avatar
  • 355
7 votes
2 answers
6k views

Django 1.7 synchronize unmigrated apps

I started my model: myapp.models.py class MyModel(models.Model): field_a = models.FloatField() field_c = models.FloatField() Then ran ./manage.py migrate on my new project and it was all ...
Williams's user avatar
  • 4,200
2 votes
2 answers
5k views

Django tuple checking: TEMPLATE_DIRS should be tuple?

I'm trying Django 1.7. This is my TEMPLATE_DIRS setting: TEMPLATE_DIRS = ( os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/') ) which is fine for Django 1.6, but doesn't ...
user2988464's user avatar
  • 3,301
98 votes
22 answers
134k views

How to resolve "django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: foo" in Django 1.7?

On upgrading to Django 1.7 I'm getting the following error message from ./manage.py $ ./manage.py Traceback (most recent call last): File "./manage.py", line 16, in <module> ...
John Carter's user avatar
  • 54.6k
42 votes
4 answers
89k views

How to add a new field to a model with new Django migrations?

I'm using the contribute_to_class method but I don't know how to create the field in the database with new migrations.
pedro_witoi's user avatar
1 vote
1 answer
2k views

django and configparser, NoSectionError but the section is found

I have the following code in a django view. full_path = BASE_DIR + '/' + full_path print(full_path) ksinput_path = full_path + '/KSINPUT' print(ksinput_path) import configparser parser = configparser....
JasonS's user avatar
  • 161
3 votes
4 answers
3k views

Django 1.7 - Cannot find tutorials [closed]

I have been searching the net for any references or tutorials for learning Django. Since I'm going to learn it, it makes sense that I learn the newest(releases) version (1.7). However, all the ...
darkryder's user avatar
  • 832
-1 votes
1 answer
339 views

From Django1.7 onwards `migration` is into the core. Is it similar to `south`?

I am using south for migrations. Today I surprisingly found an interesting article, django1.7 support migrations. Interestingly I found that the startapp command even creates a folder migrations. ...
suhailvs's user avatar
  • 20.8k
93 votes
11 answers
95k views

How to simplify migrations in Django 1.7?

There are already similar questions for South, but I have started my project with Django 1.7 and am not using South. During development a lot of migrations have been created, however the software is ...
Kit Fisto's user avatar
  • 4,435
15 votes
3 answers
5k views

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 ...
Daria's user avatar
  • 753
3 votes
1 answer
949 views

Change base path of the generated migration files

In django 1.7, using the provided makemigrations command(not from South), is there a way to change the location of where the generated migration files are stored? I'm keeping these files under ...
Mecca's user avatar
  • 659
0 votes
0 answers
67 views

Link dies on ajax call

Short version: After ajax call, link turns into plain text, but back to link on page refresh. Details: I have a notification system in place (like Stack Overflow and whatnot). The notifications ...
thumbtackthief's user avatar
11 votes
3 answers
7k views

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 ...
danijar's user avatar
  • 33.4k
-1 votes
1 answer
86 views

Django Raising Runtime Error

I got the following django error: "RuntimeError: App registry isn't ready yet." I am using django 1.7 development version.
user3198880's user avatar
11 votes
2 answers
6k views

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 ...
Nima's user avatar
  • 3,279
7 votes
1 answer
2k views

Does null=True imply default=None for models?

When allowing database fields of a Django model to be NULL using null=True, is there default value guaranteed to be NULL by default? Or do I have to speficy this manually: report = models.FileField(...
danijar's user avatar
  • 33.4k
1 vote
1 answer
1k views

Can pip copy dependency source into my virtualenv?

I am a bloody beginner in Python and Django. To set up a environment on my Windows machine, I performed the following steps. Install Python 3.4 Use pip to install virtualenv Create a project folder ...
danijar's user avatar
  • 33.4k
14 votes
3 answers
16k views

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:...
jot240's user avatar
  • 187
2 votes
0 answers
257 views

Avoiding race condition between validation for uniqueness and insertion

I have a Django 1.7 beta 1 project with a standard user signup form. Conceptually, it makes sense for the form validation to fail if the username is already taken. However, the form validation and ...
Andrew Gorcester's user avatar
0 votes
1 answer
57 views

django: defining tags/filters/manager actions with less ceremony

To create custom django template tags and filters, as well as to add custom manage.py commands no matter how trivial, the docs tell you to create specific directory structures. I'm working on a ...
salezica's user avatar
  • 75.5k
0 votes
0 answers
1k views

django-taggit error in Django-1.7 : 'tags' has an m2m relation with model <class 'taggit.models.Tag'>

I've written a BlogEntry model that I've made in Django-1.7 When I run, /manage.py makemigration, I get the following error. CommandError: One or more models did not validate: blog.blogentry: 'tags' ...
Anish Shah's user avatar
  • 7,891

1
4 5 6 7
8