Skip to main content

An easy way to setup a database site.

Project description

Install

  • Run virtualenv demoenv --no-site-packages

  • Run demoenv\Scripts\activate

  • Run pip install Django

  • Run django-admin startproject demo

  • Run pip install cosmicdb

Usage

  1. 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)
    )
  2. 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')),
    ]
  3. Add cosmicdb settings to your settings.py like this:

    LANGUAGE_CODE = 'en-au'
    COSMICDB_SITE_TITLE = 'Demo Site'
    COSMICDB_ALLOW_SIGNUP = False
    AUTH_USER_MODEL = 'cosmicdb.User'
    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
  4. Run python manage.py migrate

  5. Run python manage.py collectstatic

  6. Run python manage.py createsuperuser

Requirements

Django>=1.11

Dev Notes

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* for 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.19.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: cosmicdb-0.0.19.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cosmicdb-0.0.19.tar.gz
Algorithm Hash digest
SHA256 a7d9c0c0c5f0a70a7d1a5a08eaa50d8e93db2a93a38028ea6cac8834e235a722
MD5 d01a9290f1ef50d9d0e67ff78ae1c596
BLAKE2b-256 246377a8b1c5e36fa8672438871b8d224249ca7c6a09fa2e2e20b822caf56935

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cosmicdb-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 2c37294713f23825d3ea3c750dd7f9d166a54d35bad80569ef5f5be4a33f1496
MD5 cca7cb2b9edb3186e39d98bb26175cfb
BLAKE2b-256 b99776db57cc14af546e960940b89a179c3251a9a3f2e4256a23c745c886f363

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