Skip to content

bryancitu/django-mongolight

Repository files navigation

Django-MongoLight

A library light for integrate Django with MongoDB

Instalation

pip install django-mongolight
  • Use
  1. Configura tu base de datos en settings.py:
DATABASES = {
    'default': {
        'ENGINE': 'mongolight',
        'NAME': 'mydatabase',
        'HOST': 'localhost',
        'PORT': 27017,
    }
}

2.Create models:

from django.db import models
from mongolight.fields import ObjectIdField

class User(models.Model):
    _id = ObjectIdField(primary_key=True)
    name = models.CharField(max_length=100)

About

A lightweight library for integrating Django with MongoDB.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages