Skip to main content

Django app for adding users to a database.

Project description

Django-Serverside

build test coverage vulnerabilities Code style: black

This is a Django app that allows you to create database users directly from the Django admin interface. This is useful for data science applications. For example, you can allow privileged users to make advanced SQL queries from tools like Matlab, Excel, Python, R and others.

Note that creating database users from an application requires the application to have the privilege to create new database users. This may pose an unacceptable vulnerability to your database. For example, an attacker may exploit a bug in your application with which the attacker acquires the privileges to do anything with your database. Therefore, you should only use this app for django projects that are isolated from the public and operate in an environment with trusted users.

Prerequisites

Django-Serverside currently only works with PostgreSQL.

Installation

You may install Django-Serverside in your python environment using pip as follows:

python -m pip install django-serverside

Then, add serverside to the list of installed applications in the settings file of your Django project like so:

INSTALLED_APPS = [
    "serverside",
    "django.contrib.admin",
    ...
]

Finally, replace your default user model as described in the Django documentation by adding the following line to your settings file:

AUTH_USER_MODEL = "serverside.User"

Documentation

To view the developer documentation, clone the repository to your local machine and open docs/html/index.html.

Running Tests

You may run the tests shipped with Django-Serverside yourself by editing the tests/settings.py file and providing your own database credentials. The default connection settings are:

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "HOST": "localhost",
        "PASSWORD": "12345",
        "NAME": "serverside_db",
        "USER": "test_user",
        "TEST": {"NAME": "test_database"},
    }
}

From the root folder of this repository run:

python runtests.py

Building Wheels

You may build your own wheel files and documentation by running the following command:

python package.py build

Since this command will run tests before initiating the actual build, make sure you have configured your local test database correctly according to the Running Tests section.

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

django-serverside-22.3.65.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_serverside-22.3.65-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file django-serverside-22.3.65.tar.gz.

File metadata

  • Download URL: django-serverside-22.3.65.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for django-serverside-22.3.65.tar.gz
Algorithm Hash digest
SHA256 477da994a04ee5344ea734e38bca3020ebd81e77587714bcff0e0adecc5c879f
MD5 98f808340f25954cffb2145a092a190c
BLAKE2b-256 f45dedd88a69a15e9f347dde01fd74f46c064307950db8a29ee9581d35e8c395

See more details on using hashes here.

File details

Details for the file django_serverside-22.3.65-py3-none-any.whl.

File metadata

  • Download URL: django_serverside-22.3.65-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for django_serverside-22.3.65-py3-none-any.whl
Algorithm Hash digest
SHA256 fcd3c6839ac1ad06b57f8db14bcedede626303a808ffcc652f0be015f9d99aa2
MD5 4902b5a6e286074e208ff65cc7538355
BLAKE2b-256 8efb811bce78595dcfa926b67c3b1c0f40e5dc871424f3861ffe969ca062e14a

See more details on using hashes here.

Supported by

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