Skip to main content

CosmicDB Django App

Install

Initial setup

virtualenv demoenv --no-site-packages
demoenv\Scripts\activate
pip install cosmicdb
django-admin startproject demo

Usage

Add cosmicdb and requirements to your INSTALLED_APPS setting like this (your app must be first to override)

INSTALLED_APPS = (
    'YOURAPPHERE',
    'cosmicdb',
    'crispy_forms',
    'django_tables2',
    ... (rest of django apps)
)

Add cosmicdb.urls to your urls.py like this (put cosmicdb urls last)

    from django.conf.urls import url, include

    urlpatterns = [
        ...
        url(r'^', include('cosmicdb.urls')),
    ]

Add cosmicdb settings to your settings.py like this::

LANGUAGE_CODE = 'en-au'
COSMICDB_SITE_TITLE = 'Demo Site'
COSMICDB_ALLOW_SIGNUP = True
AUTH_USER_MODEL = 'cosmicdb.CosmicUser'
LOGIN_URL = '/login/'
CRISPY_TEMPLATE_PACK = 'bootstrap3'
DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap-responsive.html'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'test@test.com'
EMAIL_HOST_PASSWORD = 'testpassword'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
DEFAULT_FROM_EMAIL_NAME = COSMICDB_SITE_TITLE

Run

python manage.py migrate

python manage.py collectstatic

python manage.py createsuperuser

Dev Notes

install required packages for packaging

pip install setuptools twine wheel

adjust cosmicdb/init.py for version number

python setup.py sdist bdist_wheel

replace the following line with version number

twine upload dist/cosmicdb-VERSION_NUMBER*

twine upload dist/cosmicdb-0.0.32*

Metadata

Release files for cosmicdb 0.0.33

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

Source distribution (sdist)

Source distribution for cosmicdb 0.0.33
File Size Uploaded
cosmicdb-0.0.33.tar.gz 4.4 MB Details

Built distribution (wheel)

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

Total release size: 8.9 MB

Release files / cosmicdb-0.0.33.tar.gz

Download URL cosmicdb-0.0.33.tar.gz
Size 4.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7fc6aee76a25e082a6c164047509886ee3b33d61730a1637f40a8de5f804da85
BLAKE2b-256 checksum
How to use checksums
c8661249657a5157928d7362f6950f3236df9bed7ec17514b162d73bb3de61de
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/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Release files / cosmicdb-0.0.33-py3-none-any.whl

Download URL cosmicdb-0.0.33-py3-none-any.whl
Size 4.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
42490457e901a9e9f9e45093af8ac6482ed0f3264c7ad6da825b3315ce991a5a
BLAKE2b-256 checksum
How to use checksums
22baa198c9feb837fbb382f1920b10fb9a35ee4f2b7e936b00399f14fa2c76bf
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/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.0.33 This release

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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