forked from frankban/django-endless-pagination
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HACKING
73 lines (43 loc) · 1.76 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Hacking Django Endless Pagination
=================================
Here are the steps needed to set up a development and testing environment.
Creating a development environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The development environment is created in a virtualenv. The environment
creation requires the *make* and *virtualenv* programs to be installed.
To install *make* under Debian/Ubuntu::
$ sudo apt-get install build-essential
Under Mac OS/X, *make* is available as part of XCode.
To install virtualenv::
$ sudo pip install virtualenv
At this point, from the root of this branch, run the command::
$ make
This command will create a ``.venv`` directory in the branch root, ignored
by DVCSes, containing the development virtual environment with all the
dependencies.
Testing the application
~~~~~~~~~~~~~~~~~~~~~~~
Run the tests::
$ make test
The command above also runs all the available integration tests. They use
Selenium and require Firefox to be installed. To avoid executing integration
tests, define the environment variable SKIP_SELENIUM, e.g.::
$ make test SKIP_SELENIUM=1
Integration tests are excluded by default when using Python 3. The test suite
requires Python >= 2.6.1.
Run the tests and lint/pep8 checks::
$ make check
Again, to exclude integration tests::
$ make check SKIP_SELENIUM=1
Debugging
~~~~~~~~~
Run the Django shell (Python interpreter)::
$ make shell
Run the Django development server for manual testing::
$ make server
After executing the command above, it is possible to navigate the testing
project going to <http://localhost:8000>.
See all the available make targets, including info on how to create a Python 3
development environment::
$ make help
Thanks for contributing, and have fun!