Data dodania Pytanie
2017-06-06 17:06 Template Tag not working with csrf_token »
I am attempting to create a custom template tag to display a comment. When I try submitting a reply through the form attached to each comment, I get ...
(1) odpowiedzi
2017-06-06 15:06 Setting up django parallel test in setting.py »
Hello I know that it's possible to run tests in django in parallel via --parallel flag eg. python manage.py test --parallel 10. It really speeds up te...
(1) odpowiedzi
2017-06-06 13:06 Django - How to filter a ManyToMany model object? »
I have the following models which are linked via a foreign key and ManyToMany relationship. from django.db import models from django.contrib.auth.mod...
(1) odpowiedzi
2017-06-05 16:06 How to return object with its ManyToManyField related object »
I have a model, for example, A has a field xxx (ManyToManyField with B model). How can I query and return like: { 'f1': 'xxx', 'f2': 'yyy', ...
(2) odpowiedzi
2017-06-05 08:06 Optimizing postgres contains (LIKE) query in django for CHAR field »
So I've got a query for a search endpoint in my Django (postgres) backend like so: widgets = Widgets.objects.\ filter(user=request.user).\ fi...
(1) odpowiedzi
2017-06-05 08:06 django cache REST API Urls issue »
I have followed the solution provided in Stack overflow Link & it is working perfectly when i use this from my browser. However, when i tried hitt...
(1) odpowiedzi
2017-06-04 22:06 django wagtail page not found when i don't use "127.0.0.1:8000" »
I have added the following to my settings.py ALLOWED_HOSTS = ['0.0.0.0','127.0.0.1','192.168.0.05'] My url.py urlpatterns = [ url(r'^django-admin/...
(1) odpowiedzi
2017-06-04 17:06 django-phone-number-field error on get_or_create method »
I am getting an error on get_or_create method of the Django model that contains PhoneNumberField(django-phonenumber-field==1.3.0) field. It was worki...
(1) odpowiedzi
2017-06-04 00:06 Django: How to filter for keyword in multiple fields on a model? »
I have Article model with title and body fields. I'm building a search functionality and need to filter for articles that have keywords either in titl...
(1) odpowiedzi
2017-06-03 13:06 Date Picker does not shown up »
I am new to frontend developer. Normally I do backend and infra. how to show datepicker calender on datefield I am trying to add datepicker to my pag...
(1) odpowiedzi
2017-06-03 08:06 how to compare values in unequal zip list in django? »
I have two unequal lists and I have zipped it and passed it as a context from my view.In my template, I have a multi select drop down where I want to ...
(1) odpowiedzi
2017-06-03 08:06 Django: Startapp Generated files into existing project folder »
I want to place django app files into generated Django project folder . MyProject/ MyProject/ settings.py urls.py here i want to ...
(1) odpowiedzi
2017-06-02 17:06 Django case insensitive "distinct" query »
I am using this django query people.exclude(twitter_handle=None).distinct('twitter_handle').values_list('twitter_handle', flat=True) My distinct qu...
(2) odpowiedzi
2017-06-02 17:06 Why do I get different results if I use first() vs last() on a QuerySet with the length of 1 »
while writing a testcase for a method I discovered that I get different results if I use my_queryset.first().my_annotated_value than when I use my_que...
(1) odpowiedzi
2017-06-02 01:06 Django post 403 from frontend app »
I can't manage to make a successful post request to my database, I keep getting post url 403 (Forbidden). I think it's because of my csrf token sinc...
(0) odpowiedzi
2017-06-02 00:06 Overriding Djangorest ViewSets Delete Behavior »
I have defined a Model like this: class Doctor(models.Model): name = models.CharField(max_length=100) is_active = models.BooleanField(defaul...
(1) odpowiedzi
2017-06-01 14:06 Django DB records disappears after first testcase run »
I'm working on a project based on Django REST Framework. So I need to write some test cases for my REST API. I've written some basic class (let's ca...
(1) odpowiedzi
2017-06-01 09:06 How to retrieve foreign key field in Django rest framework? »
Given the model and serializer classes below, when I retrieve Track details, it'll only show the Track title but not the related Artist. How would I...
(3) odpowiedzi
2017-06-01 07:06 How to use multiple tables for authenticating users in django rest? »
Hi I am starting a new project and i need to create separate tables for user(CustomUser model) and vendor(Vendor model) and authenticate user from Cu...
(1) odpowiedzi
2017-05-31 22:05 Unable to save checkbox data »
i am really exhausted i didn't find any solution for this till now. I was trying to create a table to view all the data save by the user. The problem ...
(1) odpowiedzi
2017-05-31 15:05 django - use result of annotate in subsequent annotate »
I have the following model structure: Model A: [no question-relevant fields] Model B: linked_to = ForeignKey(A, related_name='involved') ...
(0) odpowiedzi
2017-05-31 01:05 django - limit the number of users »
(sorry for my english) Only a question, exist any way to limit the number of users that can be created in a Django App? I search in a lot of places ...
(1) odpowiedzi
2017-05-30 22:05 Upload image file using django rest framework in a single page application »
I am trying to upload image using Vuejs and Django, but I can't figure out how to solve it. This is the django side: class UserDetail(models.Model):...
(2) odpowiedzi
2017-05-30 19:05 Django CMS - DIVIO LogEntry add instance / Latest files added to the CMS »
I need to show at my Homepage a list with all the files added/changed as Bootstrap Filer plugin to my Django CMS project. I was using the LogEntry mod...
(1) odpowiedzi
2017-05-30 11:05 Django 1.9.0:Page not found 404 Django media files »
I am getting the error code 404 for the django media files. urs.py is as follows: from django.conf.urls import patterns,include, url from django...
(1) odpowiedzi
2017-05-29 13:05 Possibility of CSRF-related issues in cached sign up form (Django) »
I have a sign up page in a Django project which I've cached (using @cache_page(600) on the view). On the page itself, I'm testing a simple form like s...
(1) odpowiedzi
2017-05-29 10:05 Django ORM access optimization with Filter »
I've implemented a method on my django app that will check if a user has a specific permission or it's part of a group that contains this specific per...
(1) odpowiedzi
2017-05-29 09:05 Django1.10 cannot save korean characters(Mysql) »
I got the error below in django when saving a field with Korean character in the admin panel. OperationalError at /admin/blog/post/add/ (1366, "Incor...
(1) odpowiedzi
2017-05-29 01:05 Folder structure for React and Django REST »
I'm in the process of refactoring a rather basic/traditional Django webapp to a more modern React-plus-Django-REST setup. I'm far more familiar with D...
(1) odpowiedzi
2017-05-28 20:05 Django UpdateView: define fields dynamically via function instead of a member variable »
I have a really simple UpdateView, where my fields are defined by the member variable fields class DataUpdateView(generic.edit.UpdateView): templ...
(2) odpowiedzi
2017-05-28 20:05 How to update datatable using Ajax in Django »
I have a table that performs a CRUD operation using ajax, but I am new to ajax. I have made the table interactive with the jquery datatable, but it i...
(0) odpowiedzi
2017-05-28 16:05 How to serve collected static files with Django's development server? »
I am trying to make Django's development server to serve static files that have been collected by the python manage.py collectstatic command. For now ...
(1) odpowiedzi
2017-05-28 07:05 How to return the same order in dict - django python »
I try to build a dict with variables inside. The variables build another dict in the parent dict. for example: json_out = { "articles":{ ...
(0) odpowiedzi
2017-05-28 03:05 Getting certain values to appear in django form »
The image attached displays my current problem. Math 270 and Math 280 in the picture were created by another user and not Jay, who created Jays cour...
(2) odpowiedzi
2017-05-27 22:05 New users can't log in. Django »
I'm using a view to create new users in Django. And then I have another view to log them in. But when I create a user, and I try to log in with authe...
(1) odpowiedzi