-
Notifications
You must be signed in to change notification settings - Fork 28
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 #73 from hartwork/improve-sample-project
Improve sample project
- Loading branch information
Showing
5 changed files
with
45 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
on_error_exit() { | ||
echo "ERROR: Command \"${BASH_COMMAND}\" at ${BASH_SOURCE} line ${BASH_LINENO} failed with exit code $?." >&2 | ||
} | ||
trap on_error_exit ERR | ||
|
||
cd "$(dirname "$0")" | ||
|
||
echo ">>> Removing old environment" | ||
if [ ! -d env ]; then | ||
rm -rf env | ||
fi | ||
echo ">>> Installing django into new virtualenv" | ||
virtualenv env -p python3 | ||
env/bin/pip install --upgrade pip setuptools wheel | ||
env/bin/pip install -r requirements.txt | ||
env/bin/pip install -e ../ |
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 was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
sampleproject/demoapp/migrations/0003_emptymodel_related_testfieldsmodel.py
This file was deleted.
Oops, something went wrong.
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,10 +1,15 @@ | ||
from django.conf.urls import url | ||
from django.conf.urls.static import static | ||
from django.conf import settings | ||
from django.urls.base import reverse_lazy | ||
from django.views.generic.base import RedirectView | ||
|
||
from django.contrib import admin | ||
admin.autodiscover() | ||
|
||
urlpatterns = [ | ||
url(r'^admin/', admin.site.urls), | ||
url(r'', RedirectView.as_view(url=reverse_lazy('admin:app_list', | ||
kwargs={'app_label': 'demoapp'})), | ||
name='frontpage'), | ||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) |