raunak-r / tech-notes

A repository to store code snippets, general functions, and any other notes taken for various technologies and tools. See ISSUES Tab for in-depth studies.
2 stars 0 forks source link

Django #10

Open raunak-r opened 4 years ago

raunak-r commented 4 years ago

Django General Framework

Learning

Custom Commands

URL Framework

Further Reading

raunak-r commented 4 years ago

Working with Data in Django

Django ORM

Creating Data

Migrations

Using Inbuilt Django Models

Notes

If blank=True then the field will not be required, whereas if it's False the field cannot be blank. The exception is CharFields and TextFields, which in Django are never saved as NULL. Blank values are stored in the DB as an empty string ('') CHAR and TEXT types are never saved as NULL by Django, so null=True is unnecessary.

Optimizations

https://medium.com/better-programming/django-select-related-and-prefetch-related-f23043fd635d

raunak-r commented 4 years ago

Integrating Tools with Django

Using Databases

Celery

Short Readme on integrating Redis and Celery with Django - https://github.com/raunak-r/tech-notes/issues/19#issuecomment-891148167 List of all files - https://gist.github.com/raunak-r/bdc622e22b985d5b4bb0c15914272596

Flower Integration

Others

Scaling Celery

-Using seperate queues - https://blog.codeparrot.ai/how-we-scaled-celery-for-our-django-app-da2465a3a6be

raunak-r commented 4 years ago

Django ORM Objects

Model Inheritance to create new Models

Foreign Keys

raunak-r commented 4 years ago

Django - Angular Serving as a Single Page

Checklist

  1. Packages
  2. Middleware GETTING THE PATH FROM ANGULAR.JSON projects.architect.build.options.
  3. STATICFILES_STORAGE = 'spa.storage.SPAStaticFilesStorage' STATIC_URL, STATIC_ROOT, FRONTEND_APP_DIR
  4. STATICFILES_DIRS = [ (os.path.join(ANGULAR_APP_DIR)), ]
  5. Add URL
raunak-r commented 4 years ago

Django - CORS | CSRF | HTTPS

raunak-r commented 4 years ago

Django - Admin

django-admin-cookbook

raunak-r commented 3 years ago

Cleaning | Efficiency | Maintainability

https://dev.to/djangodoctor/48-of-django-projects-could-simplify-models-py-in-these-3-ways-1anc?fbclid=IwAR3FCAm-r4Ksg0yDa8RNEgu7PLRH22hH2bolktZochtt_x2BNcDKE1Fw150

raunak-r commented 3 years ago

Async Django

https://www.simplecto.com/djang-async-task-postgres-not-kafka-celery-redis/?fbclid=IwAR1gD3UQL1XxD0UAqfnUhyiK3ytqaMMBvJjvmLrCv9Cuj_EGzIklm3nBPws

raunak-r commented 3 years ago

Production | Deployment

Aws, S3, RDS, CI-CD

Scaling

Scaling Celery

raunak-r commented 11 months ago

Testing

https://vedantsopinions.medium.com/test-driven-development-like-a-boss-e17679a2ed72

raunak-r commented 11 months ago

Metrics

raunak-r commented 11 months ago

Socket Programming