Questions tagged [django-1.9]

Django 1.9 is a version of the Django framework, released December 2015. Please only use this tag if your question relates specifically to this version.

Django 1.9 supports Python 2.7, 3.4, and 3.5.

Here are a list of changes:

Django 1.9 was released in December 2015 and was supported until April 2017.

273 questions
0
votes
2 answers

How to redirect from one view to another?

I have an x view that redirects me to some_name.html page. This view needs to create a class that it is importing from other python file. This view calls a specific function (algorithm) that has some logic in it. lets say this func return a…
drorbr
  • 221
  • 1
  • 2
  • 4
0
votes
1 answer

Django 1.9 unittest error for messages but i dont see the error for 1.10.4 and 1.8

The test fails with the error in Django 1.9 env, but tests run perfectly well in 1.10.4 and 1.8. Can someone throw some light here ! Here is the error add_message raise MessageFailure('You cannot add messages without installing ' …
rrmerugu
  • 1,826
  • 2
  • 20
  • 26
0
votes
1 answer

Django 1.9 form inheritance on UpdateView

The problem i have is with a single field that i added. I have my form: class employeesForm(forms.ModelForm): class Meta: fields = [ 'num_employee', 'id_ignition', …
0
votes
1 answer

Django 1.9 doesnt filter query results

I have a form where the options of one of my select input are related to another table. Everything works perfectly, but know i want to exclude some options so i have the following kode in forms.py: class employeesForm(forms.ModelForm): def…
Rafael Ortega
  • 434
  • 5
  • 15
0
votes
1 answer

How do you display fields from a related model in admin.py?

I have the following models: class Property(models.Model): user = models.ForeignKey(User) id = models.CharField(max_length=20, null=True) class Property_Value(models.Model): id = models.ForeignKey(Property) amount =…
H C
  • 1,138
  • 4
  • 21
  • 39
0
votes
1 answer

Why is my django form validating when I am not calling is_valid

EDIT: I Have identified the cause as the python packages supplied with RHEL 7. The solution was to install an alternate version. In my case, I just moved the server to centOS, where the supplied python works with django. I have a form which actions…
Edyoucaterself
  • 167
  • 1
  • 1
  • 9
0
votes
1 answer

Django 1.9 adding a class to form label

In my forms.py file I reconfigured the class UserForm's __init__ function to include a css class. Unfortunately doing this only allowed me to add a class to the and not the
Lefty
  • 425
  • 1
  • 5
  • 19
0
votes
1 answer

Troubles to set up a simple task

I'm trying to set up a simple task (printing "foo" every 5 seconds) with django and celery. Assuming I have the following project : . ├── manage.py └── proj ├── __init__.py ├── settings.py ├── tasks.py ├── urls.py └──…
vmonteco
  • 14,136
  • 15
  • 55
  • 86
0
votes
2 answers

error is not displayed in the template

I have used django allauth for user registration and login. I have used the {{ form.has_errors }} in template to show an error but the error is not displayed in the template. What might be the reason for not showing an error in the template? The…
Serenity
  • 3,884
  • 6
  • 44
  • 87
0
votes
1 answer

Django REST: AttributeError: 'WSGIRequest' object has no attribute 'session'

I've created a Login APIView for my Django app. I'm continually getting the error, AttributeError: 'WSGIRequest' object has no attribute 'session'. I've looked at other posts and people mention reordering the middleware placing sessionMIddleware…
ssk
  • 197
  • 2
  • 15
0
votes
1 answer

Notification to user from admin

I am new in Django and don`t know the best way to realise next functionality in my project. In my django project I have users with different roles. One of them is admin who can create project. I mean that I have model with fields (project_name,…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
0
votes
3 answers

Django URL and Views

Since this below method of Mapping Django Url from a view is depreciated in Django 1.9 and above url(r'^contact/$', 'newsletter.views.contact', name='contact'), url(r'^about/$', 'home.views.about', name='about'), And this is what is currently in…
0
votes
1 answer

Password Reset Confirm don`t work

After successful password reset (first step) I have message in my email with next redirect link to next step: 127.0.0.1:8000/en/account/password-reset-confirm/NA-4ei-53e725f1ba4cbfc54fb8/ Unfortunately I always have this Message in…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
0
votes
0 answers

Passing arguments to view error 'got an unexpected keyword argument' is raised

I have problem with passing an argument from url to my view. url: from ProjectName import settings from django.conf.urls import url, include from django.conf.urls.i18n import i18n_patterns from django.contrib import admin import ProjectName.views as…
Phrixus
  • 1,209
  • 2
  • 19
  • 36
0
votes
1 answer

Django URL Pattern not triggered

I am trying to implement an approve and decline functionality of a profile using the following approach: /user/area/decline/234322 /user/area/approve/234322 So I wrote the following URL pattern: urlpatterns = i18n_patterns( …
Phrixus
  • 1,209
  • 2
  • 19
  • 36