Enable form widgets to be rendered with user customizable template engines.
- Rendering should be customizable. User's should be able to use Jinja2, DTL or any custom loader they wish. It should be easily configurable.
import json | |
request = RequestFactory().post( | |
"/url/", | |
content_type="application/json", | |
data=json.dumps([1,2,3]), | |
) | |
# or |
Includes a reload and update command.
Reload sends a SIGHUP to the gunicorn process. This does a graceful reload if the preload
option isn't set.
Update sends a SIGUSR2 which starts a new master process. It then sends a QUIT to the old process, which gracefully shuts it down after all connections are closed. This works with the preload
option.
I got the idea from Benoit's comment, here:
from django.template import Template | |
from django.test import TestCase | |
from django.test.client import RequestFactory | |
from django.test.utils import ( | |
setup_test_template_loader, | |
restore_template_loaders, | |
override_settings, | |
) | |
class TemplateTest(TestCase): |
/* -- boxel --------------------------- */ | |
.boxel { | |
background-color: #eee; | |
border-radius: 4px; | |
padding: 10px 0; | |
color: #666; | |
text-align: center; | |
-webkit-transition: background-color 0.25s linear; | |
-moz-transition: background-color 0.25s linear; |
Install a .deb file
dpkg -i package_file.deb
Uninstall a .deb file
dpkg -r package_name
git clone git://repo.or.cz/fast-export.git
git init git_repo
cd git_repo
~/Desktop/fast-export/hg-fast-export.sh -r /path/to/old/mercurial_repo
git checkout HEAD
from django.test.utils import ( | |
setup_test_template_loader, | |
restore_template_loaders, | |
) | |
class MyTest(TestCase): | |
def setUp(self): | |
setup_test_template_loader({ | |
"basic.html": "Basic", |
include README.md | |
global-include *.html | |
global-include *.js | |
global-include *.css | |
global-include *.json | |
global-include *.txt | |
global-include *.sql |