-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdev-docs.txt
More file actions
55 lines (38 loc) · 1.7 KB
/
Copy pathdev-docs.txt
File metadata and controls
55 lines (38 loc) · 1.7 KB
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
Linting for Python and React
============================
Lint Python files with isort, autopep8, and black. Lint React Javascript
using eslint. This can be done here using Vim or in your editor of choice.
Look at ~/.vimrc to see relevant settings (you will need to configure your
editor in a similar way). Linting can also be done on the command line:
isort path/to/source_file.py
autopep8 --in-place path/to/source_file.py
black path/to/source_file.py
Linting HTML files and Wagtail / Django templates
=================================================
Template files should be linted with djhtml, which applies indentation.
djhtml -i path/to/template_file.html
Generating fixtures
===================
If you make changes to the dev database that you'd like to preserve, this can
be done by generating fixtures:
./manage.py dumpdata --natural-foreign --natural-primary --exclude wagtailcore.GroupCollectionPermission > base/fixtures/test.json
The file will need to be saved and checked into version control.
Run unit tests
==============
./manage.py test --parallel
Run the dev server
==================
./manage.py runserver 0.0.0.0:8000
If you add these lines to the /etc/hosts file on your host machine, you can
see the site at http://wwwdev:8000/ (and loopdev respectively). This is
useful for distinguishing between loop and the public site in dev:
127.0.0.1 wwwdev
127.0.0.1 loopdev
WRITE SOME CODE!!!
___________________________ ____
... \____DLDC_220_________|_// __=*=__.--"----"--._________
\ | /-------.__________.--------'
/=====\ |======/ ' "----"
\________ }]
`--------'
MAKE IT SO!!!