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

Django 1.9.7 in VS2015 Django Shell django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet

I'm a newcomer to Django. I was following a tutorial from MVA and i got stuck on one module where Django Shell was to be used to import a table(class) from the models.py file and use queries on it. When i try to import the table using the code …
0
votes
1 answer

Trying to create a button per object instance

I'm trying to make a list of buttons, each corresponding to an object in my database. However, when I press one of them, it is always the value of the last button generated which is sent back to the view: {% if segmenter %}
GZ_0
  • 27
  • 5
0
votes
1 answer

Django - Multiple PDFTemplateResponse (wkhtmltopdf)

I would like download a number of pdfs which correspond to len(list_element). I create pdf with one list (I use 2 elements on this list to "write" a pdf) but I can download the first pdf, not others. Thanks for your help. class…
Nosmoz RG
  • 15
  • 3
0
votes
1 answer

Django: Set initial value for ForiegnKey in a CreateView

I'm trying to create a view of type CreateView. This view will take the form_class = CourseForm that I created and excluded some fields in it. The instructor field is a foriegnKey and I don't want the user to be able to control it in the form. It's…
Algorithmatic
  • 1,824
  • 2
  • 24
  • 41
0
votes
1 answer

Extra field in django(1.9) registration (redux) without using implementing custom user model

I am fairly new to django and this might be a basic level question for someone experienced but any help will be greatly appreciated. I am trying to create a custom registration form for the user using django-registration-redux package. I have the…
0
votes
1 answer

Python 3 - Django 1.9 persistent messages

Is there some app which behaves the same as native Django messages framework, but can store messages/notifications permanently and to specific user (instead of storing them temporarily for the current session/user)? I searched over the Internet and…
softzer0
  • 445
  • 2
  • 7
  • 25
0
votes
1 answer

ModelForm has no model class specified when use model forms

I created a single web page that works for a data entry operator which enter the data to database. I used modelForm to take the data. When I use it django raise an error that "ModelForm has no model class specified". What should I do? model.py class…
Govinda Malavipathirana
  • 1,095
  • 2
  • 11
  • 29
0
votes
2 answers

Django 1.9 can not find newapp

I have worked with django 1.7 and recently started new project with django 1.9. The major difference with starting a new app was that new app is created with apps.py file. I read on django docs that now you have to use INSTALLED_APPS = [ …
Dishant Chavda
  • 444
  • 4
  • 12
0
votes
2 answers

Group objects by dates

clicks = SellerClick.objects.extra({'date' : "date(timestamp)"}).values('date').annotate(count=Count('timestamp')) The model has a datetime field called timestamp that was are using. I first, convert the datetime field to just a date field. Then…
User
  • 23,729
  • 38
  • 124
  • 207
0
votes
2 answers

Django 1.9 django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet

Trying to use django-shopify-sync in a Django 1.9 project. When loading the config for the app it gives me the following error, likely because it's trying to load some models in the config? Tried moving the the two imports that eventually import…
Andres
  • 2,880
  • 4
  • 32
  • 38
0
votes
1 answer

serialize data in Django

I have what I believe is a correct serializing function in Django (1.9) and a file that it writes to, but my function isn't being called. What am I missing? I've looked for a complete example, but cannot find one. Here's my function - no errors…
fstopzero
  • 1,073
  • 2
  • 10
  • 24
0
votes
1 answer

How can i show image field inside my RentListAPIView?

I have two models rental and gallery. My models look like this Models.py(shortened with less fields) class Rental(models.Model): ownerName = models.CharField(_("Owner's Name"),max_length=255, blank=True,null=True, help_text=_("Owner's…
pri
  • 620
  • 2
  • 9
  • 20
0
votes
1 answer

My API is not showing any pk of rental model

why my api is not showing any pk of rental model? I have used tastypie for rest api. Id of gallery model is shown but not of rental model.This is my code for api class RentalResource(MultipartResource,ModelResource): gallery =…
milan
  • 2,409
  • 2
  • 34
  • 71
0
votes
0 answers

500 internal server error while uploading images django

I have a form which is divided into two parts. I mean form has rental information fields and multiple image upload.I have used reactjs in frontend and django in backend.Rentals information are successfully saved to database but images are not.It…
pri
  • 620
  • 2
  • 9
  • 20
0
votes
0 answers

django import module from sibling app directory

I have Django Project with the following structure src/ apps/ __init__.py app_name/ ... serializers.py __init__.py ... project_name/ __init__.py settings.py static/ templates/ urls.py …
user2708148
  • 3
  • 1
  • 2