Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
memopol
Commits
df377f9b
Commit
df377f9b
authored
Apr 23, 2017
by
okhin
🚴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development_features' into 'master'
Development features See merge request !192
parents
3a595a77
ee7174eb
Pipeline
#964
passed with stages
in 8 minutes and 41 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
0 deletions
+49
-0
.gitignore
.gitignore
+3
-0
bin/dev.sh
bin/dev.sh
+41
-0
bin/quickstart.sh
bin/quickstart.sh
+1
-0
src/memopol/settings.py
src/memopol/settings.py
+4
-0
No files found.
.gitignore
View file @
df377f9b
...
...
@@ -33,3 +33,6 @@ data/
# editors
*~
# local setup
.memopol.alias
bin/dev.sh
0 → 100755
View file @
df377f9b
#!/bin/bash
# Script to setup few usual aliases to facilitate the development
# This aliases should work if you've installed memopol throught the quickstart
# script or the documentation
# It :
# - Setup automaticaly the venv
# - Setup Django in DEBUG mode
# You just need to add a line in you're .bashrc or .zshrc to load them:
REPOROOT
=
"
$(
readlink
-m
"
${
BASH_SOURCE
[0]
}
"
/../..
)
"
ALIASROOT
=
$REPOROOT
"/.memopol.alias"
echo
$ALIASROOT
echo
"Create a dedicated alias file in
$ALIASROOT
"
echo
"alias memopol-code=
\"
cd
$REPOROOT
&& source
$REPOROOT
/memopol_env/bin/activate && DJANGO_DEBUG=True
\"
"
>
$ALIASROOT
echo
"alias memopol-launch=
\"
memopol-code && memopol runserver
\"
"
>>
$ALIASROOT
echo
"alias memopol-update-all=
\"
memopol-code && bin/update-all
\"
"
>>
$ALIASROOT
echo
"alias memopol-refresh-scores=
\"
memopol-code && memopol refresh_scores
\"
"
>>
$ALIASROOT
if
[
$SHELL
=
"/bin/bash"
]
then
echo
"Bash detected"
echo
"Update
$HOME
/.bashrc file"
RCSHELL
=
"
$HOME
/.bashrc"
elif
[
$SHELL
=
"/bin/zsh"
]
then
echo
"Zsh detected"
echo
"Update
$HOME
/.zshrc file"
RCSHELL
=
"
$HOME
/.zshrc"
else
echo
"SHELL don't supported. Try using BASH or ZSH, or manually."
fi
echo
"source
$ALIASROOT
"
>>
$RCSHELL
source
$ALIASROOT
echo
-e
"You can use the following aliases :
\n
"
echo
-e
"
\t
memopol-code : Go into the repository and activate the virtualenv"
echo
-e
"
\t
memopol-launch : Run the development server"
echo
-e
"
\t
memopoll-update-all : Get all the production data"
echo
-e
"
\t
memopol-refresh-scores : Refresh all scores"
bin/quickstart.sh
View file @
df377f9b
...
...
@@ -41,6 +41,7 @@ memopol migrate
# Import sample data
memopol loaddata data_sample.json
memopol refresh_scores
echo
echo
"You're all set!"
...
...
src/memopol/settings.py
View file @
df377f9b
...
...
@@ -300,11 +300,15 @@ with open(SECRET_FILE, 'r') as f:
#
# Add allowed hosts from environment
# Automaticaly add 127.0.0.1 in ALLOWED_HOSTS on DEBUG
#
if
'DJANGO_ALLOWED_HOSTS'
in
os
.
environ
:
ALLOWED_HOSTS
+=
os
.
environ
.
get
(
'DJANGO_ALLOWED_HOSTS'
).
split
(
','
)
if
DEBUG
:
ALLOWED_HOSTS
+=
[
'127.0.0.1'
,
'localhost'
]
#
# Raven configuration
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment