Skip to main content

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({})

Release files for enterprise 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enterprise 0.4.2
File Size Uploaded
enterprise-0.4.2.tar.gz 43.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for enterprise 0.4.2
File Interpreter ABI Platform
enterprise-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size:127.4 kB

Release files / enterprise-0.4.2.tar.gz

Download URL enterprise-0.4.2.tar.gz
Size 43.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e22043b8525c5e5c9412dfeac10c7afb893a2308ebde7d024baf6d60268b56ba
BLAKE2b-256 checksum
How to use checksums
076c26012c1b5f2eab921431977536ac585c3f6306303e8de95f7d9e8460d293
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

Release files / enterprise-0.4.2-py3-none-any.whl

Download URL enterprise-0.4.2-py3-none-any.whl
Size 84.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdd1fadcafd24ccc19ed5fc57b7d463be1052d3256371962a14580c061633fb2
BLAKE2b-256 checksum
How to use checksums
ee50a84d5d60b2ea414bdbc6a34fed35ceea2c2d6ef9a9f5af8e6881271e366f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page