Data dodania Pytanie
2017-01-04 15:01 How to filter queryset by ForeignKey and ManyToMany using Q properly? »
I got an error message that says: 'User' object does not support indexing I try to filter queryset using Q to get a query that contains objects ...
(1) odpowiedzi
2017-01-04 02:01 How to allow users to dynamically set the scheduled time for email reports within a web framework? »
Right now, I am using crontab to send out scheduled emails. The way I have been doing it is using a web framework like Django, CakePHP, or Laravel, a...
(1) odpowiedzi
2017-01-03 23:01 Database structure and queries for a Twitter-like posts timeline »
I'm posting this question with a Django tag, because I'm working in this environment, but it's actually more or a generic question: I'd like to show s...
(3) odpowiedzi
2017-01-03 20:01 Filter a contenttype with list of content object's field »
I creating an app where users can post with its related tags: class Tag(models.Model): name = models.CharField(max_length=255, unique=True) clas...
(2) odpowiedzi
2017-01-03 19:01 Django url warning urls.W002 »
Sorry in advance if this question look a bit superfluous but is something that is really bothering me. I have a set of API's written in Django defin...
(3) odpowiedzi
2017-01-03 16:01 502 error django + nginx + gunicorn - connect() recv() »
I've set up a Digital Ocean one-click app (django + nginx + gunicorn are installed and setup https://www.digitalocean.com/community/tutorials/how-to-u...
(2) odpowiedzi
2017-01-02 18:01 How to efficiently store a two-dimensional array with different File types in a Django Model (PostgresSQL) »
I will like to store in a Django model the variations on the price of some houses for a date. For example: House.objects.create(name='house1', prices...
(0) odpowiedzi
2017-01-02 08:01 Divide Django base.html template into header, content and footer.html »
Hi I have extended Django Admin templates into my app/templates/admin directory.. in that directory I have base.html which contaions <header> h...
(2) odpowiedzi
2017-01-02 07:01 Django year validation returns "Ensure this value is less than or equal to 2016" in year 2017 »
In my database, I have a record where the year field is 2016 but I need to change it to 2017. When I use Django admin to change it 2017, I get "Ensure...
(1) odpowiedzi
2017-01-02 06:01 Query intermediate through fields in django »
I have a simple Relation model, where a user can follow a tag just like stackoverflow. class Relation(models.Model): user = AutoOneToOneField(Use...
(1) odpowiedzi
2017-01-01 11:01 Django Celery task on Heroku causes high memory usage »
I have a celery task on Heroku that connects to an external API and retrieves some data, stores in the database and repeats several hundred times. Ver...
(2) odpowiedzi
2017-01-01 05:01 Django Celery Eventlet - Getting "No address found" error »
I am currently using celery default prefork for concurrency and I want to use Eventlet. I tried to install Eventlet and used it for concurrency, but ...
(2) odpowiedzi
2017-01-01 03:01 How to deploy a multi-tenant django app to AWS? »
I have an Django+Postgres app that has a multi-tenant structure and I don't have prior experience deploying this type of app to AWS. I have followed t...
(1) odpowiedzi
2016-12-31 20:12 Many to Many or One to Many Django »
I have the following two models in Django. One is basically an extension of the base Django user class and the other is a company model. I want to say...
(1) odpowiedzi
2016-12-31 18:12 Best way to determine a new site user - Django »
I want a way of checking if someone has filled out their profile information (new user) with django. If they havn't I want to show a modal that won't ...
(2) odpowiedzi
2016-12-31 05:12 Where to store certificates used in Django? »
I have a bunch of authentication files and certificates I'm using with Django (mostly around push notifications). Where should I store these? Is it ...
(1) odpowiedzi
2016-12-30 22:12 Django Meta ordering in related query »
How do you set a default order for Django queries that works on related managers? You can set a default order with Meta.ordering: class Subject(Mode...
(1) odpowiedzi
2016-12-30 16:12 Django - ReverseManyToOneDescriptor' object has no attribute 'all' »
I can see alot of related questions to mine and when i check them out, from what i can see my code should be working, but im getting the below error? ...
(1) odpowiedzi
2016-12-30 06:12 How to convert Foreign Key Field into Many To Many Field without disturbing existing data in the database? »
My code snippet is as follows : class Table1(models.Model): name = models.CharField(max_length=20) class Table2(models.Model): name = models...
(2) odpowiedzi
2016-12-29 09:12 URL dispatcher not working »
I am creating a simple form in Django that takes inputs as username, email, password and adds them to database. Now when I click on submit button the ...
(1) odpowiedzi
2016-12-29 08:12 Django AJAX login form validation »
I'm trying to create an AJAX login form in Django, which would involve checking if the user has entered the correct username and password. Here is my ...
(1) odpowiedzi
2016-12-29 05:12 Python Package Paths :: Finding Directories that Should Be .py Files »
As I work through the Django tutorials, I like to see with my own eyes the module and class/attribute that I am inheriting via import by going to the ...
(1) odpowiedzi
2016-12-28 21:12 Mass creation of data in Django »
I have a model Unit. class Unit(CommonInfo): version = IntegerVersionField( ) number = models.CharField(max_length=30,null=True, blank=True) ...
(1) odpowiedzi
2016-12-28 13:12 Strange case insensitive select behavior Django + mysql »
I Have simple model in Django: class Tag(Model): name = CharField(unique=True, max_length=50) When I do: t = 'Ansible' print("Want tag: " + t)...
(1) odpowiedzi
2016-12-28 01:12 Django 1.10 Using csrf Token »
Novice Django user here. I am trying to use csrf for my form because if I don't I get this message: (and of course protection against forgery) CSRF ...
(4) odpowiedzi
2016-12-28 01:12 Unable to access values in Request »
I am not understanding how to access values in my POST request from within my Python API. Why can I not access the values in my API Request? I am cl...
(1) odpowiedzi
2016-12-27 14:12 Django REST: map 'update' to 'list' using CustomRouter »
Problem explanation: There is a Django project using REST API. The router is defined as: router = routers.DefaultRouter() The Accounts router: r...
(1) odpowiedzi
2016-12-27 13:12 django logout me after render_to_response() »
this is my views.py def createpost(request, id=None): form = PostForm(request.POST or None, request.FILES or None) if form.is_valid() and r...
(2) odpowiedzi
2016-12-27 11:12 Django: "Forbidden (403) CSRF verification failed. Request aborted." in Docker Production »
I am getting this error whenever I am trying to login into Django Admin or Whenever I try to signup in my Django application. I am using Production i...
(1) odpowiedzi
2016-12-27 07:12 Making dictionary from two lists »
I have two lists l1 = ['cat','dog'] l2= [1,2] Now I want to make a dictionary like this: dict { {'name':cat,'id'=1}{'name':dog,'id'=2}} I am us...
(2) odpowiedzi
2016-12-26 15:12 How to Hash Django user password in Django Rest Framework? »
I'm trying to create an API for my user registration using Django Rest Framework. I created a serializer by following the step from the api-guide cla...
(1) odpowiedzi
2016-12-26 11:12 How to recognise text file from my linux pc via django code without checking its extension and also its file size? »
Most of the time when we create a new text file with gedit in linux then the file is not saved with an extension of .txt for text file.So how will I r...
(2) odpowiedzi
2016-12-26 10:12 Django REST: Show details and list on 1 url »
There is a Django project that uses a REST API. Most of the url-patterns follow the same paradigm: /foo_config/1 Basically /list-view/details-view...
(1) odpowiedzi
2016-12-26 03:12 How to reference User foreign key in template? »
I can't seem to grasp this very well. So I have an Album model, which is using a class based view and I'm giving it the context with all objects: cla...
(2) odpowiedzi
2016-12-25 22:12 Sending an SMS to each group based on form selection(s) »
So I have an SMS app working perfectly with a Django form. I have an sqlite table "Employees" and each employee has one relationship of either "dcare...
(1) odpowiedzi