Data dodania Pytanie
2017-02-07 10:02 Django queries and joins »
I read in the Django documentation that in principle Django queries are lazy, that is the database is not queried until absolutely necessary. Now, a...
(3) odpowiedzi
2017-02-07 00:02 Django skips particular migration(No Migrations to apply) »
I am working on an app at Django 1.9 I created altered one field from User model (max_length to 120 from 40). I know the migration has not run and i ...
(1) odpowiedzi
2017-02-06 17:02 How to connect Django Rest Framework with contrib.auth views »
I am using DRF with JWT (JSON Web Token) authentication. I want to use django's built-in reset password functionality. So, I have included the urls: ...
(1) odpowiedzi
2017-02-06 13:02 Django cannot import settings »
I'm trying to use django-admin dbshell (any other cmd gives the same result) on my project. And I got You must either define the environment variabl...
(2) odpowiedzi
2017-02-06 01:02 Django Ajax 'GET' »
newbie here. I am trying to get some data from my database using ajax. In my views.py, def getEvents(request): eventList = Events.objects.all() ...
(2) odpowiedzi
2017-02-05 23:02 Make Celery use Django's test database without task_always_eager »
When running tests in Django applications that make use of Celery tasks I can't fully test tasks that need to get data from the database since they do...
(1) odpowiedzi
2017-02-05 10:02 Group by dictionary value in for loop »
I'm trying to group by dictionary value inside for loop in an django template. My template is as follows : <div id="engines-rows"> {% for...
(3) odpowiedzi
2017-02-05 07:02 Django Rest Framework Get Forms as json »
Django Rest Framework is populating the HTML form.Like This Is any way possible can get the html form in json format as well along with default behav...
(1) odpowiedzi
2017-02-04 13:02 Django related_name not found »
I have this model: class Person(models.Model): something ... employers = models.ManyToManyField('self', blank=True, related_name='employees')...
(1) odpowiedzi
2017-02-04 11:02 Session authentication with Django channels »
Trying to get authentication working with Django channels with a very simple websockets app that echoes back whatever the user sends over with a prefi...
(1) odpowiedzi
2017-02-04 08:02 How to get the part of a URL without protocol nor domain »
I have URLs of the form http://example.com/example/a/b/c.html https//www.example.com/ How do I get the path from the server root, without protocol ...
(2) odpowiedzi
2017-02-03 12:02 Django / PostgresQL jsonb (JSONField) - convert select and update into one query »
Versions: Django 1.10 and Postgres 9.6 I'm trying to modify a nested JSONField's key in place without a roundtrip to Python. Reason is to avoid race ...
(1) odpowiedzi
2017-02-03 11:02 Can't see background image on overlay »
I have an overlay containing a django form and the background image doesn't show up. I have a silhouette image in the background and that fills the pa...
(0) odpowiedzi
2017-02-03 10:02 Are php memcached and django memcached storage different? »
I am trying to implement Caching into my new Django project, the problem here is, the cache is set through a PHP server, and I need to read it from Dj...
(1) odpowiedzi
2017-02-03 07:02 Mixing Websockets and REST »
I'm writing a RESTfull api, where for example user can create new threads or new posts in a thread. This is where I would use normal POST request. My ...
(2) odpowiedzi
2017-02-02 14:02 Django: correct way to display dynamic images from arbitrary path »
In my django app there is a model with CharField "avatar", storing the filename of object's picture (different for each object). Pictures themselves a...
(0) odpowiedzi
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