Data dodania Pytanie
2017-02-02 08:02 Redirect from https to https doesn't work. Can't find server, ngnix »
I tried to run site on https instead of http and therefore to create a redirect. At the moment site works at https adress. If I enter http adress, red...
(1) odpowiedzi
2017-02-02 05:02 ng2-bootstrap dropdown not found »
I am having issue in my angular app to include ng2-boostrap. I am constently receiving this error in chrome console: GET http://127.0.0.1:8000/ng/nod...
(1) odpowiedzi
2017-02-01 15:02 Wagtail ModelAdmin with list_filter error: FieldDoesNotExist: Region has no field named 'p' »
I've got a model I'm exposing through Wagtail's modeladmin that works until I try to apply a list_filter including a ForeignKey. I've got a self-refer...
(1) odpowiedzi
2017-02-01 14:02 Mocking time issue in django test: time seems not to be frozen using freezegun »
I'm writing here a functional test to check if my API throttling is working as expected (will be rest at the beginning of every month). Testing Clas...
(1) odpowiedzi
2017-02-01 10:02 CSRF token missing or incorrect in django »
views.py from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.http import HttpResponse impor...
(1) odpowiedzi
2017-02-01 06:02 CSRF verification failed. Request aborted. Django »
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...
(1) odpowiedzi
2017-01-31 16:01 combination django linux pam »
i understand howto configure linux pam as backend https://github.com/ftao/django-pam http://django-pam.readthedocs.io/en/latest/modules.html it work...
(0) odpowiedzi
2017-01-31 16:01 Custom comments for viewset in api documentation »
I have django rest framework api application and generate documentation for it. I use api view with viewset and I have custom method. In urls I use ro...
(0) odpowiedzi
2017-01-31 11:01 Python Django: how to select the index type? »
As stated in https://docs.djangoproject.com/en/1.10/ref/models/fields/#django.db.models.Field.db_index, you can add indexes to your table using db_ind...
(1) odpowiedzi
2017-01-30 19:01 Django manage.py --no-input . Yes or no? »
I can't find this in the docs. When I run python manage.py collecstatic --no-input does it mean it will answer "yes" to any prompt that would pop up i...
(1) odpowiedzi
2017-01-30 13:01 Filling in .po files for translation of phrases with variable content »
I wasn't able to find in the doc, but I have no idea how to translate phrases that contain variable content. I have the following phrase in my Django...
(1) odpowiedzi
2017-01-30 08:01 Does Django (w/ MySQL) do only 1 table lookup or multiple when counting with CASE »
Lets say we have a model of the form class Person(models.Model): is_gay = models.BooleanField() is_tall = models.BooleanField() is_nice ...
(1) odpowiedzi
2017-01-29 21:01 Serialization error: Incorrect type. Expected pk value, received Post »
I'm trying to create an object with nested serialization so other objects that relate to it are also created. I've overridden the create() method for ...
(1) odpowiedzi
2017-01-29 21:01 Limiting the options of foreign key in ModelAdmin returns "Select a valid choice" »
I am attempting to limit the option to a foreign key in the admin app for a specific user (The field that i am trying to limit is called school) . Thi...
(1) odpowiedzi
2017-01-29 14:01 super() takes at least 1 argument (0 given) when cleaning data in form »
Trying to validate input in my form and I am getting super() takes at least 1 argument (0 given) cleaning a form class LeaseTermForm(forms.Mo...
(0) odpowiedzi
2017-01-29 07:01 Django : Assigning initial values to fields of a form in a subclass of ModelAdmin »
I am not sure how to assign values to fields in the form when it is presented to the user through the Admin App.What I am trying to do is present a fo...
(0) odpowiedzi
2017-01-28 17:01 Form Validation Reversed »
Django Version 1.10.5 I can't find this answer in the documentation or the code source. Using the example form below I am expecting my form validatio...
(1) odpowiedzi
2017-01-28 16:01 Using and further parsing of form.errors.as_json to return http response in Django »
I am relatively new to both JSON and Django forms. And I wonder how Djagno's user_form.errors.as_json() should be used to transfer error messages to c...
(1) odpowiedzi
2017-01-28 11:01 django rest form not valid error »
I have a model, model form and a view as follows: @api_view(['POST']) def addCigar(request): print(request.POST) form = CigarForm() if re...
(1) odpowiedzi
2017-01-27 23:01 How can I convert plain text password into PBKDF2 algorithm format in Django? »
I have list user information that I am pulling from some other database tool. The information in this tool is in plain text. I am using Django for my ...
(1) odpowiedzi
2017-01-27 10:01 Trace method resolution order at runtime »
I am working on some code (not mine) and I try to instand it. There 16 classes in the inheritance tree. Here area the class according to inspect.ge...
(2) odpowiedzi
2017-01-27 06:01 Aggregate grouped annotation »
I'd like to sum all the event durations per day. This is my model: class Event(models.Model): start = models.DateTimeField() end = models.Dat...
(1) odpowiedzi
2017-01-26 22:01 PyCharm issue with runserver command »
I have a script, part of a Django app, that makes thumbnails from pdfs. I'm using the excellent wand package to do it: Here are the Wand docs It runs...
(0) odpowiedzi
2017-01-26 17:01 Django as API + ReactJS - Redux: POST request with CSRF token but still response CSRF Token not set »
After looking around I wanted to be sure that I'm doing it right but I start doubting and worst: I'm running out of options / ideas. So I'm using dja...
(1) odpowiedzi
2017-01-26 06:01 When creating a custom User model in Django what is the difference between inheriting from models.Model and AuthUser? »
I've seen two ways of extending the User model in Django. Method 1: class User(AuthUser): new fields... Method 2: class MyUser(models.Model):...
(1) odpowiedzi
2017-01-26 01:01 Getting values from django model for further use in view »
I have a model with 3 fields (name, url, date). How can I get url in my view and put it inside method? sites = Site.objects.all().order_by('date')[:3...
(1) odpowiedzi
2017-01-25 23:01 Django celery and celery-beat daemonizing script error »
Im going to set periodic tasks with celery for what im trying to daemonize a django celery process in a test server using a script (referenced on the...
(2) odpowiedzi
2017-01-25 20:01 Converting KML into Postgis- Django/Python »
I am fairly new to Django and have been stuck on this for over a week. I am teaching myself how to code and trying to make a personal site with mappin...
(1) odpowiedzi
2017-01-25 10:01 Why Many to Many relationship with self can't be symmetrical »
I'm trying to make a model with many to many relationship to itself and this relationship will also have a specific table that will store some informa...
(1) odpowiedzi
2017-01-24 22:01 Django raw SQL queries with ForeignKey »
models.py class Author(models.Model): name = models.CharField(max_length=30) surname = models.CharField(max_length=50) class Exhibit(models....
(2) odpowiedzi
2017-01-24 13:01 Python- how do I get the object whose date field has the most recent value from a list of objects? »
I have a Django application in which I there are a number of projects. Each project can have a number of budgets, and every time a new budget is added...
(1) odpowiedzi
2017-01-24 13:01 Optimize and Scale my Webservers (Nginx + Gunicorn + Django stack) »
We have a web server setup running Nginx and Gunicorn which runs a Django application. There have been times that we received high load and got a lot ...
(0) odpowiedzi
2017-01-23 12:01 Retrieve related field's object in GET requests, otherwise use only ID of the object in POST, PUT, DELETE etc »
I have two serializers. The 'category' field in the Article is a ForeignKey. I want to retrieve category object completely when I do a GET request. A...
(1) odpowiedzi
2017-01-23 11:01 H14 error in heroku - "no web processes running" »
error H14 happen while deploying to heroku this is my procfile: web: gunicorn -w 4 -b 0.0.0.0:$PORT -k gevent main:app log on heroku: 2017-01-23T1...
(1) odpowiedzi
2017-01-23 09:01 Django Query set with distinct and exclude together »
I want to send notification to users who has previously commented in the request. So, for this aim, I have to find distinct users and exclude current ...
(1) odpowiedzi