-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add setup-devel script for fast development patchwork config
Signed-off-by: Gabriel Ciubotaru <gabriel.ciubotaru@intel.com>
- Loading branch information
Gabriel Ciubotaru
authored and
Damien Lespiau
committed
Nov 8, 2015
1 parent
591591f
commit 9dc81df
Showing
7 changed files
with
3,978 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Django>=1.8,<1.9 | ||
-r requirements-dev.txt |
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
""" | ||
Quick development settings for patchwork project. | ||
Most of these are commented out as they will be installation dependent. | ||
Design based on: | ||
http://www.revsys.com/blog/2014/nov/21/recommended-django-project-layout/ | ||
""" | ||
|
||
from base import * | ||
from os.path import join, dirname | ||
|
||
# | ||
# Core settings | ||
# https://docs.djangoproject.com/en/1.6/ref/settings/#core-settings | ||
# | ||
|
||
# Security | ||
# | ||
# You'll need to replace this to a random string. The following python code can | ||
# be used to generate a secret key: | ||
# | ||
# import string, random | ||
# chars = string.letters + string.digits + string.punctuation | ||
# print repr("".join([random.choice(chars) for i in range(0,50)])) | ||
|
||
SECRET_KEY = '00000000000000000000000000000000000000000000000000' | ||
|
||
# Database | ||
# | ||
# SQLite database is used for development. | ||
# Please see https://docs.djangoproject.com/en/1.7/ref/settings/#databases | ||
# for documentation about database configuration. | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': join(dirname(__file__), 'db.sqlite'), | ||
}, | ||
} | ||
|
||
DEBUG = True | ||
TEMPLATE_DEBUG = True | ||
ENABLE_XMLRPC = True | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Patchwork - automated patch tracking system | ||
# Copyright (C) 2015 Intel Corporation | ||
# | ||
# This file is part of the Patchwork package. | ||
# | ||
# Patchwork is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Patchwork is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Patchwork; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
||
PORT=8000 | ||
CFG=patchwork.settings.dev-sqlite | ||
|
||
cd $(dirname $0)/.. | ||
. venv/bin/activate | ||
export DJANGO_SETTINGS_MODULE=$CFG | ||
./manage.py runserver ${PORT} | ||
deactivate |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Patchwork - automated patch tracking system | ||
# Copyright (C) 2015 Intel Corporation | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dlespiau
Owner
|
||
# | ||
# This file is part of the Patchwork package. | ||
# | ||
# Patchwork is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Patchwork is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Patchwork; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
||
|
||
CFG=patchwork.settings.dev-sqlite | ||
|
||
update_virtualenv() | ||
{ | ||
directory=$1 | ||
requirements=$2 | ||
|
||
[ -d "$directory" ] || virtualenv "$directory" | ||
source $directory/bin/activate | ||
pip install --upgrade -r $requirements | ||
} | ||
|
||
cd $(dirname $0)/.. | ||
|
||
update_virtualenv venv docs/requirements-dev-sqlite.txt | ||
export DJANGO_SETTINGS_MODULE=$CFG | ||
./manage.py migrate --noinput | ||
./manage.py loaddata test_data | ||
deactivate |
This doesn't have a shebang line, so you can't run it as a shell script as the docs suggest, at least not on my system?
Looks like that's due to my shell, it works OK if your shell is bash. But it should probably have a shebang line anyway.