Data dodania Pytanie
2017-06-19 23:06 Indexing Taggit tags with Algolia for Django: '_TaggableManager' object has no attribute 'name' »
I'm having some issues using the Algolia Django integration with one of my models which contains a TaggitManager() field. I'm currently being thrown b...
(3) odpowiedzi
2017-06-19 20:06 How to override wagtail authentication? »
When I attempt to access my wagtail back-office at /cms/, I get redirected to wagtail's login page, /cms/login/. However, I would like to use my own ...
(1) odpowiedzi
2017-06-19 10:06 How to catch single quote symbol (') into string for JSON.parse? »
I get a lot of data from Django into template as: var dataFromServer = JSON.parse('{{ delivery_provider|jsonify }}'); Anytime when into Django data...
(1) odpowiedzi
2017-06-18 22:06 Django: Can't query a foreign field »
I'm still a novice so any help is gladly appreciated. Running Django 1.10 I'm trying to retrieve all the profiles that are assigned a particular mana...
(2) odpowiedzi
2017-06-18 17:06 Class reference inside class scope in python »
Some Context I have the following django/python snippet: from rest_framework import serializers from .models import Profile, Task class Serializabl...
(2) odpowiedzi
2017-06-18 14:06 Django constance - on save method »
Is there any way to call django command after changing constance value? I need to call: python manage.py installtasks for my kronos cron jobs. I d...
(1) odpowiedzi
2017-06-18 12:06 Django-datatable-view X-editable internal server error »
I have been struggling with this one for a couple of days now. I would like to use django-datatable-view's xeditable columns integration. My code load...
(1) odpowiedzi
2017-06-17 21:06 Docker: How to rely on a local db rather than a db docker container? »
Overall: I don't want my django app to rely on a docker container as my db. In other words, when I run an image docker run -p 8000:8000 -d imagename ...
(2) odpowiedzi
2017-06-17 14:06 how to test a model that has a foreign key in django? »
I'm using python 3.5 and Django 1.10 and trying to test my app in tests.py, but an error appeared, it said: ValueError: Cannot assign "1": "NewsLetter...
(1) odpowiedzi
2017-06-17 11:06 How to get table name from Django filter objects »
I have diffrent tables with same columns Like class teachers(models.Model): x= models..CharField(max_length=250, blank=True, null=True); y= m...
(2) odpowiedzi
2017-06-17 08:06 How to solve the circular import error in django? »
I know the error is probably due to circular import error but not having much knowledge about it I am not able to correct it. I have tried using the m...
(2) odpowiedzi
2017-06-16 23:06 How to serve static files using Nginx and Django on Docker? »
I've read some posts about this issue on StackOverflow already but couldn't fix my issue with them, as the title says I'm trying to serve static using...
(1) odpowiedzi
2017-06-16 19:06 ValueError at /admin/zinnia/entry/add/ in Zinnia? »
When adding an entry using the admin site in Zinnia app in Django I get the following error? ValueError at /admin/zinnia/entry/add/ too many values ...
(2) odpowiedzi
2017-06-16 15:06 Django/AngularJS: CSFR Token Error »
I'm new to both Django and AngularJS and I've been struggling on this for hours. AngularJS Code (of my controller) to POST to Django Server: $http({...
(2) odpowiedzi
2017-06-16 10:06 How to force download an image on click with django and aws s3 »
I have this view, which takes a user_id and image_id. When the user cliks the link, check if there is an image. If there is, then I would like the fil...
(1) odpowiedzi
2017-06-16 10:06 How to dynamically select variable data columns from variable tables when the columns and the tables are dependent on stored data? »
Using Django 1.10, Python 3.5, I have stored various information about the columns and tables I want to use to extract data in another table called s...
(0) odpowiedzi
2017-06-15 10:06 Django resets connection on some requests »
I stub with problem that when sending some requests to Django sever, it closes connection before time. Here is simple project on Github Here is how...
(2) odpowiedzi
2017-06-15 08:06 Thread1:EXC_BAD_INSTRACTION »
I got an error Thread1:EXC_BAD_INSTRACTION. I am making Swift app and I wanna make a system in my app which upload a image to my Django server. When I...
(2) odpowiedzi
2017-06-15 00:06 factory_boy extract original kwargs »
I'm building a factory with factory_boy that generates a django model. I would like to see what arguments the user inputs inline. My factory itself lo...
(1) odpowiedzi
2017-06-14 15:06 OneToMany Relationship for more generic django apps »
I'm trying to figure out how to genereate a one-to-many relation ship (i.e. a "list of objects for one model to the other) without having to use a for...
(2) odpowiedzi
2017-06-14 13:06 NameError: name 'QuerySet' is not defined »
I'm getting the NameError: name 'QuerySet' is not defined error in below line. QuerySet(query=MappingTraineeQ.objects.filter(date__range=(startdate,e...
(1) odpowiedzi
2017-06-14 08:06 Trying to send value from javascript to python server »
I have multiple input tags, my task is to collect the values entered by the user and send it back to the server. I am using Django as my framework. I ...
(1) odpowiedzi
2017-06-13 23:06 Django set form field after POST request »
I'm using class-based views (FormView) and I would like to keep a search keyword after form is submitted (POST request). I tried this in form_valid me...
(4) odpowiedzi
2017-06-13 20:06 Filtering Django QuerySet based on ManyToMany relationship existence »
The Models Here is the basic models setup we have. A List has many Items, and an Item can be in many Lists. For a given Item, if any of its Lists ar...
(1) odpowiedzi
2017-06-13 19:06 Django form not saving password when creating user »
I have made a custom form for my django app which allows users to register themselves for the website. This is the form for my django app: class Tea...
(3) odpowiedzi
2017-06-12 12:06 Convert datetime printed by Django, to a different datetime format »
My web application works with datetime(s) as timestamps, which according to Django's error messages need to be in the following format: YYYY-MM-DD HH:...
(3) odpowiedzi
2017-06-12 12:06 Can I lookup a related field using a Q object in the Django ORM? »
In Django, can I re-use an existing Q object on multiple models, without writing the same filters twice? I was thinking about something along the lin...
(2) odpowiedzi
2017-06-12 11:06 How to insert emoji into MYSQL 5.5 and higher using Django ORM »
I am trying to insert emoji's into a certain filed in my mysql table. I ran alter command and changed the collation to "utf8mb4_general_ci" ALTER ...
(0) odpowiedzi
2017-06-11 21:06 Django Modal Not Loading »
Someone asked this same exact question but it did it not help me out. I tried implementing the tips, but my modal was still not loading within my djan...
(0) odpowiedzi
2017-06-11 13:06 Why won't my link navigate to the page that I want upon clicking it? »
In Chrome, I must manually type http://127.0.0.1:8000/music/1/ in order to get to the page that I want. (I want to go to page 1). However, When I ...
(1) odpowiedzi
2017-06-11 09:06 Why isn't the following Python script installing libraries using pip? »
I am trying to automate creating a project in Django with the following script. import os, sys, pip, virtualenv directory = sys.argv[1] if not os.pa...
(1) odpowiedzi
2017-06-11 01:06 Django SQL injection and XSS when do they take place »
Hi!! The only form of sécurity I used in django so far is {% csrf_token %} for forms.py and in the settings.py I use MIDDLEWARE_CLASSES = [ ...
(0) odpowiedzi
2017-06-10 19:06 Django - POST method in relational database model - table doesn't exist »
I would like to create Object2 for defined user ID in url. GET method in the example shown below works fine, but I can't create POST method. I will be...
(1) odpowiedzi
2017-06-10 16:06 Django - How to map object from another API and send in GET response »
I would like to map object from another API and send in GET response. I'm going to change only id of received object. Let's assume I get data from ano...
(2) odpowiedzi
2017-06-10 13:06 How to write views.py for (status) check in models.py »
How do I select the choice parameter "published" in models from views.py? In models.py, I have given choices the options of [draft,published]. I'm us...
(1) odpowiedzi