Mocking Django Storages Model ImageField backend S3

I have a model with an ImageField that is backed by django-storages' S3Boto. I have a test the exercises the "upload image" view, but the fact that it is uploading the image to S3 is slowing down...

Django admin.py Unknown command: 'collectstatic'

I have upgraded from django 1.2.7 to django 1.5.1 I am using python 2.6.6 When i try to run python manage.py collectstatic i get Unknown command: 'collectstatic' from my settings.py ...

Why running django's session cleanup command kill's my machine resources?

I have a one year production site configured with django.contrib.sessions.backends.cached_db backend with a MySQL database backend. The reason why I chose cached_db is a mix of security with read...

celery: daemonic processes are not allowed to have children

In Python (2.7) I try to create processes (with multiprocessing) in a celery task (celery 3.1.17) but it gives the error: daemonic processes are not allowed to have children Googling it, I found...

Heroku error : Compiled slug size: 624.7M is too large (max is 300M) - using miniconda for scipy and numpy

I am working with Python 2.7.11, Django 1.9 and Heroku. I need to use scipy and numpy. Everything works well locally but Heroku returns an error when I push the application : "Compiled slug size:...

Celery Beat unable to find database models (django.db.utils.OperationalError)

I have to add few periodic tasks. I'm using Celery - Redis in Django platform. When I execute the method from shell_plus all is well . However Celery Beat is unable to find the database instance...

django-celery-beat not sending tasks to celery worker

I was using celery only in django first. This was my config, from __future__ import absolute_import import os from celery import Celery from celery.schedules import crontab ...

Find the PYTHONPATH/env bitnami uses and how to use it

I've setup the one-click install of bitnami on Google Cloud. It's got Django 2.0 installed and that only works with python 3.x shown when I get out of a virtualenv I've created (djangoenv)...

RabbitMQ or Redis exploding Celery queues with Django 2.0

I am encountering a problem with celery and Django 2. I have two running environments: Production: requirements.txt => No...

From django 1.6 to 1.11: AppRegistryNotReady exception

In my REST-like API, I have a mechanism to allow users to customize models (add custom fields and add custom models). This relies on a set of models describing the customizations. Here is a...

Django mod_wsgi: ImportError: No module named 'home'

I have a Django project that runs without issue using the dev server (runserver), but fails when serving through Apache/WSGI. Ubuntu 16.04 Python 3.5.2 Django 2.0.4 mod_wsgi 4.6.4 The error is...

Using Celery, how do I post rabbitmq messages to another docker container?

It appears my celery workers launch and connect properly on the mymachine.domain.com:port where the rabbit mq resides in a separate docker container. However when I call the function apply_async...

Sending http requests from docker container using same network as sending requests from host machine

My application is dockerized. Its python/django application. We are using a local sms sending api that is restricted on IP based. So I have given them my EC2 ip address. And I am running my docker...

"No module named 'rest_auth'" Error even though I have rest_auth installed?

"ModuleNotFoundError: No module named 'rest_auth'" Error even though I have rest_auth installed? Full Error Log: Unhandled exception in thread started by <function check_errors.<locals>.wrapper at...

docker container exits on entry points

I am trying to run a docker container through Dockerfile with docker run command. Following is my Dockerfile. FROM python:3.6 # for imaging stuff RUN apt-get update RUN apt install...

Shell saying that django_cleanup module I've installed don't exist

Like in title I've installed django_cleanup by using: pip install django-cleanup and put in INSTALLED_APPS: INSTALLED_APPS =...

"Error while running '$ python manage.py collectstatic --noinput'" after changing database on django

I'm a bit of a beginner with Django so forgive me if I'm missing some necessary information. I recently revised my database on settings.py and I keep getting an error when I run git push...

"Django_content_type already exists" - after running migrate on server after database restore

I've migrated across to a server environment, and finally got everything working. The django project is rendering properly, but there seems to be a big problem with the migrations/database. When I...

gitlab + GKE + AutoDevops auto-deploy deploy fail. error: arguments in resource/name form must have a single resource and name. How to find a mistake?

I am new to gitlab CI. So I am trying to use https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml, to deploy simple test django app to the...

`wagtailimages` not found in reverse data migration for custom image field

TLDR: Getting error: LookupError: No installed app with label 'wagtailimages'. once the custom data migration is executed in wagtail which causes all tests to fail, as Django can't find the app...

Your requirements.txt is invalid. AWS Elastic Beanstalk, Django

i am new to aws and django. I was tryinh to upload my code to aws elastic beanstalk using code commit while i am getting the following error 2020/03/12 13:42:30.200017 [ERROR] Command timed out...

How can I solve this error [ModuleNotFoundError: No module named 'django.utils.inspect']

When I launch my Django project in a local server, It doesn't work with the errors. It seems finally has an ImportError of the Django, but first I want to solve the error brow. because, I checked...

How to use Ansible 2.9.2 python API to execute tasks?

I am using Ansbile 2.9.2 python API and python 3.7.2 to get crontab information from servers in hosts file. I look through the Ansible API document, but the sample code only works for...

Deploying Django to Elastic Beanstalk, migrations failed

I'm trying to deploy a project I've been working on with django. In development, i've been using SQLite, in production i'm trying to use MySQL. Usually when I create the EB instance, everything...

How To Create A Temp File Structure For Testing

During unit testing and Selenium functional testing files are generated which are not cleaned up afterwards. I have spent a very long time trying to get django-cleanup working, but it just does...

Could not import 'art_project.schema.schema' for Graphene setting 'SCHEMA'. ImportError: cannot import name 'DjangoFilterConnectionField'

I am using graphene.django, but i have some problems to connect to graphiql. All the files : project schema.py : import graphene import art_app.customers.schema as customer class...

elasticbeanstalk failed to deploy worker environment /var/pids/web.pid: no such file or directory

I am struggling with EBS for what I figured has a relatively simple architecture. I have a Django app. This Django app will contain code for both my worker environment and my WebServer.I have been...

Resolve django test RuntimeError on channels/async testcases

I'm trying to write a testcase for my django (3.2) channels consumer to implement websocket communication. I've managed to get the testcase to pass, but now it seems that the testcase teardown...

How can I solve the issue: No module named 'simple_history'

I have my application and I would like to track the historical models for each modification in Django. I have followed the instruction in this link:...

How to correctly install PyICU on Heroku?

I am trying to deploy my Python app on Heroku, but have been unsuccessful. It seems that a problem is occurring with the PyICU package, which I'm unsure how to correct. I've confirmed that this is...