Skip to main content

An easy way to setup a database site.

Project description

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',
    'dal',
    'dal_select2',
    '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.1*

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

cosmicdb-0.0.29.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

cosmicdb-0.0.29-py3-none-any.whl (4.5 MB view details)

Uploaded Python 3

File details

Details for the file cosmicdb-0.0.29.tar.gz.

File metadata

  • Download URL: cosmicdb-0.0.29.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for cosmicdb-0.0.29.tar.gz
Algorithm Hash digest
SHA256 ed3475eee3ea3629a551dbeea735804130beb7dee38384b445c98b82f31512ba
MD5 646dd35a32635d0d7937fd6d3fa456c9
BLAKE2b-256 2c691e32e454c0142119604182af412e2ae0b9f75431bec2397d81feb6108b0d

See more details on using hashes here.

File details

Details for the file cosmicdb-0.0.29-py3-none-any.whl.

File metadata

  • Download URL: cosmicdb-0.0.29-py3-none-any.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for cosmicdb-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 c1be4ba7feaf1e2d1db09ac220fc8feddb0ba6f75c1d2dae6b734e450f4d53d1
MD5 898e708904150c7db46cd1eadeb90928
BLAKE2b-256 c9eb86dcdabb94f91a713336867e659ed1a698009ec82e9fb13597cbcce11d62

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