Skip to main content

A bunch of libraries for building backend enterprise on django

Project description

django-enterprise-core

A base core libraries and apps to build enterprise system using django

Installation

just pip install -e git+https://github.com/ardzix/django-enterprise-core.git#egg=enterprise in your python environment

Features

This repo contains work to build base structures of an enterprise system that includes:

Notable libraries like:

  • ProtectedMixin A library that handle your view permission based on django group of permission

  • TrackerMixin A library that handle your visitor tracking in each view

  • Rest Module base library bunch of libraries that will useful if you want to build a rest api

Base Apps that u will use in every development:

  • Authentication Don't worry about register, login, email verification etc. We handle it

  • Tracker App to track your visitor, a TrackerMixin viewer

  • SuperUser You want to manage another user inside your system? groups, permission, you name it. the super user app can handle it

The Structures

Structure holds models and admins of django

  • Authentication
  • Common
  • Integration
  • Tracker

Usage

  • Insert desired app(s) to installed_apps in your settings.py
    INSTALLED_APPS = [
        # ........
        'enterprise.apps.account',
        'enterprise.apps.superuser',
        # ........
    ]
  • Include the app's url
from django.contrib import admin
from django.conf.urls import url, include

from enterprise.apps.account import urls as account
from enterprise.apps.superuser import urls as superuser

urlpatterns = [
    # ...
    url(r'^account/', include((account, 'account'), namespace='account')),
    url(r'^superuser/', include((superuser, 'superuser'), namespace='superuser')),
    # ...
]

Libraries

Model lib

First thing first

Insert path bellow to your settings.py

    INSTALLED_APPS = [
        # ........
        'enterprise.structures.common',
        # ........
    ]

You can follow this example to create a model

from django.db import models
from enterprise.libs.model import BaseModelGeneric

# Create your models here.
class TestField(BaseModelGeneric):
    display_name = models.CharField(max_length=100)
    short_name = models.SlugField(max_length=100)

Protected Mixin

Protected mixin is a mixin for to protect view, it applies django permission and group to the implemented view

Just specify the namespace and model of the view

Example:

from enterprise.libs.view import ProtectedMixin
from django.views.generic import TemplateView 

class UserView(ProtectedMixin, TemplateView):
    template_name = "account/user.html"
    namespace = "account"
    model = "user"

    def get(self, request):
        return self.render_to_response({})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enterprise-0.4.1.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

enterprise-0.4.1-py3-none-any.whl (83.4 kB view details)

Uploaded Python 3

File details

Details for the file enterprise-0.4.1.tar.gz.

File metadata

  • Download URL: enterprise-0.4.1.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for enterprise-0.4.1.tar.gz
Algorithm Hash digest
SHA256 493bf3e377958cd2a6fea7ca0f688954319122950c8c04835e2e33f7fb0d82c7
MD5 1a94d57c290a2102221ce725a1cbc972
BLAKE2b-256 848b8601f49d923a784f1141a4e30f19d804212ff65f8fffca379cce657b393e

See more details on using hashes here.

File details

Details for the file enterprise-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: enterprise-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 83.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for enterprise-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 196938786b12856cb392a7b59482747f8fb766d001b97dfbf622365dd80a4d9c
MD5 4cba8d244d75ac175e4669f6482b1908
BLAKE2b-256 399a5993626db8e2f08f5bcbab026aeae71ba384fb2c258c04bc119d7960e920

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page