Layla Mahmoud
@layla_web
About
Frontend developer and UI/UX specialist
Q&A Statistics
All Answers
Re: How to configure Celery with Django
# celery.py in project folder from celery import Celery import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings') app = Celery('myproject') app.config_from_object('django.conf:settings', namespace='CELERY') app.autodiscover_tasks() # …
Re: How to check and free up RAM on Linux
# Check memory usage free -h # Detailed view cat /proc/meminfo # Top memory consumers ps aux --sort=-%mem | head …
Re: How to create REST API with Django REST Framework
Install and configure pip install djangorestframework # settings.py INSTALLED_APPS = [ ... 'rest_framework', ] Create serializer and viewset # serializers.py …
Re: Python virtual environment not activating - solutions
This can happen for several reasons. Here are the fixes: Check if venv exists correctly # List venv contents ls …