Questions tagged [django-1.10]

Django 1.10 is a version of the Django framework, released August 2016. Please only use this tag if your question relates specifically to this version.

Django 1.10 requires Python 2.7, 3.4, or 3.5.

Here are a list of changes:

Django 1.10 was released in August 2016 and was supported until December 2017.

191 questions
1
vote
0 answers

Django user has_perm returning false even though group has permission

I'm running into a problem where I've created a Group with certain permissions, and successfully added a user to that group, but when I check user.has_perm with that permission, I'm getting False. I've even tried things like saving the user and…
warchinal
  • 229
  • 2
  • 14
1
vote
2 answers

Django-material : from material.forms ImportError: No module named forms

I'm trying to test an apps that use material.forms but i got this error:- from material.forms import ModelForm, InlineFormSetField ImportError: No module named forms i'm using virtualenv. python 2.7, django 1.10.5, django-material 0.12.5 Did i…
MunirohMansoor
  • 355
  • 1
  • 10
  • 19
1
vote
1 answer

django-import-export ForeignKey widget returns empty values (Django 1.10)

I'm trying to export Student, which has a OneToOne relationship with Django built-in User model. But when I export Students, the username column is empty in the exported file. # models.py class Student(models.Model): user =…
Reza
  • 1,065
  • 1
  • 10
  • 18
1
vote
1 answer

global name 'csrf' is not defined in Django 1.10

NameError at /todos/accounts/register/ global name 'csrf' is not defined Request Method: GET Request URL: http://localhost:8000/todos/accounts/register/ Django Version: 1.10.5 Exception Type: NameError Exception Value: global…
rahul
  • 27
  • 7
1
vote
2 answers

Django-admin: MoneyField doesn't show currency

I have a model Product and model Price. The Price has a ForeignKey(Product...) and original_price and eur_price which are MoneyField's (Django-money). So one Product object can have multiple Price objects related. I tried to inline the Price…
Milano
  • 18,048
  • 37
  • 153
  • 353
1
vote
1 answer

Images from Model in HTML Django 1.10

I am new to Django (1.10) so please excuse me. I am trying to visualise images from my model Clothes. Trying to create some sort of small webshop to train. My Model: from __future__ import unicode_literals from django.db import models from…
Anna Jeanine
  • 3,975
  • 10
  • 40
  • 74
1
vote
1 answer

In django, do we need to define application name in settings.py file under INSTALLED_APPS list

I am using django 1.10.5, and mongodb in project backend. My project structure is as follow- project_name |-- applications | |-- app1 | | |-- admin.py | | |-- upload.py | | |-- __init__.py | | |-- migrations | | | `--…
sachin27
  • 145
  • 3
  • 13
1
vote
1 answer

CSRF verification failed - Request aborted

I am getting the CSRF failure in Django and no articles are working. It says it's used for posts like I remember, and it is included in the form, but not in a form tag. settings.py MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', …
codyc4321
  • 9,014
  • 22
  • 92
  • 165
1
vote
1 answer

Django model changes not reflected on Postgres Docker container

I have a Django-Postgres app deployed with Docker. I have two docker containers web and dband one docker volume for persistent storage. My docker-compose.yml file: version: '2' services: db: image: postgres ports: - '5432:5432' …
Galil
  • 859
  • 2
  • 16
  • 40
1
vote
1 answer

Django ModelForm not saving user that create posts on db

A Django beginner here, having a lot of trouble getting forms working. I've tried different ways, but I can't save the user in the database. I get this error: "IntegrityError at /n_post/ NOT NULL constraint failed:…
ilbose
  • 747
  • 13
  • 21
1
vote
3 answers

Django 1.10 TemplateSyntaxError 'future' is not a registered tag library

I am using Django 1.10 and have this library installed 'nested_inline. I really need this lib however when I load the admin page it gives me the following error. TemplateSyntaxError at /masterproducts/product/add/ 'future' is not a registered tag…
Abhishek J
  • 2,386
  • 2
  • 21
  • 22
1
vote
1 answer

Django : Form data not saving

I have a form where user just uploads an image,but problem is when I choose an image and press button to submit. It says This field is required.on the page although I have already pointed the image. And that's all it does.I checked if it was…
1
vote
1 answer

Django: Images/Absolute URLS from not displaying in html

I have a block of code on my template which does not show up on my html nor does it give any error on Chromes console. I am trying to display a list of images which when clicked takes you to the detail of that image. Here is the key part of my…
The_Pythonist
  • 101
  • 10
1
vote
0 answers

How to use multiple objects in a single Django template for loop?

I have a div element with container class like this :
1
vote
1 answer

How to get a queryset estimated size on the DB?

I'm running a cleanup process each month that deletes old unnecessary objects from the database. Is there a way to get an estimation of the file size gained from the cleanup process? I'm working with both sqlite3 and PostgreSQL DBs, but of course a…
iTayb
  • 12,373
  • 24
  • 81
  • 135