Name: djangomi
Owner: Futurice
Description: null
Created: 2015-10-28 14:09:40.0
Updated: 2017-10-14 11:17:49.0
Pushed: 2016-01-08 10:14:27.0
Homepage: null
Size: 3
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
When you need something up immediately and were tempted to use a microframework. Django Mi(ni) is your path to Django development.
Made for Django 1.9+.
pip install djangomi
p.py
djangomi.init import *
ings.ROOT_URLCONF = "app"
index(request):
return HttpResponse("Hello World!")
atterns = [
url(r'^$', index),
= get_wsgi_application()
_name__ == '__main__':
management.execute_from_command_line(sys.argv)
Django management commands available directly python app.py
(equivalent to running python manage.py
).
Develop: python app.py runserver
Everything should work as usual Django
Install pip install gunicorn
and run gunicorn app:app
To use external apps it is convenient to initialize the Django framework from within settings.
. celery.py
rt settings
djangomi.init import *
rt os
django.conf import settings
= os.path.dirname(os.path.realpath(__file__))
ings.ROOT_URLCONF = "app"
ings.TEMPLATE_DIRS = (
os.path.join(ROOT, 'templates'),
ings.INSTALLED_APPS += [
ngo.contrib.contenttypes',
ngo.contrib.auth',
ngo.contrib.admin',
ngo.contrib.sessions',
__future__ import absolute_import
ttings
rt settings
ews
django.http import HttpResponse
index(request):
return HttpResponse("Hello World!")
ls
django.conf.urls import patterns, url
atterns = [
url(r'^$', index),
anage.py'
rt sys
django.core import management
django.core.wsgi import get_wsgi_application
= get_wsgi_application()
_name__ == '__main__':
management.execute_from_command_line(sys.argv)