Skip to content

Commit 6eb2f84

Browse files
authored
Merge pull request #47 from PeterJCLaw/readme-db-setup
Add db setup info to README
2 parents abc6004 + 22b1707 commit 6eb2f84

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

README.rst

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<img width="400" src="https://i.imgur.com/79S6OVM.png" alt="django-postgres-extra">
66
<br>
77
<br>
8-
</h1>
8+
</h1>
99

1010
==================== ===================
1111
**Quality** |QualityBadge|_
@@ -158,19 +158,30 @@ Working with the code
158158
λ virtualenv env
159159
λ source env/bin/activate
160160
161-
3. Install the development/test dependencies:
161+
3. Create a postgres user for use in tests (skip if your default user is a postgres superuser):
162+
163+
.. code-block:: bash
164+
165+
λ createuser --superuser psqlextra --pwprompt
166+
λ export DATABASE_URL=postgres://psqlextra:<password>@localhost/psqlextra
167+
168+
Hint: if you're using virtualenvwrapper, you might find it beneficial to put
169+
the ``export`` line in ``$VIRTUAL_ENV/bin/postactivate`` so that it's always
170+
available when using this virtualenv.
171+
172+
4. Install the development/test dependencies:
162173

163174
.. code-block:: bash
164175
165176
λ pip install -r requirements/test.txt
166177
167-
4. Run the tests:
178+
5. Run the tests:
168179

169180
.. code-block:: bash
170181
171182
λ tox
172183
173-
5. Run the benchmarks:
184+
6. Run the benchmarks:
174185

175186
.. code-block:: bash
176187

0 commit comments

Comments
 (0)