Category : django

How do you solve the problem below Not sure how i messed up my postgresql configuration (role + password etc…) I am using docker-compose django postgres13.3 db | 2021-07-23 13:05:23.221 UTC [1] LOG: starting PostgreSQL 13.3 (Debian 13.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit db | 2021-07-23 13:05:23.222 UTC [1] LOG: listening ..

Read more

When I run the following command: docker-compose run django python manage.py startapp hello OR docker-compose run django python manage.py createsuperuser Instead of starting a new container, it opens a Postgres shell. However, when I’m using exec, like so: docker-compose exec django python manage.py createsuperuser Then it works as expected. Here is my docker-compose.yml file: version: ..

Read more

I am making a project using amazon_kclpy in docker, i am directly running a file through docker command CMD $(amazon_kclpy_helper.py –print_command –java /usr/bin/java –properties ./code/apps/events_consumer/main.properties), in main.properties folder there is a comand to run base.py file, now i want to save data in redis, i am doing everything right, i checked it through python manage.py ..

Read more

I have been working on a task for a few days. Building a separate Dockerfile (not using docker-compose just a stand alone Dockerfile) that is supposed to produce an image and run a cron job which I have not done before. I believe I am almost there, but running into a config/settings issue when running ..

Read more

How should I create and install the requirements.txt file in order to be able to read it properly when running docker-compose up? Problems when running docker-compose up with the requirements.txt created via pip freeze > requirements.txt requirements.txt: certifi==2021.5.30 charset-normalizer==2.0.3 Django==2.2.5 django-cors-headers==3.7.0 django-rest-framework==0.1.0 djangorestframework==3.12.4 idna==3.2 psycopg2 @ file:///C:/ci/psycopg2_1612298715048/work python-decouple==3.4 pytz @ file:///tmp/build/80754af9/pytz_1612215392582/work requests==2.26.0 sqlparse @ file:///tmp/build/80754af9/sqlparse_1602184451250/work ..

Read more

The Django builtin Development Server has the "feature" of filtering out HTTP Headers containing underscores: https://github.com/django/django/blob/7785e03ba89aafbd949191f126361fb9103cb980/django/core/servers/basehttp.py def get_environ(self): # Strip all headers with underscores in the name before constructing # the WSGI environ. This prevents header-spoofing based on ambiguity # between underscores and dashes both normalized to underscores in WSGI # env vars. Nginx and ..

Read more

I have a Django application and related services running on an EC2 ubuntu instance. The static files are being stored and fetched from S3 using django-storages library and are working fine when I start the services using docker-compose. But recently I tried to set it up on 2 different EC2 servers running under same security ..

Read more