@@ -9,77 +9,101 @@ CC Legal Database: curated repository of Case Law and Scholarship data from arou
9
9
10
10
** [ legaldb.creativecommons.org] ( https://legaldb.creativecommons.org/ ) **
11
11
12
-
13
12
## Code of Conduct
14
13
15
14
Please note that this project is released with a Contributor [ Code of
16
15
Conduct] ( CODE_OF_CONDUCT.md ) . By participating in this project you agree to
17
16
abide by its terms.
18
17
19
-
20
18
## Contributing
21
19
22
20
See [ ` CONTRIBUTING.md ` ] ( CONTRIBUTING.md ) . It contains some general instructions
23
21
that should be followed when contributing to any of the Creative Commons
24
22
open-source repositories.
25
23
26
-
27
24
### Development setup
28
25
29
- To follow these instructions, Python 3 and
30
- [ Pipenv] ( https://pipenv.pypa.io/en/latest/ ) are required.
26
+ To follow these instructions, Python 3,
27
+ [ Pipenv] ( https://pipenv.pypa.io/en/latest/ ) and node are required.
31
28
32
29
Install dependencies with pipenv.
30
+
33
31
``` shell
34
32
pipenv install --dev
35
33
```
36
34
37
35
Copy ` .env.template ` and set environment variables (like
38
36
` DJANGO_DEBUG_ENABLED=True ` for local development and testing) and secret keys
39
37
in a ` .env ` file.
38
+
40
39
``` shell
41
40
cp .env.template .env
42
41
```
43
42
44
43
After setting variables run the migrations to create the database (we use
45
44
Postgresql in this case).
45
+
46
46
``` shell
47
47
pipenv run python manage.py migrate
48
48
```
49
49
50
50
The next step is to create an admin account for Django admin.
51
+
51
52
``` shell
52
53
pipenv run python manage.py createsuperuser
53
54
```
54
55
55
56
Finally you can start a development server with:
57
+
56
58
``` shell
57
59
pipenv run python manage.py runserver
58
60
```
61
+
59
62
and see a local version of the website following ` http://127.0.0.1:8000/ ` on
60
63
the browser.
61
64
62
- After made code changes and before commit, check code style.
65
+ Open another terminal and navigate to webpack folder using:
66
+
67
+ ``` shell
68
+ cd webpack
69
+ ```
70
+
71
+ To install webpackdependencies with:
72
+
73
+ ``` shell
74
+ npm install
75
+ ```
76
+
77
+ If you want to make changes to scss files during development run:
78
+
79
+ ``` shell
80
+ npm run watch
81
+ ```
82
+
83
+ otherwise run the following command
84
+
85
+ ``` shell
86
+ npm run build
87
+ ```
88
+
89
+ After made code changes and before commit, check code style from main directory using.
90
+
63
91
``` shell
64
92
pipenv run black .
65
93
pipenv run flake8
66
94
```
67
95
68
-
69
96
### Development Blog Posts
70
97
71
98
[ Posts in the Outreachy May 2020 round: CC Legal Database series] [ blogseries ]
72
99
73
- [ blogseries ] : https://opensource.creativecommons.org/blog/entries/legal-database-a-new-beginning/#series
74
-
75
-
76
100
## Deploy to Heroku
77
101
78
102
See [ ` deploy_to_heroku.md ` ] ( deploy_to_heroku.md ) .
79
103
80
-
81
104
## License
82
105
83
- - [ ` LICENSE ` ] ( LICENSE ) (Expat/[ MIT] [ mit ] License)
106
+ - [ ` LICENSE ` ] ( LICENSE ) (Expat/[ MIT] License)
84
107
85
- [ mit ] : http://www.opensource.org/licenses/MIT " The MIT License | Open Source Initiative "
108
+ [ blogseries ] : https://opensource.creativecommons.org/blog/entries/legal-database-a-new-beginning/#series
109
+ [ mit ] : http://www.opensource.org/licenses/MIT
0 commit comments