Giter VIP home page Giter VIP logo

Comments (12)

raunak-r avatar raunak-r commented on September 26, 2024 1

Cleaning | Efficiency | Maintainability

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

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

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

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Integrating Tools with Django

Using Databases

Celery

Short Readme on integrating Redis and Celery with Django - #19 (comment)
List of all files - https://gist.github.com/raunak-r/bdc622e22b985d5b4bb0c15914272596

Flower Integration

  • Flower does not process tasks. You must run both, then Flower can be used as a monitoring tool.
    Run celery:

celery -A tasks worker --loglevel=info
Open another shell and run flower:
celery -A tasks flower --loglevel=info

Others

Scaling Celery

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

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Django ORM Objects

Model Inheritance to create new Models

Foreign Keys

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

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

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Django - CORS | CSRF | HTTPS

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Django - Admin

django-admin-cookbook

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Async Django

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

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Production | Deployment

Aws, S3, RDS, CI-CD

Scaling

Scaling Celery

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Testing

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

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Metrics

from tech-notes.

raunak-r avatar raunak-r commented on September 26, 2024

Socket Programming

from tech-notes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.