Apache gunicorn
Related cards:
django tables2 installation
Django-tables2 is Available on pypi and can be installed using pip:
pip install django-tables2
After installing, add 'django_tables2' to INSTALLED_APPS and make sure that 'django.template.context_processors.request' is added to the context_proces...
django sitetree install
- Add the sitetree application to INSTALLED_APPS in your settings file (usually ‘settings.py’).
- Check that django.core.context_processors.request is added to TEMPLATE_CONTEXT_PROCESSORS in your settings file. For Django 1.8+: django.template....
apache django setup
ctos-7
files
file | description
/etc/httpd/conf/httpd.conf | main config file
/etc/httpd/conf.d/ | config subdir
/etc/httpd/conf.modules.d/00-base.conf | enable wsgi_module
[Instructions](https://www.digitalocean.com/community/tutori...
apache django mod_wsgi
install mod_wsgi.so
add to base.conf
nano /etc/httpd/conf.modules.d/00-base.conf
add this line
LoadModule wsgi_module modules/mod_wsgi.so
django apps in subfolder
Given a sub-directory named "apps" for all django applications, the following steps are used to setup the sub-directory and create apps.
1 create app sub folder - "apps"
mkdir apps
touch apps/__init__.py
2 add app to sub folder:
...
django create app in subdir
To create a "polls" app in the "apps" sub-directory, do the following first to make the directory (assuming you are at the root of your django project):
mkdir apps/polls
Next, run startapp to create "polls" in under the "app" project di...
django apps in subfolder
sample manage.py
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
# Add the apps directoriy to Python's path. In production it will
# be n...
django rename app
Before renaming
Always migrate databases before changing the app name.
manage.py makemigrations
when you see the following message then it is safe to proceed with renaming the app.
No changes detected
Fixed table names
...
django reset migrations
django-reset-migrations
pip install django-reset-migrations
manage.py reset_migrations app1 app2
Background
vue delimiters in django
Sample delimiter replacement for django
<script>
new Vue({
delimiters: ['[[', ']]'],
el: '#app',
data: {
title: 'Welcome to My Journal'
}
})
</script>
See Also
[vuejs with django](https://scotch.io/bar-talk/build-an-app-wit...