Good tool for automatic setup and deployment of Django projects

2021 update Today I'm using Ansible for this and other devops tasks. Along the way I've experimented with Chef, Puppet, Saltstack and Docker images, but I've found that for me, as a solo...

Django getting related objects in a many-to-many relationship

I'm pretty new to Django and Python in general and I'm working on my first solo app and I'm having a little trouble figuring out how to do something with my models: class A(models.Model): bs =...

django rest-framework singleton ViewSet

I need to pass a set of config-settings (key-value pairs) through the django rest_framework to an api-enpoint. Read-only is fine. Django 1.7, Python3 and rest-framework v3.0.5. I have pip...

install django using vagrant with chef-solo provisioner

As an absolute Chef beginner I try to set up a vm with the latest python and django. I use the "ubuntu/trusty64" box and was surprised that its python3 version does not come with pip and pyvenv...

'WSGIRequest' object has no attribute 'mode' after adding easy_thumbnails context_porcessors

I'm trying to add to easy_thumbnails context processors in my settings.py and got the next error: WSGIRequest' object has no attribute 'mode' Context processors config: TEMPLATES = [ { ...

Django: All IntegerField in a single instance of a model must be unique to one another

I am using django-solo to create a model which can have only one instance of it type. https://github.com/lazybird/django-solo I have a model like this class...

Migrating to Django 1.8 - makemigrations creates two new migration files in the contrib/auth/migrations/ folder

I am migrating from Django 1.6.5 to Django 1.8.4 I was using South for migrations in 1.6.5 and I followed the instructions here for removing South and using Djangos inbuilt...

Django error when migrating with default field function that queries database

I'm trying to create a default field callable like this: from datetime import date, timedelta from django.db import models class Preferences(models.Model): expiration_days =...

Pip installing wrong version of a dependency - django

I am running an old RHEL5 server and would like to install a beta version of the python module openrem from pip. I create a virtual env in my folder and issue the command pip install...

Django Tenant and Django Guardian configuration settings.py

I have been experiencing issues configuring Django Tenant and Django Guardian. I want to separate users per schema. Where should I put Guardian and how should I configure it? So far I also tried...

Asynchronious email sending using celery doesn't work

I'm trying to make Django not to wait until an email is sent. I've decided to use Celery to do that. Unfortunately I can't figure out how to make it work asynchronously. I've created a file...

Jobtastic/Celery/RabbitMQ - AsyncResult is always PENDING

I am using Django, Celery, and Jobtastic to try to set up some tasks that I will be polling for on my main webapp. I am using RabbitMQ as my broker. The problem is that while the tasks show up...

How to get user's input using django class based view

EDIT 2: Complete traceback with the line context = super(ComecandoView, self).get_context_data(**kwargs) uncommented. If I change this line to context = {} I don't get any errors, but still can't...

Django 1.11.5 templates in nested folders

I have a problem with Django Templates in nested folders. My project has the next schema: . ├── eventus │   ├── eventus │   │   ├── __init__.py ...

celery task not processed by celery

total celery and django noob here, so sorry if the problem is trivial. Basically the problem is that any function defined by @app.task is not being processed by celery, it just runs normally as if...

can't locate what's causing RemovedInDjango110Warning

I got this in my log, after upgrading python from 2.7 to 3.5, there is no full stack trace, I'm not sure how to fix...

ValueError: Cannot quote parameter value [] of type <class 'list'> Django ArrayField

Hellow, Well I tried to add an ArrayField to one of my models but when using migrate, I get this error : C:\Users\ordinateur\Documents\AAA\jeanclaude56>python manage.py migrate System check...

Celery task worker not updating in production

I have set up a django project on an EC2 instance with SQS as broker for celery, running through Supervisord. The problem started when I updated the parameter arguments for a task. On calling the...

ValueError when upgrading from Django 1.8 to 1.9

I have recently upgraded a project to 1.9 from 1.8.11, Everything worked fine on 1.8 and I have worked through the deprecation warnings and cleaned a lot of things up within the project. When I...

TypeError at /search/ search() missing 1 required positional argument: 'request'

I'm trying to add search filters for my django-taggit tags in my Django project but I keep getting a TypeError. I'm using Django-Haystack and Elasticsearch for the search functionalities, and this...

AttributeError at /search/ 'QuerySet' object has no attribute 'facet'

I'm Getting an AttributeError: (AttributeError at /search/ 'QuerySet' object has no attribute 'facet') while setting up custom filters for django-taggit tags with Haystack The search function is...

Django DRF - Group by date

I need to group the result of a queryset by date on DRF """ Django model """ class Matches(models.Model): name = models.CharField(max_length=100) platform =...

Issue getting django celery worker started on elastic-beanstalk

I am trying to get my celery worker running on elastic-beanstalk. It works fine locally but when I deploy to EB I get the error "Activity execution failed, because: /usr/bin/env: bash": No such...

How to have javascript presets today's date in HTML form

I am developing a project with Django. I have an html webpage containing a form which has a date field. I want javascript compile it with today's date as soon as my user lands on that webpage, so...

Running celeryd-worker on elastic-beanstalk

I am trying to get celery set up on elastic-beanstalk to run periodic-tasks. I have gotten everything running except for the celeryd-worker on elastic-beanstalk. It deploys fine and it is...

How do I ensure that my Django singleton model exists on startup?

I'm using a django third party app called django-solo to give me a SingletonModel that I can use for some global project settings, since I don't need multiple objects to represent these...

Deploying Multiple Django Websites with Apache & mod_wsgi Windows

I am using mod_wsgi in a virtualenv with Apache 2.4 and I want to serve multiple Django sites from the same server. httpd.config ### Configuration Site_1 LoadModule wsgi_module "...

Should I split my Django and DRF project into separate projects?

I am currently at the planning stage of an app that will consist of standard Django part for supervisors that can perform all CRUD operations on employee users mostly add, delete and view...

AWS Elasticbeanstalk post deploy script problem

I'm trying to run the celery worker after my application has been deployed to AWS Elasticbeanstalk. 99_celery_start.sh #!/usr/bin/env bash #make dirs sudo mkdir -p /usr/etc/ sudo chmod 755...