mwinokan / HIPPO

Hit Interaction Profiling for Procurement Optimisation
https://hippo.winokan.com
5 stars 0 forks source link

Refactor backend to use Django's ORM #179

Open mwinokan opened 1 week ago

mwinokan commented 1 week ago

Django ORM

Prototyping on django_orm

mwinokan commented 5 days ago

comparison blog post

Django ORM without Django

example setup Models docs

import django
from django.conf import settings

settings.configure(
    DATABASES={
        'default': {
            'ENGINE': '<your_engine>',
            'NAME': '<database_name>',
            'HOST': '<hostname_or_ip>',
            'PORT': '<port>',
            'USER': '<user>',
            'PASSWORD': '<super_secret_password>',   
        }
    },
    INSTALLED_APPS=[
        '<your_app>',
    ]
)
django.setup()