Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anthony
memopol
Commits
93c04aea
Commit
93c04aea
authored
Dec 13, 2015
by
Jamesie Pic
Browse files
Added sample data
parent
bd3a6ee0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
db.sqlite
0 → 100644
View file @
93c04aea
File added
docs/development.rst
View file @
93c04aea
...
...
@@ -121,10 +121,38 @@ the ``DJANGO_DEBUG`` variable in the current shell::
$ export DJANGO_DEBUG=True
Run the development server
==========================
Run the development server::
$ ./manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
December 09, 2015 - 21:26:47
Django version 1.8.7, using settings 'memopol.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[09/Dec/2015 21:26:48] "GET / HTTP/1.1" 200 13294
The website is running on ``http://127.0.0.1:8000/``.
Database migrations
===================
Run database migrations, it'll use a file-based sqlite database by default::
The repo comes with a pre-configured SQLite db with sample data so that you can
start hacking right away. However, if you were to use a local postgresql
database ie. with this sort of environment::
export DJANGO_DATABASE_DEFAULT_NAME=memopol
export DJANGO_DATABASE_DEFAULT_USER=postgres
export DJANGO_DATABASE_DEFAULT_ENGINE=django.db.backends.postgresql_psycopg2
export DJANGO_DEBUG=1
export DJANGO_SETTINGS_MODULE=memopol.settings
Then you could run database migrations::
$ ./manage.py migrate
Operations to perform:
...
...
@@ -142,28 +170,15 @@ Run database migrations, it'll use a file-based sqlite database by default::
Applying taggit.0002_auto_20150616_2121... OK
Run the development server
==========================
Run the development server::
$ ./manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
December 09, 2015 - 21:26:47
Django version 1.8.7, using settings 'memopol.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[09/Dec/2015 21:26:48] "GET / HTTP/1.1" 200 13294
The website is running on ``http://127.0.0.1:8000/``.
Provision with data
===================
To provision it with data (takes a while)::
Again, the repo comes with a pre-configured SQLite db with sample data so that
you can start hacking right away. However, you could still reload sample data::
$ ./manage.py loaddata memopol/fixtures/small_sample.json
Or actual data (takes a while)::
$ bin/update_all
...
...
memopol/fixtures/small_sample.json
0 → 100644
View file @
93c04aea
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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