Metadata-Version: 2.1
Name: cosmicdbsemantic
Version: 0.0.38
Summary: An easy way to setup a database site.
Home-page: https://bitbucket.org/davidbradleycole/cosmicdbsemantic
Author: David Cole
Author-email: davidbradleycole@gmail.com
License: BSD License
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Description-Content-Type: text/markdown
Requires-Dist: asgiref (==3.2.10)
Requires-Dist: beautifulsoup4 (==4.9.1)
Requires-Dist: bleach (==3.2.1)
Requires-Dist: certifi (==2020.6.20)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: colorama (==0.4.3)
Requires-Dist: Django (==3.1.1)
Requires-Dist: django-crispy-forms (==1.9.2)
Requires-Dist: django-sitetree (==1.15.2)
Requires-Dist: django-tables2 (==2.3.1)
Requires-Dist: docutils (==0.16)
Requires-Dist: idna (==2.10)
Requires-Dist: importlib-metadata (==1.7.0)
Requires-Dist: keyring (==21.4.0)
Requires-Dist: packaging (==20.4)
Requires-Dist: pkginfo (==1.5.0.1)
Requires-Dist: Pygments (==2.7.1)
Requires-Dist: pyparsing (==2.4.7)
Requires-Dist: pytz (==2020.1)
Requires-Dist: pywin32-ctypes (==0.2.0)
Requires-Dist: readme-renderer (==26.0)
Requires-Dist: requests (==2.24.0)
Requires-Dist: requests-toolbelt (==0.9.1)
Requires-Dist: rfc3986 (==1.4.0)
Requires-Dist: six (==1.15.0)
Requires-Dist: soupsieve (==2.0.1)
Requires-Dist: sqlparse (==0.3.1)
Requires-Dist: tqdm (==4.49.0)
Requires-Dist: twine (==3.2.0)
Requires-Dist: urllib3 (==1.25.10)
Requires-Dist: webencodings (==0.5.1)
Requires-Dist: zipp (==3.1.0)

# 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*
```


