Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from seguri/testapp-1.4
testapp with working build script and django admin
- Loading branch information
Showing
4 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
#!/bin/sh | ||
|
||
mkdir build | ||
DOWNLOAD_DIR=./src | ||
|
||
pip install --download='./build' --no-install -r requirements.txt | ||
# test for git and hg commands | ||
for cmd in git hg; do | ||
command -v ${cmd} >/dev/null || { echo "sh: command not found: ${cmd}"; exit 1; } | ||
done | ||
|
||
unzip -q build/django-autoload-0.01.zip -d build | ||
unzip -q build/django-dbindexer-0.3.zip -d build | ||
unzip -q build/django-nonrel-1.4.5.zip -d build | ||
unzip -q build/djangoappengine-1.0.zip -d build | ||
unzip -q build/djangotoolbox-0.9.2.zip -d build | ||
# download all packages to ./src (default) | ||
pip install --no-install -r requirements.txt | ||
|
||
cp -r ${DOWNLOAD_DIR}/django-autoload/autoload ./autoload | ||
cp -r ${DOWNLOAD_DIR}/django-dbindexer/dbindexer ./dbindexer | ||
cp -r ${DOWNLOAD_DIR}/django-nonrel/django ./django | ||
cp -r ${DOWNLOAD_DIR}/djangoappengine/djangoappengine ./djangoappengine | ||
cp -r ${DOWNLOAD_DIR}/djangotoolbox/djangotoolbox ./djangotoolbox | ||
|
||
[ -f ${DOWNLOAD_DIR}/pip-delete-this-directory.txt ] && rm -rf ${DOWNLOAD_DIR} | ||
|
||
echo "Now run: | ||
./manage.py runserver | ||
To launch this app. If you want access to django /admin, run also: | ||
./manage.py createsuperuser | ||
And then login in <your_app_ip>/admin, probably http://127.0.0.1:8000/admin" | ||
|
||
cp -r build/django-autoload/autoload ./autoload | ||
cp -r build/django-dbindexer/dbindexer ./dbindexer | ||
cp -r build/django-nonrel/django ./django | ||
cp -r build/djangoappengine/djangoappengine ./djangoappengine | ||
cp -r build/djangotoolbox/djangotoolbox ./djangotoolbox | ||
|
||
rm -r ./djangoappengine/djangoappengine.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
from django.conf.urls.defaults import * | ||
from django.contrib import admin | ||
import dbindexer | ||
|
||
handler500 = 'djangotoolbox.errorviews.server_error' | ||
|
||
# django admin | ||
admin.autodiscover() | ||
|
||
# search for dbindexes.py in all INSTALLED_APPS and load them | ||
dbindexer.autodiscover() | ||
|
||
urlpatterns = patterns('', | ||
('^_ah/warmup$', 'djangoappengine.views.warmup'), | ||
('^$', 'django.views.generic.simple.direct_to_template', | ||
{'template': 'home.html'}), | ||
('^$', 'django.views.generic.simple.direct_to_template', {'template': 'home.html'}), | ||
('^admin/', include(admin.site.urls)), | ||
) |