CosmicDBSemantic Django App
Install
virtualenv demoenv --no-site-packages
demoenv\Scripts\activate
pip install cosmicdbsemantic --no-cache-dir
django-admin startproject demo
Add cosmicdb and requirements to your INSTALLED_APPS setting like this (your app must be first to override)
INSTALLED_APPS = (
'YOURAPPHERE',
'cosmicdb',
'crispy_forms',
'sitetree',
'django_tables2',
... (rest of django apps)
)
Add cosmicdb.urls to your urls.py like this (put cosmicdb urls last)
from django.contrib import admin
from django.urls import path, re_path, include
urlpatterns = [
re_path(r'^', include('cosmicdb.urls')),
path('admin/', admin.site.urls),
]
Add cosmicdb settings to your settings.py like this
LANGUAGE_CODE = 'en-au'
COSMICDB_SITE_TITLE = 'Demo Site'
CRISPY_TEMPLATE_PACK = 'semanticui'
CRISPY_ALLOWED_TEMPLATE_PACKS = (CRISPY_TEMPLATE_PACK)
DJANGO_TABLES2_TEMPLATE = 'django_tables2/semantic.html'
COSMICDB_ALLOW_SIGNUP = True
AUTH_USER_MODEL = 'cosmicdb.CosmicUser'
LOGIN_URL = '/login/'
EMAIL_USE_TLS = True
EMAIL_HOST = 'mysmtp.smtp.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = 'mysmtpuser'
EMAIL_HOST_PASSWORD = 'mysmtppw'
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
DEFAULT_FROM_EMAIL_NAME = COSMICDB_SITE_TITLE
SITETREE_MODEL_TREE = 'cosmicdb.CosmicDBTree'
SITETREE_MODEL_TREE_ITEM = 'cosmicdb.CosmicDBTreeItem'
Run
python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser
Load sitetree from site-packages for now
python manage.py sitetreeload SITE_PACKAGES_DIR/cosmicdb/treedump.json
Installation Complete!
See the demo project at https://bitbucket.org/davidbradleycole/demosemantic/src/master/
Optional
Custom Semantic UI Themes
NodeJS (npm)
Gulp
npm install -g gulp
npm install -g gulp-cli
Add NODE_PATH env
Semantic UI
cd PROJECT_DIR\cosmicdb\res\
npm install semantic-ui --save
Put semanticui in semantic
cd semantic/
gulp build
Now you can copy your own theme from dist to cosmicdb\static\
cd PROJECT ROOT
cp -rf cosmicdb/res/semanticui/semantic/dist cosmicdb/static/cosmicdb/semantic
Site Tree
Generate sitetree
python manage.py sitetreedump > treedump.json
Dev Notes
adjust cosmicdb/init.py for version number
rm -rf build
python setup.py sdist bdist_wheel
replace the following line with version number
twine upload dist/cosmicdbsemantic-0.0.1*
Metadata
Release files for cosmicdbsemantic 0.0.39
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cosmicdbsemantic-0.0.39.tar.gz | 4.8 MB | Without provenance | Details for cosmicdbsemantic-0.0.39.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cosmicdbsemantic-0.0.39-py3-none-any.whl | Python 3 | none | any | Details for cosmicdbsemantic-0.0.39-py3-none-any.whl |
Total release size: 9.7 MB
Release files / cosmicdbsemantic-0.0.39.tar.gz
| Download URL | cosmicdbsemantic-0.0.39.tar.gz |
|---|---|
| Size | 4.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80129c974110b57959461853dbf3195539fb4eb09796d11f5c0d60c165b89128
|
|
BLAKE2b-256 checksum How to use checksums |
006b2b5f7b885e782b045b00d98fc5343be48bf840f63a23693141bff38b22fd
|
| 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 / cosmicdbsemantic-0.0.39-py3-none-any.whl
| Download URL | cosmicdbsemantic-0.0.39-py3-none-any.whl |
|---|---|
| Size | 5.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61a7fb53db33434bf3bc2c24ae1a1225ad7402b2c422fc24ba8d50eeaa734c2f
|
|
BLAKE2b-256 checksum How to use checksums |
39a8f77ad9709c9eeabea97e54485aa19be5ef231d83a421be0a939424fdcc92
|
| 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
|
Security for cosmicdbsemantic 0.0.39
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.