Data dodania Pytanie
2017-08-13 20:08 How to filter duplicate values? »
I have table like this in Django + postgres: ____________________ | room_id | user_id | |-------------------- | 1 | 100 | | 1 | 101 ...
(2) odpowiedzi
2017-08-13 19:08 Cannot assign a user in Django »
i have a simple chat application where i've customize the Authentication back end to use only the name. So far it is working and the users is logged i...
(2) odpowiedzi
2017-08-13 18:08 I would like to generate 4 levels dropdown form using django model forms »
I would like to build a multilevel dropdown hierarchy in Django using Models.And informations should be updates dynamicaly without reloading the page....
(1) odpowiedzi
2017-08-12 22:08 NOT NULL constraint failed Django CreateView »
I would like to accomplish two goals on this project. First, I would like to save the logged-in user as the reviewer. Second, I want to pass the lawye...
(1) odpowiedzi
2017-08-12 20:08 Django,debug True or False »
I try to follow tutorial from Udemy,Learning Django from Scratch.I have come to this point OK,then I change DEBUG in settings file to False.After th...
(3) odpowiedzi
2017-08-12 09:08 how to load a class in admin.py based on user permissions »
I have been developing an application for song link submission in django, and I would like to make some field non-editable for the staff users in the ...
(1) odpowiedzi
2017-08-11 17:08 Create a hyperlink to external website in django »
I have a little problem about creating a hyperlink to an external website in django, for example in to the google.com I have in my html file something...
(1) odpowiedzi
2017-08-11 15:08 Django/VueJS/PostgreSQL adding leading/trailing whitespace tabs »
I have a text-field in Django I'm maintaining using Django-admin that requires preservation of white-space. As a result I'm wrapping it in a <pre&g...
(1) odpowiedzi
2017-08-11 03:08 The table-striped class is not giving me alternate color »
I was hoping to have alternating color for my table. However, all rows become grey after I applied the table-striped class. I tried to load both v3 an...
(2) odpowiedzi
2017-08-10 18:08 How to calculate 3D distance (including altitude) between two points in GeoDjango »
Prologue: This is a question arising often in SO: 3d distance calculations with GeoDjango Calculating distance between two points using latitude lo...
(2) odpowiedzi
2017-08-10 11:08 What's the most elegant way to convert requests' response to DRF response in Django? »
Consider the following flow: public client ----> DRF API on Service A ------> DRF API on Service B Some of the DRF API on Service A merely pr...
(2) odpowiedzi
2017-08-10 09:08 Why does 'DIRS' only have an effect when APP_DIRS is False? »
Why does 'DIRS' in TEMPLATES in settings.py only have an effect when 'APP_DIRS' is set to False? I tried to load a custom html widget, but changing t...
(1) odpowiedzi
2017-08-10 07:08 Django - performance difference between join/no join existence filter »
currently I have a Tinder-like application that functions off the following models class User(models.Model): id = models.BigAutoField(primar...
(0) odpowiedzi
2017-08-09 13:08 Using Scrapy DjangoItem but it won't save the item »
I'm learning Python and Django and for my personal project, I'm just playing with Scrapy for scraping website data and links. It took me almost two d...
(1) odpowiedzi
2017-08-09 09:08 Django complex filter and order »
I have 4 model like this class Site(models.Model): name = models.CharField(max_length=200) def get_lowest_price(self, mm_date): '''T...
(4) odpowiedzi
2017-08-09 06:08 Bootstrap modal: Send modal data to the parent page in the form of list django »
I am working with django templates, there is a part where I have a modal which has various textboxes in the form of a table. I need to send the data f...
(0) odpowiedzi
2017-08-08 20:08 How does Django understand the difference between slug and id in view functions? »
I'm new to Django framework and have some troubles with its view functions and the arguments it accepts. For example, consider the following view func...
(1) odpowiedzi
2017-08-08 15:08 python django allauth terminal error »
I am new to django so I followed books and I tried to implement django AllAuth after putting the right codes in the appropriate place I got an error w...
(2) odpowiedzi
2017-08-08 10:08 Django - 'ContactForm' object has no attribute 'get' »
I get the follow error no matter what way I do achieve my forms. This happens when I go to the URL of my form. forms.py class ContactForm(forms.Mod...
(2) odpowiedzi
2017-08-07 18:08 csrfToken is only valid after page refresh - Django »
I am running into a weird issue with Django CSRF tokens in my SPA. When I render my application I ensure that the token is set using ensure_csrf_cook...
(2) odpowiedzi
2017-08-07 17:08 Django 'Include' template with css/js »
I have a generic template, used for including html (ie. a menubar in menubar.html) into other app templates, through the include tag. It has some defi...
(2) odpowiedzi
2017-08-07 14:08 unsupported operand type(s) for <<: 'str' and 'int' while reading file »
I am writing unit test cases. I create a file objects and reading it, but I am getting the following error: unsupported operand type(s) for <&l...
(1) odpowiedzi
2017-08-06 17:08 Extract Products/Prices/Categories/Specs from Amazon Inventory »
I am a Django developer and recently I got some project where I need to render Amazon's inventory to Django website. Is there some sort of solution th...
(1) odpowiedzi
2017-08-06 15:08 ValidationError when submitting a form with custom date format »
When submitting a django form i am getting a ValidationError. In my form this is my input: 01/01/2017 But django tell me that the format must be 'AAA...
(1) odpowiedzi
2017-08-06 15:08 How to access serializer.data on ListSerializer parent class in DRF? »
I'm getting an error when trying to access serializer.data before returning it in the Response(serializer.data, status=something): Getting KeyErro...
(2) odpowiedzi
2017-08-05 14:08 Django : Escaping Html in Django Admin field? »
I want to have a hyperlink in my Django Admin Dashboard. But Django admin is escaping the html. admin.py @admin.register(OrderReport) class OrderRep...
(1) odpowiedzi
2017-08-05 12:08 Is django-channels suitable for real time game? »
I want to make a real time game, I wanted to use NodeJS-SocketIO or aiohttp, Until I met django-channels, then i read its documentation. This is a go...
(0) odpowiedzi
2017-08-05 09:08 Django ORM, how to use values() and still work with choicefield? »
I am using django v1.10.2 I am trying to create dynamic reports whereby I store fields and conditions and the main ORM model information into databas...
(4) odpowiedzi
2017-08-04 23:08 Unit tests fail after a Django upgrade »
I am trying to bring a Django project from version 1.8 to 1.11. Pretty much everything seems to work fine except unit tests. We have a base test class...
(0) odpowiedzi
2017-08-04 22:08 Override accepted renderer in django-rest-framework on exception »
I'm using django-rest-framework to create an endpoint which returns a PDF. However, when there is an error rendering the PDF, I want to return a JSON ...
(1) odpowiedzi
2017-08-04 20:08 Getting Error On First Run With Buildbot »
I'm following the docs trying to get Buildbot working for the first time and I keep getting the same error: 2017-08-04 13:58:45-0400 [-] while starti...
(1) odpowiedzi
2017-08-04 18:08 Django won't use postgres schema properly »
I have a problem with using schema while running tests with django. All tables in my postgres database are in schema, let's name it 'schema'. In my se...
(0) odpowiedzi
2017-08-03 19:08 RuntimeError: Never call result.get() within a task Celery »
I am using celery to send a task to remote server and trying to get the result back. The state of task is constantly updated using update_state method...
(2) odpowiedzi
2017-08-03 18:08 Why am I having this database issue? »
I am working on a Python/Django project, and we need to use two databases. Following the documentation I added a second database like this: DATABASE_...
(2) odpowiedzi
2017-08-03 13:08 how to skip empty get parameter in django »
I have URL like www.example.com/search?param1=abc&param2=xyz&param3=, currently what I'm doing in views is something like this. if ((reque...
(5) odpowiedzi