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
0
votes
1 answer

Django query with annotated conditional expression uses INNER JOIN. How do I get it to use OUTER JOIN?

I have a "Meal" model with a foreign key to "Food". Each meal has a rating: good, bad, or indifferent. I want to query a list of all foods and annotate the count of each type of meal rating, but some foods have no meals yet, so I want the query to…
Mike Drawback
  • 536
  • 3
  • 10
0
votes
1 answer

Virtualenv - new environment has a lot of default dependencies

I have Virtualenv installed on my Macbook. I want to create a new environment, where I can develop a nice app. I was expecting an empty virtual environment, to make it easy to deploy and keep dependencies down. However, after I virtualenv MyAppName,…
Lars Holdgaard
  • 8,386
  • 20
  • 85
  • 170
0
votes
1 answer

Django1.8: UnicodeEncodeError 'gbk' codec can't encode character '\xbb'

I'm using django 1.8, developing in windows7. The system codec is 'gbk'. When I call: print(request.POST) In my view function, I got this error: UnicodeEncodeError at /mrp/list/item/purchase/0/ 'gbk' codec can't encode character '\xbb' in position…
Alfred Huang
  • 15,204
  • 31
  • 99
  • 176
0
votes
1 answer

Pre save a slug on creation results in a 'LogEntry' object has no attribute pre_save

I am trying to auto generate a slug on creation of my object in Django. My method is to use the pre_save signal, using the @receiver call. When I create a new entry in my Django admin, I get 'LogEntry' object has no attribute 'title'. I made an…
Lars Holdgaard
  • 8,386
  • 20
  • 85
  • 170
0
votes
1 answer

Have custom manager but keep objects keyword available

I am learning Python + Django (basically in love - 100% .NET guy before), and I am trying to learn the concept of managers. I am trying to add a custom manager called ProviderManager, which will get some objects depending on some input. However, I…
Lars Holdgaard
  • 8,386
  • 20
  • 85
  • 170
0
votes
2 answers

ImportError at / no module named url, django 1.8.1

I appreciate any help from brilliant minds out there. I am doing Django 1.7 tutorial under the official django documentation and I hit a wall. Here's my problem. I got an ImportError at/, no modules named url when I tried to point the project url…
Bridgex
  • 11
  • 2
0
votes
1 answer

How to max and min value of birthday in forms.ModelForm of Django?

I use Django 1.8 version. my model has birthday column. class UserProfile(models.Model): user = models.OneToOneField(User) birthday = models.DateField (verbose_name=u'birthday') # ... it is form for model. class…
shinriyo
  • 314
  • 3
  • 16
0
votes
1 answer

How to to retrieve the SQL type of the primary key of a related field mapped by Django's ORM

I'm introspecting the types of some fields in a model, in particular I'm interested in retrieving the RDBMS-dependent type, i.e. "VARCHAR(20)", and not the Django field class (django.db.models.CharField in this case). I've problems with…
furins
  • 4,684
  • 1
  • 37
  • 54
0
votes
1 answer

Django 1.8: "./manage.py test" fails with TypeError: unsupported operand type(s) for -: 'unicode' and 'int'

(mathspace)pzrq@Peters-Mac-mini:~/Projects/mathspace$ ./manage.py test Creating test database for alias 'default' (':memory:')... Traceback (most recent call last): File "./manage.py", line 20, in execute_from_command_line(sys.argv) File…
pzrq
  • 1,167
  • 1
  • 14
  • 16
0
votes
2 answers

Django 1.8 Passing data between pages with using form

I already have codes and it doesn't working. But I'am looking for solution or practice on how to pass data between pages with using form. Should I work with hiddenfields or sessions?. I am ready to change or rewrite my codes. I am open the other…
oyilmaztekin
  • 601
  • 1
  • 7
  • 21
0
votes
1 answer

PEP8 checker testcase in Django 1.8 project

I'm trying to add pep8 checker testcase to my Django 1.8 project. I found this package: https://github.com/TracyWebTech/django-test-pep8 If I followed the README.md install guide except the INSTALLED_APPS part, because in my project it's a list of…
fodma1
  • 3,097
  • 1
  • 23
  • 41
0
votes
2 answers

Django: How to test that data has loaded into a database?

I am running a Django 1.8 site with a large database behind it (it's basically a GUI on this database). I have some management commands to load the full dataset into the database. This is quite an involved process (since the dataset is large, and…
Richard
  • 52,447
  • 93
  • 287
  • 475
0
votes
0 answers

Why would Django not migrate an app to create tables in Mysql?

Using Ubuntu 14.10, Python 2.7 and MySQL I am trying to makemigrations and syncdb for Django 1.8, I have included the app in my INSTALLED_APPS settings, created the DB in MySQL and of course put Models into the app. When I go to $ python manage.py…
Akseone
  • 17
  • 1
  • 1
  • 7
0
votes
0 answers

How do I route multiple domains in Apache to multiple Django projects?

So i'll start off by explaining my goal. I have multiple domains that I am routing to a simple IP address on my server. I want Apache to route each domain to the appropriate wsgi.py file in its Django project. It seems the official Docs are written…
TysonU
  • 422
  • 3
  • 14
0
votes
1 answer

Django 1.8 issue with user authentication

When I try to authenticate a user with Django 1.8: authenticate(username=, password=) I am getting this error: lookup_cast() takes exactly 2 arguments (3…
UnLiMiTeD
  • 980
  • 1
  • 8
  • 15
1 2 3
26
27