Compare commits
573 Commits
Author | SHA1 | Date |
---|---|---|
|
120442206b | |
|
d6d3f8c6a8 | |
|
3cebad87eb | |
|
f45f5ae08a | |
|
0434e8b78b | |
|
0c0e09819a | |
|
2b38fefa13 | |
|
7c5ba16d24 | |
|
b0d065167c | |
|
4bb12d73d9 | |
|
e736846562 | |
|
2bdd652ea7 | |
|
483d3ffd5f | |
|
2d77f8974b | |
|
77fa09a953 | |
|
df9830bb4f | |
|
849ce97a1c | |
|
c260a4dd22 | |
|
5f301450df | |
|
abf2b11220 | |
|
a4256c3f09 | |
|
18e97be27c | |
|
a17ed83755 | |
|
fe4cddac30 | |
|
0cb423c929 | |
|
39e9de71cf | |
|
4c74e6182f | |
|
dae83618a1 | |
|
97b69cdb61 | |
|
a5386cb79c | |
|
6a0a55f982 | |
|
2d91b75096 | |
|
0e1105fb2b | |
|
49520bcc9b | |
|
3cd0da80d5 | |
|
4fa4c02d16 | |
|
809a90b777 | |
|
305b8f048f | |
|
ad757f233b | |
|
8806fce1eb | |
|
7d8073f801 | |
|
90a12ee95a | |
|
10b5baefbb | |
|
80002086d5 | |
|
9b70d25f49 | |
|
8e4d1a5653 | |
|
a35db80932 | |
|
533d72fee6 | |
|
117fc011f7 | |
|
963763be31 | |
|
22eae180c6 | |
|
6842a7bb21 | |
|
03bf1f0a9a | |
|
cb24850466 | |
|
203e37d98b | |
|
b47a4d5dad | |
|
9fd40ce1bc | |
|
08e31a2ca9 | |
|
4fe58359f4 | |
|
4b5e58f806 | |
|
81ff7fd666 | |
|
fc9af7d1df | |
|
54fe5ba79c | |
|
5ac2cf6146 | |
|
2d7229e494 | |
|
f188974f31 | |
|
0512b1a47d | |
|
9389b65157 | |
|
8bfdf596dc | |
|
8fbe0c78d5 | |
|
09f8ada4c2 | |
|
9aaf45c725 | |
|
e37eb65431 | |
|
8b130f0361 | |
|
39f3f82970 | |
|
178ab9ec43 | |
|
221211e716 | |
|
1a850f5179 | |
|
34c5bd40d3 | |
|
d55ee21e8e | |
|
ef8f44e434 | |
|
c40cb86dbd | |
|
e7884e417e | |
|
a19bec8ccd | |
|
2d8a18968b | |
|
396d36e4ba | |
|
f5f02585c9 | |
|
a5a5395f53 | |
|
eec207cdac | |
|
ec245fe029 | |
|
a577879ab3 | |
|
b9da70d58c | |
|
124e2838fb | |
|
ef788d0946 | |
|
63dc792da0 | |
|
7953f3f663 | |
|
cdd6909432 | |
|
7d7f805a1e | |
|
b8dcca672a | |
|
7e9328befb | |
|
e88c380329 | |
|
02558ed15f | |
|
fdb7ec3382 | |
|
6f333d8012 | |
|
484739e882 | |
|
0d37d34ad2 | |
|
8edde0fe31 | |
|
872ad281b4 | |
|
0ea3898f8d | |
|
6a5e870564 | |
|
758109ac22 | |
|
4dd525972b | |
|
16a729a078 | |
|
27e762eac6 | |
|
ab59782103 | |
|
b6b421245e | |
|
e04c258e24 | |
|
d34166573f | |
|
989fcfe466 | |
|
8ca22009df | |
|
59b5646322 | |
|
4f5db05fae | |
|
2744aa52f0 | |
|
5974ca6ce3 | |
|
8e01fbc97b | |
|
610938c026 | |
|
93029f99f4 | |
|
006bc72e67 | |
|
7bec90f59c | |
|
a781b3c3e2 | |
|
1af507685d | |
|
0cad037beb | |
|
516d8773e7 | |
|
7a4bdbf6dc | |
|
1d6c559189 | |
|
be66c3270c | |
|
1b0b879843 | |
|
aa2fa445c3 | |
|
5927ad0794 | |
|
069a79a174 | |
|
1e9aaf1a82 | |
|
e3b69def6c | |
|
ab27d686bc | |
|
3e9b502b9b | |
|
73597b564b | |
|
2a436d53dd | |
|
41c8b9c810 | |
|
1dc19695b5 | |
|
4001c57359 | |
|
648a1f1dbb | |
|
ebb6dfc3c3 | |
|
29daac11df | |
|
6c53e94909 | |
|
9aae14a332 | |
|
c05b7f7781 | |
|
5434440c45 | |
|
b13d6b3cbf | |
|
d0ec0f9074 | |
|
8419baadde | |
|
c7111a29b1 | |
|
9fae7e1ef8 | |
|
b464da2b99 | |
|
dc3c5f3edd | |
|
cecf92d683 | |
|
76414c75d4 | |
|
6faed218ba | |
|
ee862b0748 | |
|
8fbf4b8068 | |
|
1d4c731624 | |
|
f95d9f28be | |
|
de7ab4c474 | |
|
94fcbbc55e | |
|
2284ec6b6e | |
|
fb36b14ff0 | |
|
885abdf5d2 | |
|
4e58bf7413 | |
|
6e8b5d1c2b | |
|
c2149ef6a5 | |
|
8b76b5787b | |
|
b6b7ff6d9b | |
|
d74094295c | |
|
8651f31d13 | |
|
b02612a166 | |
|
3f9b20b34e | |
|
8f95d9333e | |
|
825ca74311 | |
|
34bf9309fe | |
|
cab876485d | |
|
19ca928936 | |
|
c2e6721934 | |
|
0444044646 | |
|
0ea9ebe449 | |
|
46558ea63d | |
|
fab4364cc0 | |
|
804b09f6a0 | |
|
bae2881ed6 | |
|
d8b8c1655b | |
|
aed3159026 | |
|
92368c38c4 | |
|
34fbb01fe0 | |
|
af6d4aa21a | |
|
2d54d1b432 | |
|
6d8c6df657 | |
|
b05da06ab2 | |
|
1bbc3268fd | |
|
d3a754997b | |
|
bbbb348674 | |
|
32512d70a2 | |
|
c12f48aa65 | |
|
880289b0a7 | |
|
648fb12d39 | |
|
ea4559ff3e | |
|
f7f3cc806b | |
|
91f4d395f5 | |
|
b7c095525a | |
|
cf2abe1d2f | |
|
c7d90ea9b7 | |
|
c949c67dc0 | |
|
a59704af1d | |
|
ee3e94d2e7 | |
|
bc2f1b57df | |
|
9337f04621 | |
|
3180dfeda0 | |
|
1a3b6bc3ca | |
|
dbafa5264d | |
|
75545eb256 | |
|
5fbcbfb68c | |
|
0903bfa6de | |
|
ae558ad471 | |
|
9eeace6584 | |
|
b798846c5c | |
|
ece8bb7ce6 | |
|
07b430db4f | |
|
acc88bd31e | |
|
52ce32edf4 | |
|
14f5ad4bdd | |
|
843b9a7472 | |
|
0ede2a67be | |
|
5bc9c06f08 | |
|
62bdc296ae | |
|
98a9a06d38 | |
|
462ca1eccd | |
|
abaa6ddcb3 | |
|
49650db332 | |
|
42d88124bc | |
|
2b463bb269 | |
|
673d1bfc3b | |
|
b6657531c1 | |
|
ca7383af1a | |
|
1d894bbb8f | |
|
abeda21ea4 | |
|
c389d99200 | |
|
73e02a5584 | |
|
28dba6dc66 | |
|
eb9b393ec9 | |
|
3976ceef4f | |
|
28b20b5f9a | |
|
448589a1ed | |
|
f507cd0539 | |
|
cdd1d2809c | |
|
e9b9a962c6 | |
|
66477c6777 | |
|
2533507fc1 | |
|
8a9964446a | |
|
4c6ac330bf | |
|
b32a8695de | |
|
3d3d79a4b3 | |
|
33833d027a | |
|
b06e28e596 | |
|
1fb61dfc0f | |
|
61c0653898 | |
|
0ddbf27d5c | |
|
a0f83fef64 | |
|
0930228c27 | |
|
d35135a3f5 | |
|
d1dd3631f9 | |
|
9b80f5a1a3 | |
|
c698b0798b | |
|
386893f2e4 | |
|
c8692eeca4 | |
|
e75510507c | |
|
e7c58fa670 | |
|
a2d1547fae | |
|
e715c7b03e | |
|
cb6f3bb0fe | |
|
c48b99be75 | |
|
deece59b6b | |
|
a385c73abb | |
|
74a8e8e365 | |
|
3f20f941bc | |
|
479454cbde | |
|
4d59996620 | |
|
3dccb9e90e | |
|
8f1f001872 | |
|
ce4739aef3 | |
|
3b617946e0 | |
|
84dfbbd0b0 | |
|
b4ca93ec28 | |
|
e9dbe4519f | |
|
9ea2d9c66b | |
|
cfbe29e9a0 | |
|
500fe01b6e | |
|
e3b390087a | |
|
38423ff57e | |
|
1c569edd96 | |
|
a726f2882b | |
|
8958e6844c | |
|
282b964bd3 | |
|
363c9432f5 | |
|
8d7fd290e2 | |
|
2ea75b1aee | |
|
b57973767b | |
|
8dbb524be6 | |
|
eaf943c406 | |
|
fd71ae704f | |
|
095d613cf9 | |
|
c524555d7a | |
|
d4a342c9ea | |
|
4bdb00a642 | |
|
a97892d06f | |
|
f390404b98 | |
|
ad60ac2235 | |
|
ba7f9b2096 | |
|
fb9e3ebb91 | |
|
6d9c2b660c | |
|
8279856e8b | |
|
3bc3ab83e0 | |
|
40577d7675 | |
|
eb38517977 | |
|
08424b97fe | |
|
16caedce81 | |
|
c90460f283 | |
|
523ee8bbe8 | |
|
c6d918f9d0 | |
|
fd658895cb | |
|
71e810b446 | |
|
3b697727ca | |
|
f37a6cf869 | |
|
d4b249042e | |
|
8df7df763c | |
|
8dfcbe4006 | |
|
7019de8f0d | |
|
687eccf462 | |
|
6bdbf7c106 | |
|
0244a39475 | |
|
4107231340 | |
|
1879cb76ae | |
|
c5cb31521f | |
|
7463eab3c9 | |
|
d1a9d58813 | |
|
7f614c0c5e | |
|
b8bf4bdd21 | |
|
8f20575e6e | |
|
8dbd3df40e | |
|
78f5b9e961 | |
|
f9adc543d4 | |
|
0438a389b0 | |
|
176e2fc2c5 | |
|
aaedfab439 | |
|
a952d200fc | |
|
ea7187b30d | |
|
c2b0ac84e6 | |
|
475092f4c2 | |
|
15c2868d24 | |
|
477d964770 | |
|
cca421b14d | |
|
723034d373 | |
|
f7595b65cc | |
|
9bdf1e07f1 | |
|
23056f4e56 | |
|
d306900c31 | |
|
3abd51f306 | |
|
e93aff73e7 | |
|
03d97f6ece | |
|
d09dbcb3db | |
|
0a7bd3be06 | |
|
582068a7ac | |
|
503beb68b9 | |
|
75bc33b759 | |
|
04ca4d5b7f | |
|
65374df43f | |
|
45bb5c4d9b | |
|
3f102e5e38 | |
|
748bf53159 | |
|
253e7b81d8 | |
|
950c9a4987 | |
|
a4b9140c5a | |
|
be69b59447 | |
|
b82603428c | |
|
32a4473304 | |
|
49033f323a | |
|
1303a4622f | |
|
2ab743a44e | |
|
fbf6340d30 | |
|
32ff6e67e7 | |
|
8bb20c2767 | |
|
0d3adc5d2f | |
|
d0466c3642 | |
|
0deeabc3ac | |
|
314c73efe7 | |
|
1b76977e9c | |
|
e12e210d2b | |
|
49d4884e83 | |
|
6a259106be | |
|
fd170b6ca9 | |
|
e91496b3c6 | |
|
b635055784 | |
|
9bf325d5f9 | |
|
1790cec37d | |
|
b5fefb8f0f | |
|
78abcab6d5 | |
|
fd61756a2b | |
|
3d5b98d2a9 | |
|
ec049521e4 | |
|
3601ee4696 | |
|
83c445dd2f | |
|
ed9ddf9aa9 | |
|
8ca91f8d57 | |
|
81ddea4f77 | |
|
dcb2cf5e46 | |
|
158d7159af | |
|
7bf5ad1a4b | |
|
afceb5d24b | |
|
27dead1383 | |
|
1d3691469c | |
|
9e6bd153fa | |
|
f8ba519d1c | |
|
c84f0fdf2e | |
|
c53530f6e2 | |
|
16856cb64f | |
|
e53fd22919 | |
|
9791fb256b | |
|
47ff050abe | |
|
ce530e8e71 | |
|
40ec34a026 | |
|
f1356e5e80 | |
|
db9fdf06b6 | |
|
c886167da3 | |
|
a7287df039 | |
|
e215fa4147 | |
|
6d4a4cca9b | |
|
d5bc770334 | |
|
421a213f5e | |
|
7d663de854 | |
|
e3226f4cb9 | |
|
6354ac1c07 | |
|
26e45907d7 | |
|
86897d3469 | |
|
2c170f3d04 | |
|
3e2226e41f | |
|
3d1d60db32 | |
|
39dabdb0c8 | |
|
ad8b2549d7 | |
|
4d3e65c603 | |
|
2a8927c06a | |
|
09e40b9968 | |
|
9970f68d2b | |
|
5a9938931e | |
|
5449aac84d | |
|
a653c7240c | |
|
c0daa9180f | |
|
5eec9dba97 | |
|
6991476ebe | |
|
4df74d6007 | |
|
fe0a2a296f | |
|
67cc170ccc | |
|
d21b4193ce | |
|
4e983d51f6 | |
|
d44d666a66 | |
|
3d8f637e55 | |
|
2d1d963733 | |
|
e1182fb69b | |
|
79b7ceb73f | |
|
ba76c9431f | |
|
f18c0e2636 | |
|
3be846ef47 | |
|
0fd080b101 | |
|
c7d2e0c174 | |
|
ff87875410 | |
|
78510cd676 | |
|
5ee2e19e7b | |
|
12e6e8e810 | |
|
4dcdbc4c73 | |
|
9302936ddd | |
|
4f0323eeca | |
|
8b6356f80e | |
|
bebee6c8f3 | |
|
ec2d11c71a | |
|
b15b346f4c | |
|
0ff9aeb119 | |
|
17bea5b219 | |
|
32d2d0a07c | |
|
f22b1288ec | |
|
9cd86a3699 | |
|
a3f88db4d1 | |
|
1c5557f330 | |
|
acb758d98f | |
|
ebb52d0543 | |
|
a7ca948ddc | |
|
6144100713 | |
|
d28846dc9e | |
|
bc726cbcda | |
|
88994892f2 | |
|
4d7d873302 | |
|
060d4c7829 | |
|
2516fb9685 | |
|
132f759190 | |
|
700b6de5f7 | |
|
99f8bfdc9f | |
|
beeb17575a | |
|
8eb4bc2b3c | |
|
15b61257ee | |
|
10d1b3f672 | |
|
c2637e02e9 | |
|
499aecb9c8 | |
|
15b9fb5f53 | |
|
6a15bb1f10 | |
|
6483108a49 | |
|
a1e3812bbf | |
|
a64c08d2ad | |
|
c334836ef2 | |
|
93b52a87ba | |
|
1bd8b59ea2 | |
|
f7918abddb | |
|
17462a888a | |
|
67669eb817 | |
|
63cd90c417 | |
|
b8a8d172f6 | |
|
be55c5cb58 | |
|
8919e14708 | |
|
b78d1b9a26 | |
|
d7c580b802 | |
|
4564802fd9 | |
|
9d3e53f3c5 | |
|
7952fb63ee | |
|
ea0f496c9b | |
|
c219fbdc59 | |
|
48914e1856 | |
|
6eed67e969 | |
|
a165947179 | |
|
ce99a949c7 | |
|
5267c65d60 | |
|
4ae4c40ba8 | |
|
c1fe365ab8 | |
|
cb027411e2 | |
|
eeee1efa70 | |
|
cda0d6451c | |
|
6a8274e7c1 | |
|
21520aaf76 | |
|
bdd312e9e8 | |
|
8c3fed2088 | |
|
67e2ec6905 | |
|
922571c56b | |
|
a9d46c2bea | |
|
853b896b3a | |
|
a10bf440ad | |
|
9e09aacc5e | |
|
2520eb3d07 | |
|
057804248f | |
|
165369572a | |
|
ea642a800f | |
|
8edbb1baaa | |
|
7488878550 | |
|
318d887d6e | |
|
f7c9eb157b | |
|
dedaa977bf | |
|
882c1f00e5 | |
|
387becc46a | |
|
defdffe047 | |
|
f502b7e243 | |
|
7754d315f0 | |
|
84ff014be2 | |
|
0ba2f6002a |
|
@ -3,6 +3,7 @@
|
|||
*.log
|
||||
taiga/search
|
||||
settings/local.py
|
||||
settings/celery_local.py
|
||||
database.sqlite
|
||||
logs
|
||||
media
|
||||
|
|
13
.travis.yml
13
.travis.yml
|
@ -1,22 +1,25 @@
|
|||
language: python
|
||||
python:
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
addons:
|
||||
postgresql: "9.4"
|
||||
services:
|
||||
- rabbitmq # will start rabbitmq-server
|
||||
- rabbitmq
|
||||
- postgresql
|
||||
cache:
|
||||
- apt
|
||||
- pip
|
||||
before_install:
|
||||
- sudo apt-get -qq update
|
||||
- sudo /etc/init.d/postgresql stop
|
||||
- sudo apt-get install -y postgresql-9.4
|
||||
- sudo apt-get install -y postgresql-plpython-9.4
|
||||
- sudo /etc/init.d/postgresql start 9.4
|
||||
- psql -c 'create database taiga;' -U postgres
|
||||
install:
|
||||
- travis_retry pip install -r requirements-devel.txt
|
||||
- travis_retry pip install pipenv
|
||||
- travis_retry pipenv sync --dev
|
||||
script:
|
||||
- travis_retry coverage run --source=taiga --omit='*tests*,*commands*,*migrations*,*admin*,*.jinja,*dashboard*,*settings*,*wsgi*,*questions*,*documents*' -m py.test -v --tb=native
|
||||
- travis_retry pipenv run coverage run --source=taiga --omit='*tests*,*commands*,*migrations*,*admin*,*.jinja,*dashboard*,*settings*,*wsgi*,*questions*,*documents*' -m pytest -v --tb=native
|
||||
after_success:
|
||||
- coveralls
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[main]
|
||||
host = https://www.transifex.com
|
||||
lang_map = sr@latin:sr_Latn, zh_CN:zh_Hans, zh_TW:zh_Hant
|
||||
lang_map = sr@latin:sr_Latn, zh_CN:zh_Hans, zh_TW:zh_Hant, fa_IR:fa
|
||||
|
||||
[taiga-back.taiga]
|
||||
file_filter = taiga/locale/<lang>/LC_MESSAGES/django.po
|
||||
|
|
225
CHANGELOG.md
225
CHANGELOG.md
|
@ -1,4 +1,227 @@
|
|||
# Changelog #
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 4.1.0 (2019-02-04)
|
||||
|
||||
### Misc
|
||||
|
||||
- Fix Close sprints
|
||||
|
||||
### Features:
|
||||
|
||||
- Negative filters
|
||||
- Activate the Ukrainian language
|
||||
|
||||
## 4.0.4 (2019-01-15)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fixes.
|
||||
|
||||
## 4.0.3 (2018-12-11)
|
||||
|
||||
### Misc
|
||||
|
||||
- Add extra requirements for oauthlib
|
||||
|
||||
## 4.0.2 (2018-12-04)
|
||||
|
||||
### Misc
|
||||
|
||||
- Update messages catalog.
|
||||
|
||||
## 4.0.1 (2018-11-28)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fix.
|
||||
|
||||
## 4.0.0 Larix cajanderi (2018-11-28)
|
||||
|
||||
### Features
|
||||
|
||||
- Custom home section (https://tree.taiga.io/project/taiga/issue/3059)
|
||||
- Custom fields (https://tree.taiga.io/project/taiga/issue/3725):
|
||||
- Dropdown
|
||||
- Checkbox
|
||||
- Number
|
||||
- Bulk move unfinished objects in sprint (https://tree.taiga.io/project/taiga/issue/5451)
|
||||
- Paginate history activity
|
||||
- Improve notifications area (https://tree.taiga.io/project/taiga/issue/2165 and
|
||||
https://tree.taiga.io/project/taiga/issue/3752)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor icon changes
|
||||
- Lots of small bugfixes
|
||||
|
||||
## 3.4.5 (2018-10-15)
|
||||
|
||||
### Features
|
||||
|
||||
- Prevent local Webhooks
|
||||
|
||||
## 3.4.4 (2018-09-19)
|
||||
|
||||
### Misc
|
||||
|
||||
- Small fixes
|
||||
|
||||
## 3.4.3 (2018-09-19)
|
||||
|
||||
### Misc
|
||||
|
||||
- Refactor attachment url's in timeline
|
||||
- Avoid receive feedkback in private projects from non-members
|
||||
- Allow delete reports uuid's
|
||||
- Small fixes
|
||||
|
||||
## 3.4.0 Pinus contorta (2018-08-13)
|
||||
|
||||
### Features
|
||||
|
||||
- Due dates configuration (https://tree.taiga.io/project/taiga/issue/3070):
|
||||
- Add due dates to admin attributes
|
||||
- Update project templates
|
||||
- Issues to Sprints (https://tree.taiga.io/project/taiga/issue/1181):
|
||||
- Add milestone filters
|
||||
|
||||
## 3.3.14 (2018-08-06)
|
||||
|
||||
### Misc
|
||||
|
||||
- Improve US reorder algorithm.
|
||||
- Drop python 3.4 and add python 3.6 to travis configuration.
|
||||
|
||||
## 3.3.13 (2018-07-05)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fixes.
|
||||
|
||||
## 3.3.11 (2018-06-27)
|
||||
|
||||
### Features
|
||||
|
||||
- Add assigned users kanban/taskboard filter.
|
||||
- Improve US reorder in kanban.
|
||||
- Upgrade psycopg2 library.
|
||||
|
||||
## 3.3.8 (2018-06-14)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fix.
|
||||
|
||||
## 3.3.7 (2018-05-31)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fix related with project import.
|
||||
|
||||
- Pin requirements to solve incompatible versions detected by pip 10.
|
||||
|
||||
## 3.3.4 (2018-05-24)
|
||||
|
||||
### Misc
|
||||
|
||||
- Add features to fulfill GDPR.
|
||||
|
||||
## 3.3.3 (2018-05-10)
|
||||
|
||||
### Misc
|
||||
|
||||
- Update locales.
|
||||
- Minor bug fixes.
|
||||
|
||||
## 3.3.1 (2018-04-30)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fixes.
|
||||
|
||||
## 3.3.1 (2018-04-30)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fixes.
|
||||
|
||||
## 3.3.0 Picea mariana (2018-04-26)
|
||||
|
||||
### Features
|
||||
|
||||
- Add "live notifications" to Taiga:
|
||||
- Migration for user configuration.
|
||||
- Add due date to US, tasks and issues (https://tree.taiga.io/project/taiga/issue/3070):
|
||||
- Add to csv export.
|
||||
- Add to projects import/export.
|
||||
- Add to webhooks.
|
||||
- Add to django admin.
|
||||
- Add multiple assignement only in US (https://tree.taiga.io/project/taiga/issue/1961):
|
||||
- The `assigned_to` field is still active.
|
||||
- Add to csv export.
|
||||
- Add to projects import/export.
|
||||
- Add to webhooks.
|
||||
- Add to django admin.
|
||||
- Delete cards in Kanban and sprint Taskboard (https://tree.taiga.io/project/taiga/issue/2683).
|
||||
|
||||
## 3.2.3 (2018-04-04)
|
||||
|
||||
### Misc
|
||||
|
||||
- Fix milestone burndown graph with empty US.
|
||||
- Upgrade markdown library to solve bug.
|
||||
- Update locales.
|
||||
|
||||
## 3.2.2 (2018-03-15)
|
||||
|
||||
### Misc
|
||||
|
||||
- Minor bug fixes.
|
||||
|
||||
|
||||
## 3.2.0 Betula nana (2018-03-07)
|
||||
|
||||
### Features
|
||||
- Add role filtering in US.
|
||||
|
||||
|
||||
## 3.1.3 (2018-02-28)
|
||||
|
||||
### Features
|
||||
- Increase token entropy.
|
||||
- Squash field changes on notification emails
|
||||
- Minor bug fixes.
|
||||
|
||||
|
||||
## 3.1.0 Perovskia Atriplicifolia (2017-03-10)
|
||||
|
||||
### Features
|
||||
- Contact with the project: if the projects have this module enabled Taiga users can contact them.
|
||||
- Ability to create rich text custom fields in Epics, User Stories, Tasks and Isues.
|
||||
- Full text search now use simple as tokenizer so search with non-english text are allowed.
|
||||
- Duplicate project: allows creating a new project based on the structure of another (status, tags, colors, default values...)
|
||||
- Add thumbnails and preview for PSD files.
|
||||
- Add thumbnails and preview for SVG files (Cario lib is needed).
|
||||
- i18n:
|
||||
- Add japanese (ja) translation.
|
||||
- Add korean (ko) translation.
|
||||
- Add chinese simplified (zh-Hans) translation.
|
||||
- Third party services project importers:
|
||||
- Trello
|
||||
- Jira 7
|
||||
- Github
|
||||
- Asana
|
||||
|
||||
### Misc
|
||||
- API:
|
||||
- Memberships API endpoints now allows using usernames and emails instead of using only emails.
|
||||
- Contacts API allow full text search (by the username, full name or email).
|
||||
- Filter milestones, user stories and tasks by estimated_start and estimated_finish dates.
|
||||
- Add project_extra_info to epics, tasks, milestones, issues and wiki pages endpoints.
|
||||
- Gogs integration: Adding new Gogs signature method.
|
||||
- Lots of small and not so small bugfixes.
|
||||
|
||||
|
||||
## 3.0.0 Stellaria Borealis (2016-10-02)
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
# Taiga.io Community CoC (Code of Conduct)
|
||||
### Version 0.1
|
||||
|
||||
As contributors and maintainers of any Taiga.io project, and in the interest of
|
||||
fostering an open and welcoming community, we pledge to respect all people who
|
||||
contribute through reporting issues, posting feature requests, updating
|
||||
documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this projects a harassment-free
|
||||
experience for everyone, regardless of level of experience, gender, gender
|
||||
identity and expression, sexual orientation, disability, personal appearance,
|
||||
body size, race, ethnicity, age, religion, or nationality.
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic
|
||||
addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to
|
||||
fairly and consistently applying these principles to every aspect of managing
|
||||
this project. Project maintainers who do not follow or enforce the Code of
|
||||
Conduct may be permanently removed from the project team.
|
||||
|
||||
This code of conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community (like our
|
||||
mailing list, Google Groups, in Twitter, Facebook, etc.).
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting a project maintainer at
|
||||
[conduct@taiga.io](mailto:coc@taiga.io). All complaints will be reviewed
|
||||
and investigated and will result in a response that is deemed necessary and
|
||||
appropriate to the circumstances. Maintainers are obligated to maintain
|
||||
confidentiality with regard to the reporter of an incident.
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 1.3.0, available at
|
||||
[http://contributor-covenant.org/version/1/3/0/][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/3/0/
|
137
CONTRIBUTING.md
137
CONTRIBUTING.md
|
@ -1,77 +1,122 @@
|
|||
# Contributing
|
||||
# How can I contribute to Taiga?
|
||||
|
||||
#### Where to start ####
|
||||
---
|
||||
|
||||
There are many different ways to contribute to Taiga's development, just find the one that best fits with your skills. Examples of contributions we would love to receive include:
|
||||
## Developer Certificate of Origin + License
|
||||
|
||||
- **Code patches**
|
||||
- **Documentation improvements**
|
||||
- **Translations**
|
||||
- **Bug reports**
|
||||
- **Patch reviews**
|
||||
- **UI enhancements**
|
||||
By contributing to Taiga Agile LLC., You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Taiga Agile LLC. Except for the license granted herein to Taiga Agile LLC. and recipients of software distributed by Taiga Agile LLC., You reserve all right, title, and interest in and to Your Contributions.
|
||||
|
||||
Big features are also welcome but if you want to see your contributions included in Taiga codebase we strongly recommend you start by initiating a chat though our [mailing list](http://groups.google.co.uk/d/forum/taigaio)
|
||||
All Contributions are subject to the following DCO + License terms.
|
||||
|
||||
[DCO + License](https://github.com/taiga/taiga-back/blob/master/DCOLICENSE)
|
||||
|
||||
#### Code of Conduct ####
|
||||
_This notice should stay as the first item in the CONTRIBUTING.md file._
|
||||
|
||||
Help us keep the Taiga Community open and inclusive. Please read and follow our [Code of Conduct](https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md).
|
||||
---
|
||||
|
||||
We will be very happy to help us to improve Taiga, there are many different ways to contribute to Taiga's development, just find the one that best fits with your skills. Here are the guidelines we'd like you to follow.
|
||||
|
||||
#### License ####
|
||||
## Our Code of Conduct
|
||||
|
||||
Every code patch accepted in taiga codebase is licensed under [AGPL v3.0](http://www.gnu.org/licenses/agpl-3.0.html). You must be careful to not include any code that can not be licensed under this license.
|
||||
Help us keep the Taiga Community open and inclusive. Please read and follow our [Code of Conduct][CoC].
|
||||
|
||||
Please read carefully [our license](https://github.com/taigaio/taiga-back/blob/master/LICENSE) and ask us if you have any questions.
|
||||
## Our License
|
||||
|
||||
Every code patch accepted in Taiga codebase is licensed under [AGPL v3.0][AGPL v3.0]. You must be careful to not include any code that can not be licensed under this license.
|
||||
|
||||
#### Bug reports, enhancements and support ####
|
||||
Please read carefully [our license][Taiga license] and ask us if you have any questions.
|
||||
|
||||
If you **need help to setup Taiga**, want to **talk about some cool enhancemnt** or you have **some questions**, please write us to our [mailing list](http://groups.google.com/d/forum/taigaio).
|
||||
## Setup problems
|
||||
|
||||
If you **find a bug** in Taiga you can always report it:
|
||||
If you follow our [setup guide][taiga Dev/Setup documentation] and you have some problem, please tell with us in our [mailing list][Taiga Mailing List].
|
||||
|
||||
- in our [mailing list](http://groups.google.com/d/forum/taigaio).
|
||||
- in [github issues](https://github.com/taigaio/taiga-back/issues).
|
||||
- send us a mail to support@taiga.io if is a bug related to [tree.taiga.io](https://tree.taiga.io).
|
||||
- send a mail to security@taiga.io if is a **security bug**.
|
||||
## Sent us your feedback or questions
|
||||
|
||||
One of our fellow Taiga developers will search, find and hunt it as soon as possible.
|
||||
If you want to send us your feedback or have some questions about how to use Taiga, please direct these to our [mailing list][Taiga Mailing List]. If it's related to our SaaS https://taiga.io please write us to our support email [support@taiga.io][Support email].
|
||||
|
||||
Please, before reporting a bug write down how can we reproduce it, your operating system, your browser and version, and if it's possible, a screenshot. Sometimes it takes less time to fix a bug if the developer knows how to find it and we will solve your problem as fast as possible.
|
||||
Remember that you can find some help in our [support pages][Taiga User documentation].
|
||||
|
||||
## Did you find an issue or bug?
|
||||
|
||||
#### Documentation improvements ####
|
||||
If you find an issue using the app (UX or UI bug) or reading our source code and it's not on our [Bug list][Taiga Bug list] at Taiga.io, please report it:
|
||||
|
||||
- in our [mailing list][Taiga Mailing List]
|
||||
- in the issue section of the appropriate repository at [GitHub][Taiga in GitHub].
|
||||
- send us a mail to [support@taiga.io][Support email] if is a bug related to [tree.taiga.io][Taiga.io].
|
||||
- send a mail to [security@taiga.io][Security email] if is a **security bug**.
|
||||
|
||||
Even better: you can submit a Pull Request with a fix.
|
||||
|
||||
Please, before reporting a bug write down
|
||||
|
||||
- explain why this is a bug for you
|
||||
- how can we reproduce it
|
||||
- your operating System
|
||||
- your browser and version
|
||||
- if it's possible, a screenshot
|
||||
|
||||
Sometimes it takes less time to fix a bug if the developer knows how to find it and we will solve your problem as fast as possible.
|
||||
|
||||
**Localization Issue:** Taiga use Transifex to manage the i18n files so don't submit a pull request to those files (except `-en.json`), to fix it just access our team of translators, set up an account in the [Taiga Transifex project][Taiga in Transifex] and start contributing.
|
||||
|
||||
## Propose some feature or enhancement
|
||||
|
||||
You can propose a new enhancement to our [mailing list][Taiga Mailing List] or review and upvote in the existing [list of enhancements][Taiga Enhancement list] in Taiga.io.
|
||||
|
||||
If you would like to implement it by yourself consider what kind of change it is:
|
||||
|
||||
### Small Changes
|
||||
|
||||
It can be crafted and submitted to the [GitHub Repositories][Taiga in GitHub] as a Pull Request.
|
||||
|
||||
### Major Changes
|
||||
|
||||
Before contributing with a major change to Taiga it should be discussed first with the Taiga Team so that we can better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project. Please, contact us in the [mailing list][Taiga mailing list] or via [support@taiga.io][Support email].
|
||||
|
||||
We have defined a concrete workflow for this changes:
|
||||
|
||||
1. **User Story**: Send us a complete description of the functionality you'd like to develop, how it should work, for which profiles, as if you were writing a User Story. Please include some ideas of what would be a definition of Done of the User Story. The team will review it, decide whether or not it could make it into Taiga Core. If not, you can always write a plugin.
|
||||
2. **Mentorship**: If accepted, Taiga team will help you, and a person from the team will be your contact in the development process. The Story will be visible in the [Taiga Kanban][Taiga Kanban]
|
||||
3. **User Experience**: The functionality will require some wireframes or ideas to be developed correctly. A good UX its an essential part of Taiga success. You should create a user experience proposal and the Taiga UX team will help you.
|
||||
4. **Design**: The design should respect the Taiga style. Try to reproduce other areas of the site. The taiga design team will review this proposal as well.
|
||||
5. **Development**: The last step is the development. Remember to add unit and integration test in `taiga-back` code and unit and e2e test for `taiga-back` part. We have the API well documented too in [taiga-doc][Taiga Dev/Setup documentation].
|
||||
6. **Pull request**: Remember to add a good description and screenshots are welcome too. Once the pull request is done, someone else from the team will review the code to ensure that it fits with the good practices and styles. If it does, the PR will be merged and will be on the next Taiga release.
|
||||
|
||||
If you think you are not able to do one or more of the parts of the process, your contribution is still welcome, but we cannot ensure that it will make it soon into the Taiga core anytime soon. It will depend on our priority backlog.
|
||||
|
||||
Thanks a lot! It is really great that we could make Taiga better with the help of the community.
|
||||
|
||||
### Contrib plugins
|
||||
|
||||
Taiga support contrib plugins to add or overwrite some functionalities. You can find some example in [our organization at GitHub][Taiga in GitHub].
|
||||
|
||||
## Improve the documentation
|
||||
|
||||
We are gathering lots of information from our users to build and enhance our documentation. If you use the documentation to install or develop with Taiga and find any mistakes, omissions or confused sequences, it is enormously helpful to report it. Or better still, if you believe you can author additions, please make a pull-request to taiga project.
|
||||
|
||||
Currently, we have authored three main documentation hubs:
|
||||
|
||||
- **[API Docs](https://github.com/taigaio/taiga-doc)**: Our API documentation and reference for developing from Taiga API.
|
||||
- **[Installation Guide](https://github.com/taigaio/taiga-doc)**: If you need to install Taiga on your own server, this is the place to find some guides.
|
||||
- **[Taiga Support](https://github.com/taigaio/taiga-doc)**: This page is intended to be the support reference page for the users. If you find any mistake, please report it.
|
||||
- [Taiga Setup/Dev documentation][Taiga Dev/Setup documentation repo]: If you need to install Taiga on your own server, this is the place to find some guides or our API documentation and reference for developing from Taiga API.
|
||||
- [Taiga User documentation][Taiga User documentation repo]: This page is intended to be the support reference page for the users. If you find any mistake, please report or fix it.
|
||||
|
||||
[Taiga.io]: https://taiga.io
|
||||
|
||||
#### Translation ####
|
||||
[CoC]: https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
|
||||
[AGPL v3.0]: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
[Taiga license]: https://github.com/taigaio/taiga-back/blob/master/LICENSE
|
||||
|
||||
We are ready now to accept your help translating Taiga. It's easy (and fun!) just access our team of translators with the link below, set up an account in Transifex and start contributing. Join us to make sure your language is covered! **[Help Taiga to translate content](https://www.transifex.com/signup/ "Help Taiga to trasnlatecontent")**
|
||||
[Taiga Mailing List]: http://groups.google.co.uk/d/forum/taigaio
|
||||
[Support email]: mailto:support@taiga.io
|
||||
[Security email]: mailto:security@taiga.io
|
||||
|
||||
[Taiga in Transifex]: https://www.transifex.com/organization/taiga-agile-llc/
|
||||
[Taiga in GitHub]: https://github.com/taigaio
|
||||
|
||||
#### Code patches ####
|
||||
|
||||
Taiga will always be glad to receive code patches to update, fix or improve its code.
|
||||
|
||||
If you know how to improve our code base or you found a bug, a security vulnerability or a performance issue and you think you can solve it, we will be very happy to accept your pull-request. If your code requires considerable changes, we recommend you first talk to us directly. We will find the best way to help.
|
||||
|
||||
|
||||
#### UI enhancements ####
|
||||
|
||||
Taiga is made for developers and designers. We care enormously about UI because usability and design are both critical aspects of the Taiga experience.
|
||||
|
||||
There are two possible ways to contribute to our UI:
|
||||
- **Bugs**: If you find a bug regarding front-end, please report it as previously indicated in the Bug reports section or send a pull-request as indicated in the Code Patches section.
|
||||
- **Enhancements**: If its a design or UX bug or enhancement we will love to receive your feedback. Please send us your enhancement, with the reason and, if possible, an example. Our design and UX team will review your enhancement and fix it as soon as possible. We recommend you to use our [mailing list](http://groups.google.co.uk/d/forum/taigaio) so we can have a lot of different opinions and debate.
|
||||
- **Language Localization**: We are eager to offer localized versions of Taiga. Some members of the community have already volunteered to work to provide a variety of languages. We are working to implement some changes to allow for this and expect to accept these requests in the near future.
|
||||
|
||||
[Taiga kanban]: https://tree.taiga.io/project/taiga/kanban
|
||||
[Taiga Bug list]: https://tree.taiga.io/project/taiga/issues?statuses=1,2&orderBy=-created_date&page=1&types=1
|
||||
[Taiga Enhancement list]: https://tree.taiga.io/project/taiga/issues?statuses=1,2&orderBy=-total_voters&page=1&status=1,2&types=6
|
||||
|
||||
[Taiga Dev/Setup documentation]: http://taigaio.github.io/taiga-doc/dist/
|
||||
[Taiga Dev/Setup documentation repo]: https://github.com/taigaio/taiga-doc
|
||||
[Taiga User documentation]: https://tree.taiga.io/support/
|
||||
[Taiga User documentation repo]: https://github.com/taigaio/taiga-support
|
||||
|
|
|
@ -0,0 +1,705 @@
|
|||
Developer Certificate of Origin + License
|
||||
|
||||
By contributing to Taiga Agile LLC., You accept and agree to the following
|
||||
terms and conditions for Your present and future Contributions submitted to
|
||||
Taiga Agile LLC. Except for the license granted herein to Taiga Agile LLC. and
|
||||
recipients of software distributed by Taiga Agile LLC., You reserve all right,
|
||||
title, and interest in and to Your Contributions.
|
||||
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
1 Letterman Drive
|
||||
Suite D4700
|
||||
San Francisco, CA, 94129
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I have the right
|
||||
to submit it under the open source license indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best of my
|
||||
knowledge, is covered under an appropriate open source license and I have the
|
||||
right under that license to submit that work with modifications, whether
|
||||
created in whole or in part by me, under the same open source license
|
||||
(unless I am permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other person who
|
||||
certified (a), (b) or (c) and I have not modified it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution are public
|
||||
and that a record of the contribution (including all personal information I
|
||||
submit with it, including my sign-off) is maintained indefinitely and may be
|
||||
redistributed consistent with this project or the open source license(s)
|
||||
involved.
|
||||
|
||||
All Contributions to this project are licensed under the following license:
|
||||
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,19 @@
|
|||
**Before adding an issue**
|
||||
Please ensure that your issue is not already reported in our [issues list](https://tree.taiga.io/project/taiga/issues?order_by=-created_date).
|
||||
If this issue was already reported, remember that you can upvote it to raise its importance.
|
||||
|
||||
**Do you want to request a *feature* or report a *bug*?**
|
||||
|
||||
**What is the current behavior?**
|
||||
|
||||
**If the current behavior is a bug, please provide the steps to reproduce.**
|
||||
|
||||
**What is the expected behavior?**
|
||||
|
||||
**Is it happening in taiga.io or in your own instance?**
|
||||
|
||||
**What browser/version are you using?**
|
||||
|
||||
**Are there any console errors *(Ctrl + F12)* in red?**
|
||||
|
||||
Thanks for reporting!
|
|
@ -0,0 +1,53 @@
|
|||
[[source]]
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
asana = "==0.6.7"
|
||||
bleach = "==2.1.4"
|
||||
celery = "==4.0.2"
|
||||
cryptography = "==2.3.1"
|
||||
diff-match-patch = "==20121119"
|
||||
django-ipware = "==1.1.6"
|
||||
django-jinja = "==2.3.1"
|
||||
django-picklefield = "==0.3.2"
|
||||
django-pglocks = "==1.0.2"
|
||||
django-sampledatahelper = "==0.4.1"
|
||||
django-sites = "==0.9"
|
||||
django-sr = "==0.0.4"
|
||||
djmail = "==1.0.1"
|
||||
easy-thumbnails = "==2.4.1"
|
||||
fn = "==0.4.3"
|
||||
gunicorn = "==19.7.1"
|
||||
kombu = "==4.0.2" # The same as celery
|
||||
netaddr = "==0.7.19"
|
||||
premailer = "==3.0.1"
|
||||
psd-tools = "==1.4"
|
||||
"psycopg2-binary" = "==2.7.5"
|
||||
python-dateutil = "==2.7.5"
|
||||
python-magic = "==0.4.13"
|
||||
pytz = "*"
|
||||
raven = "==6.1.0"
|
||||
redis = "==2.10.5"
|
||||
requests = "==2.20.0"
|
||||
requests_oauthlib = "*"
|
||||
serpy = "==0.1.1"
|
||||
webcolors = "==1.7"
|
||||
CairoSVG = "==2.0.3"
|
||||
Django = "~=1.11.15"
|
||||
Markdown = "==3.0.1"
|
||||
Pillow = "==4.1.1"
|
||||
Unidecode = "==0.4.20"
|
||||
Pygments = "==2.2.0"
|
||||
oauthlib = {extras = ["signedtoken"],version = "*"}
|
||||
|
||||
[dev-packages]
|
||||
coverage = "*"
|
||||
coveralls = "*"
|
||||
pytest = "*"
|
||||
pytest-django = "*"
|
||||
factory-boy = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.6"
|
|
@ -0,0 +1,805 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "2505838cdc4b5390130990ae63647a4447c5f146ab37ca8bf29f627091112cf7"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_version": "3.6"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"amqp": {
|
||||
"hashes": [
|
||||
"sha256:073dd02fdd73041bffc913b767866015147b61f2a9bc104daef172fc1a0066eb",
|
||||
"sha256:eed41946890cd43e8dee44a316b85cf6fee5a1a34bb4a562b660a358eb529e1b"
|
||||
],
|
||||
"version": "==2.3.2"
|
||||
},
|
||||
"asana": {
|
||||
"hashes": [
|
||||
"sha256:412398ff0f72104f5fb602653b994cdd36de89aedff2d37229b237f300f5f01b",
|
||||
"sha256:d576601116764050c4cf63b417f1c24700b76cf6686f0e51e6b0b77d450e7973"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.6.7"
|
||||
},
|
||||
"asn1crypto": {
|
||||
"hashes": [
|
||||
"sha256:2f1adbb7546ed199e3c90ef23ec95c5cf3585bac7d11fb7eb562a3fe89c64e87",
|
||||
"sha256:9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49"
|
||||
],
|
||||
"version": "==0.24.0"
|
||||
},
|
||||
"billiard": {
|
||||
"hashes": [
|
||||
"sha256:42d9a227401ac4fba892918bba0a0c409def5435c4b483267ebfe821afaaba0e"
|
||||
],
|
||||
"version": "==3.5.0.5"
|
||||
},
|
||||
"bleach": {
|
||||
"hashes": [
|
||||
"sha256:0ee95f6167129859c5dce9b1ca291ebdb5d8cd7e382ca0e237dfd0dad63f63d8",
|
||||
"sha256:24754b9a7d530bf30ce7cbc805bc6cce785660b4a10ff3a43633728438c105ab"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.1.4"
|
||||
},
|
||||
"cairocffi": {
|
||||
"hashes": [
|
||||
"sha256:15386c3a9e08823d6826c4491eaccc7b7254b1dc587a3b9ce60c350c3f990337"
|
||||
],
|
||||
"version": "==0.9.0"
|
||||
},
|
||||
"cairosvg": {
|
||||
"hashes": [
|
||||
"sha256:d2da5aaa31ded26affd5cdffc371ec4cc48800bc2d822a9c28504360482418a1"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.0.3"
|
||||
},
|
||||
"celery": {
|
||||
"hashes": [
|
||||
"sha256:0e5b7e0d7f03aa02061abfd27aa9da05b6740281ca1f5228a54fbf7fe74d8afa",
|
||||
"sha256:e3d5a6c56a73ff8f2ddd4d06dc37f4c2afe4bb4da7928b884d0725ea865ef54d"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.0.2"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7",
|
||||
"sha256:993f830721089fef441cdfeb4b2c8c9df86f0c63239f06bd025a76a7daddb033"
|
||||
],
|
||||
"version": "==2018.11.29"
|
||||
},
|
||||
"cffi": {
|
||||
"hashes": [
|
||||
"sha256:151b7eefd035c56b2b2e1eb9963c90c6302dc15fbd8c1c0a83a163ff2c7d7743",
|
||||
"sha256:1553d1e99f035ace1c0544050622b7bc963374a00c467edafac50ad7bd276aef",
|
||||
"sha256:1b0493c091a1898f1136e3f4f991a784437fac3673780ff9de3bcf46c80b6b50",
|
||||
"sha256:2ba8a45822b7aee805ab49abfe7eec16b90587f7f26df20c71dd89e45a97076f",
|
||||
"sha256:3bb6bd7266598f318063e584378b8e27c67de998a43362e8fce664c54ee52d30",
|
||||
"sha256:3c85641778460581c42924384f5e68076d724ceac0f267d66c757f7535069c93",
|
||||
"sha256:3eb6434197633b7748cea30bf0ba9f66727cdce45117a712b29a443943733257",
|
||||
"sha256:495c5c2d43bf6cebe0178eb3e88f9c4aa48d8934aa6e3cddb865c058da76756b",
|
||||
"sha256:4c91af6e967c2015729d3e69c2e51d92f9898c330d6a851bf8f121236f3defd3",
|
||||
"sha256:57b2533356cb2d8fac1555815929f7f5f14d68ac77b085d2326b571310f34f6e",
|
||||
"sha256:770f3782b31f50b68627e22f91cb182c48c47c02eb405fd689472aa7b7aa16dc",
|
||||
"sha256:79f9b6f7c46ae1f8ded75f68cf8ad50e5729ed4d590c74840471fc2823457d04",
|
||||
"sha256:7a33145e04d44ce95bcd71e522b478d282ad0eafaf34fe1ec5bbd73e662f22b6",
|
||||
"sha256:857959354ae3a6fa3da6651b966d13b0a8bed6bbc87a0de7b38a549db1d2a359",
|
||||
"sha256:87f37fe5130574ff76c17cab61e7d2538a16f843bb7bca8ebbc4b12de3078596",
|
||||
"sha256:95d5251e4b5ca00061f9d9f3d6fe537247e145a8524ae9fd30a2f8fbce993b5b",
|
||||
"sha256:9d1d3e63a4afdc29bd76ce6aa9d58c771cd1599fbba8cf5057e7860b203710dd",
|
||||
"sha256:a36c5c154f9d42ec176e6e620cb0dd275744aa1d804786a71ac37dc3661a5e95",
|
||||
"sha256:a6a5cb8809091ec9ac03edde9304b3ad82ad4466333432b16d78ef40e0cce0d5",
|
||||
"sha256:ae5e35a2c189d397b91034642cb0eab0e346f776ec2eb44a49a459e6615d6e2e",
|
||||
"sha256:b0f7d4a3df8f06cf49f9f121bead236e328074de6449866515cea4907bbc63d6",
|
||||
"sha256:b75110fb114fa366b29a027d0c9be3709579602ae111ff61674d28c93606acca",
|
||||
"sha256:ba5e697569f84b13640c9e193170e89c13c6244c24400fc57e88724ef610cd31",
|
||||
"sha256:be2a9b390f77fd7676d80bc3cdc4f8edb940d8c198ed2d8c0be1319018c778e1",
|
||||
"sha256:ca1bd81f40adc59011f58159e4aa6445fc585a32bb8ac9badf7a2c1aa23822f2",
|
||||
"sha256:d5d8555d9bfc3f02385c1c37e9f998e2011f0db4f90e250e5bc0c0a85a813085",
|
||||
"sha256:e55e22ac0a30023426564b1059b035973ec82186ddddbac867078435801c7801",
|
||||
"sha256:e90f17980e6ab0f3c2f3730e56d1fe9bcba1891eeea58966e89d352492cc74f4",
|
||||
"sha256:ecbb7b01409e9b782df5ded849c178a0aa7c906cf8c5a67368047daab282b184",
|
||||
"sha256:ed01918d545a38998bfa5902c7c00e0fee90e957ce036a4000a88e3fe2264917",
|
||||
"sha256:edabd457cd23a02965166026fd9bfd196f4324fe6032e866d0f3bd0301cd486f",
|
||||
"sha256:fdf1c1dc5bafc32bc5d08b054f94d659422b05aba244d6be4ddc1c72d9aa70fb"
|
||||
],
|
||||
"version": "==1.11.5"
|
||||
},
|
||||
"chardet": {
|
||||
"hashes": [
|
||||
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
|
||||
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
|
||||
],
|
||||
"version": "==3.0.4"
|
||||
},
|
||||
"contextlib2": {
|
||||
"hashes": [
|
||||
"sha256:509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48",
|
||||
"sha256:f5260a6e679d2ff42ec91ec5252f4eeffdcf21053db9113bd0a8e4d953769c00"
|
||||
],
|
||||
"version": "==0.5.5"
|
||||
},
|
||||
"cryptography": {
|
||||
"hashes": [
|
||||
"sha256:02602e1672b62e803e08617ec286041cc453e8d43f093a5f4162095506bc0beb",
|
||||
"sha256:10b48e848e1edb93c1d3b797c83c72b4c387ab0eb4330aaa26da8049a6cbede0",
|
||||
"sha256:17db09db9d7c5de130023657be42689d1a5f60502a14f6f745f6f65a6b8195c0",
|
||||
"sha256:227da3a896df1106b1a69b1e319dce218fa04395e8cc78be7e31ca94c21254bc",
|
||||
"sha256:2cbaa03ac677db6c821dac3f4cdfd1461a32d0615847eedbb0df54bb7802e1f7",
|
||||
"sha256:31db8febfc768e4b4bd826750a70c79c99ea423f4697d1dab764eb9f9f849519",
|
||||
"sha256:4a510d268e55e2e067715d728e4ca6cd26a8e9f1f3d174faf88e6f2cb6b6c395",
|
||||
"sha256:6a88d9004310a198c474d8a822ee96a6dd6c01efe66facdf17cb692512ae5bc0",
|
||||
"sha256:76936ec70a9b72eb8c58314c38c55a0336a2b36de0c7ee8fb874a4547cadbd39",
|
||||
"sha256:7e3b4aecc4040928efa8a7cdaf074e868af32c58ffc9bb77e7bf2c1a16783286",
|
||||
"sha256:8168bcb08403ef144ff1fb880d416f49e2728101d02aaadfe9645883222c0aa5",
|
||||
"sha256:8229ceb79a1792823d87779959184a1bf95768e9248c93ae9f97c7a2f60376a1",
|
||||
"sha256:8a19e9f2fe69f6a44a5c156968d9fc8df56d09798d0c6a34ccc373bb186cee86",
|
||||
"sha256:8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6",
|
||||
"sha256:be495b8ec5a939a7605274b6e59fbc35e76f5ad814ae010eb679529671c9e119",
|
||||
"sha256:dc2d3f3b1548f4d11786616cf0f4415e25b0fbecb8a1d2cd8c07568f13fdde38",
|
||||
"sha256:e4aecdd9d5a3d06c337894c9a6e2961898d3f64fe54ca920a72234a3de0f9cb3",
|
||||
"sha256:e79ab4485b99eacb2166f3212218dd858258f374855e1568f728462b0e6ee0d9",
|
||||
"sha256:f995d3667301e1754c57b04e0bae6f0fa9d710697a9f8d6712e8cca02550910f"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.3.1"
|
||||
},
|
||||
"cssselect": {
|
||||
"hashes": [
|
||||
"sha256:066d8bc5229af09617e24b3ca4d52f1f9092d9e061931f4184cd572885c23204",
|
||||
"sha256:3b5103e8789da9e936a68d993b70df732d06b8bb9a337a05ed4eb52c17ef7206"
|
||||
],
|
||||
"version": "==1.0.3"
|
||||
},
|
||||
"cssutils": {
|
||||
"hashes": [
|
||||
"sha256:a2fcf06467553038e98fea9cfe36af2bf14063eb147a70958cfcaa8f5786acaf",
|
||||
"sha256:c74dbe19c92f5052774eadb15136263548dd013250f1ed1027988e7fef125c8d"
|
||||
],
|
||||
"version": "==1.0.2"
|
||||
},
|
||||
"diff-match-patch": {
|
||||
"hashes": [
|
||||
"sha256:9dba5611fbf27893347349fd51cc1911cb403682a7163373adacc565d11e2e4c"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==20121119"
|
||||
},
|
||||
"django": {
|
||||
"hashes": [
|
||||
"sha256:29268cc47816a44f27308e60f71da635f549c47d8a1d003b28de55141df75791",
|
||||
"sha256:37f5876c1fbfd66085001f4c06fa0bf96ef05442c53daf8d4294b6f29e7fa6b8"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.11.16"
|
||||
},
|
||||
"django-ipware": {
|
||||
"hashes": [
|
||||
"sha256:93a90f9dd8caf2c633172aa8c8ba4e76e2b44f92a6942fa35e7624281e81ea03"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.1.6"
|
||||
},
|
||||
"django-jinja": {
|
||||
"hashes": [
|
||||
"sha256:5e826a0cce967f40e6fdc037ea23667a2d3cd072807c4c87ffcc010b3c59121f",
|
||||
"sha256:ebfde44cb716e57a9cdff6c1a4935fc49c7419ea4cd0b2b89bcecc696b9c0c86"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.3.1"
|
||||
},
|
||||
"django-pglocks": {
|
||||
"hashes": [
|
||||
"sha256:9405ee54bbf157bb16b814f20ea7ad9d82d5cf26f9bf3ea8e3a71032179844cf"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.0.2"
|
||||
},
|
||||
"django-picklefield": {
|
||||
"hashes": [
|
||||
"sha256:5489fef164de43725242d56e65e016137d3df0d1a00672bda72d807f5b2b0d99",
|
||||
"sha256:fab48a427c6310740755b242128f9300283bef159ffee42d3231a274c65d9ae2"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.3.2"
|
||||
},
|
||||
"django-sampledatahelper": {
|
||||
"hashes": [
|
||||
"sha256:96d0a599054979eb9669d44a1735236da42d56be0c45d4bcd34c2a3acefb259d"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.4.1"
|
||||
},
|
||||
"django-sites": {
|
||||
"hashes": [
|
||||
"sha256:fa1470bd72be589f3891b7cd28dd2d782d8b34539665d9334e49154566f3d916"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.9"
|
||||
},
|
||||
"django-sr": {
|
||||
"hashes": [
|
||||
"sha256:3586b852ae8af1b4b2796590534b0b867b523f47a5779b2ccb6ce010efc57e34"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.0.4"
|
||||
},
|
||||
"djmail": {
|
||||
"hashes": [
|
||||
"sha256:370f57230bf79004840ddd1cb8150a5b7676b2aa14bc5b62027106cb708a47a0"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.0.1"
|
||||
},
|
||||
"docopt": {
|
||||
"hashes": [
|
||||
"sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
|
||||
],
|
||||
"version": "==0.6.2"
|
||||
},
|
||||
"easy-thumbnails": {
|
||||
"hashes": [
|
||||
"sha256:5cc51c6ec7de110355d0f8cd56c9ede6e2949e87c2fcb34bc864a20ecd424270",
|
||||
"sha256:6e41e70a182a6d00af9f3f3a6d1cc87cb7da060a3d56982da51d266e40fc9b59"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.4.1"
|
||||
},
|
||||
"fn": {
|
||||
"hashes": [
|
||||
"sha256:f8cd80cdabf15367a2f07e7a9951fdc013d7200412743d85b88f2c896c95bada"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.4.3"
|
||||
},
|
||||
"gunicorn": {
|
||||
"hashes": [
|
||||
"sha256:75af03c99389535f218cc596c7de74df4763803f7b63eb09d77e92b3956b36c6",
|
||||
"sha256:eee1169f0ca667be05db3351a0960765620dad53f53434262ff8901b68a1b622"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==19.7.1"
|
||||
},
|
||||
"html5lib": {
|
||||
"hashes": [
|
||||
"sha256:20b159aa3badc9d5ee8f5c647e5efd02ed2a66ab8d354930bd9ff139fc1dc0a3",
|
||||
"sha256:66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736"
|
||||
],
|
||||
"version": "==1.0.1"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
|
||||
"sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
|
||||
],
|
||||
"version": "==2.7"
|
||||
},
|
||||
"jinja2": {
|
||||
"hashes": [
|
||||
"sha256:74c935a1b8bb9a3947c50a54766a969d4846290e1e788ea44c1392163723c3bd",
|
||||
"sha256:f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4"
|
||||
],
|
||||
"version": "==2.10"
|
||||
},
|
||||
"kombu": {
|
||||
"hashes": [
|
||||
"sha256:385bf38e6de7f3851f674671dbfe24572ce999608d293a85fb8a630654d8bd9c",
|
||||
"sha256:d0fc6f2a36610a308f838db4b832dad79a681b516ac1d1a1f9d42edb58cc11a2"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.0.2"
|
||||
},
|
||||
"lxml": {
|
||||
"hashes": [
|
||||
"sha256:02bc220d61f46e9b9d5a53c361ef95e9f5e1d27171cd461dddb17677ae2289a5",
|
||||
"sha256:22f253b542a342755f6cfc047fe4d3a296515cf9b542bc6e261af45a80b8caf6",
|
||||
"sha256:2f31145c7ff665b330919bfa44aacd3a0211a76ca7e7b441039d2a0b0451e415",
|
||||
"sha256:36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f",
|
||||
"sha256:438a1b0203545521f6616132bfe0f4bca86f8a401364008b30e2b26ec408ce85",
|
||||
"sha256:4815892904c336bbaf73dafd54f45f69f4021c22b5bad7332176bbf4fb830568",
|
||||
"sha256:5be031b0f15ad63910d8e5038b489d95a79929513b3634ad4babf77100602588",
|
||||
"sha256:5c93ae37c3c588e829b037fdfbd64a6e40c901d3f93f7beed6d724c44829a3ad",
|
||||
"sha256:60842230678674cdac4a1cf0f707ef12d75b9a4fc4a565add4f710b5fcf185d5",
|
||||
"sha256:62939a8bb6758d1bf923aa1c13f0bcfa9bf5b2fc0f5fa917a6e25db5fe0cfa4e",
|
||||
"sha256:75830c06a62fe7b8fe3bbb5f269f0b308f19f3949ac81cfd40062f47c1455faf",
|
||||
"sha256:81992565b74332c7c1aff6a913a3e906771aa81c9d0c68c68113cffcae45bc53",
|
||||
"sha256:8c892fb0ee52c594d9a7751c7d7356056a9682674b92cc1c4dc968ff0f30c52f",
|
||||
"sha256:9d862e3cf4fc1f2837dedce9c42269c8c76d027e49820a548ac89fdcee1e361f",
|
||||
"sha256:a623965c086a6e91bb703d4da62dabe59fe88888e82c4117d544e11fd74835d6",
|
||||
"sha256:a7783ab7f6a508b0510490cef9f857b763d796ba7476d9703f89722928d1e113",
|
||||
"sha256:aab09fbe8abfa3b9ce62aaf45aca2d28726b1b9ee44871dbe644050a2fff4940",
|
||||
"sha256:abf181934ac3ef193832fb973fd7f6149b5c531903c2ec0f1220941d73eee601",
|
||||
"sha256:ae07fa0c115733fce1e9da96a3ac3fa24801742ca17e917e0c79d63a01eeb843",
|
||||
"sha256:b9c78242219f674ab645ec571c9a95d70f381319a23911941cd2358a8e0521cf",
|
||||
"sha256:bccb267678b870d9782c3b44d0cefe3ba0e329f9af8c946d32bf3778e7a4f271",
|
||||
"sha256:c4df4d27f4c93b2cef74579f00b1d3a31a929c7d8023f870c4b476f03a274db4",
|
||||
"sha256:caf0e50b546bb60dfa99bb18dfa6748458a83131ecdceaf5c071d74907e7e78a",
|
||||
"sha256:d3266bd3ac59ac4edcd5fa75165dee80b94a3e5c91049df5f7c057ccf097551c",
|
||||
"sha256:db0d213987bcd4e6d41710fb4532b22315b0d8fb439ff901782234456556aed1",
|
||||
"sha256:dbbd5cf7690a40a9f0a9325ab480d0fccf46d16b378eefc08e195d84299bfae1",
|
||||
"sha256:e16e07a0ec3a75b5ee61f2b1003c35696738f937dc8148fbda9fe2147ccb6e61",
|
||||
"sha256:e175a006725c7faadbe69e791877d09936c0ef2cf49d01b60a6c1efcb0e8be6f",
|
||||
"sha256:edd9c13a97f6550f9da2236126bb51c092b3b1ce6187f2bd966533ad794bbb5e",
|
||||
"sha256:fa39ea60d527fbdd94215b5e5552f1c6a912624521093f1384a491a8ad89ad8b"
|
||||
],
|
||||
"version": "==4.2.5"
|
||||
},
|
||||
"markdown": {
|
||||
"hashes": [
|
||||
"sha256:c00429bd503a47ec88d5e30a751e147dcb4c6889663cd3e2ba0afe858e009baa",
|
||||
"sha256:d02e0f9b04c500cde6637c11ad7c72671f359b87b9fe924b2383649d8841db7c"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.0.1"
|
||||
},
|
||||
"markupsafe": {
|
||||
"hashes": [
|
||||
"sha256:048ef924c1623740e70204aa7143ec592504045ae4429b59c30054cb31e3c432",
|
||||
"sha256:130f844e7f5bdd8e9f3f42e7102ef1d49b2e6fdf0d7526df3f87281a532d8c8b",
|
||||
"sha256:19f637c2ac5ae9da8bfd98cef74d64b7e1bb8a63038a3505cd182c3fac5eb4d9",
|
||||
"sha256:1b8a7a87ad1b92bd887568ce54b23565f3fd7018c4180136e1cf412b405a47af",
|
||||
"sha256:1c25694ca680b6919de53a4bb3bdd0602beafc63ff001fea2f2fc16ec3a11834",
|
||||
"sha256:1f19ef5d3908110e1e891deefb5586aae1b49a7440db952454b4e281b41620cd",
|
||||
"sha256:1fa6058938190ebe8290e5cae6c351e14e7bb44505c4a7624555ce57fbbeba0d",
|
||||
"sha256:31cbb1359e8c25f9f48e156e59e2eaad51cd5242c05ed18a8de6dbe85184e4b7",
|
||||
"sha256:3e835d8841ae7863f64e40e19477f7eb398674da6a47f09871673742531e6f4b",
|
||||
"sha256:4e97332c9ce444b0c2c38dd22ddc61c743eb208d916e4265a2a3b575bdccb1d3",
|
||||
"sha256:525396ee324ee2da82919f2ee9c9e73b012f23e7640131dd1b53a90206a0f09c",
|
||||
"sha256:52b07fbc32032c21ad4ab060fec137b76eb804c4b9a1c7c7dc562549306afad2",
|
||||
"sha256:52ccb45e77a1085ec5461cde794e1aa037df79f473cbc69b974e73940655c8d7",
|
||||
"sha256:5c3fbebd7de20ce93103cb3183b47671f2885307df4a17a0ad56a1dd51273d36",
|
||||
"sha256:5e5851969aea17660e55f6a3be00037a25b96a9b44d2083651812c99d53b14d1",
|
||||
"sha256:5edfa27b2d3eefa2210fb2f5d539fbed81722b49f083b2c6566455eb7422fd7e",
|
||||
"sha256:7d263e5770efddf465a9e31b78362d84d015cc894ca2c131901a4445eaa61ee1",
|
||||
"sha256:83381342bfc22b3c8c06f2dd93a505413888694302de25add756254beee8449c",
|
||||
"sha256:857eebb2c1dc60e4219ec8e98dfa19553dae33608237e107db9c6078b1167856",
|
||||
"sha256:98e439297f78fca3a6169fd330fbe88d78b3bb72f967ad9961bcac0d7fdd1550",
|
||||
"sha256:bf54103892a83c64db58125b3f2a43df6d2cb2d28889f14c78519394feb41492",
|
||||
"sha256:d9ac82be533394d341b41d78aca7ed0e0f4ba5a2231602e2f05aa87f25c51672",
|
||||
"sha256:e982fe07ede9fada6ff6705af70514a52beb1b2c3d25d4e873e82114cf3c5401",
|
||||
"sha256:edce2ea7f3dfc981c4ddc97add8a61381d9642dc3273737e756517cc03e84dd6",
|
||||
"sha256:efdc45ef1afc238db84cb4963aa689c0408912a0239b0721cb172b4016eb31d6",
|
||||
"sha256:f137c02498f8b935892d5c0172560d7ab54bc45039de8805075e19079c639a9c",
|
||||
"sha256:f82e347a72f955b7017a39708a3667f106e6ad4d10b25f237396a7115d8ed5fd",
|
||||
"sha256:fb7c206e01ad85ce57feeaaa0bf784b97fa3cad0d4a5737bc5295785f5c613a1"
|
||||
],
|
||||
"version": "==1.1.0"
|
||||
},
|
||||
"netaddr": {
|
||||
"hashes": [
|
||||
"sha256:38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd",
|
||||
"sha256:56b3558bd71f3f6999e4c52e349f38660e54a7a8a9943335f73dfc96883e08ca"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.7.19"
|
||||
},
|
||||
"oauthlib": {
|
||||
"hashes": [
|
||||
"sha256:ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162",
|
||||
"sha256:d883b36b21a6ad813953803edfa563b1b579d79ca758fe950d1bc9e8b326025b"
|
||||
],
|
||||
"version": "==2.1.0"
|
||||
},
|
||||
"olefile": {
|
||||
"hashes": [
|
||||
"sha256:133b031eaf8fd2c9399b78b8bc5b8fcbe4c31e85295749bb17a87cba8f3c3964"
|
||||
],
|
||||
"version": "==0.46"
|
||||
},
|
||||
"pillow": {
|
||||
"hashes": [
|
||||
"sha256:00b6a5f28d00f720235a937ebc2f50f4292a5c7e2d6ab9a8b26153b625c4f431",
|
||||
"sha256:025208f835383f425e93d574842f9c5d28918cd4cdf632c1ce2e72ab80d8fcc8",
|
||||
"sha256:059a9b4e064b70e1396a3ae64781a91512f773cae548c24b12014616f723f22d",
|
||||
"sha256:17f7702f22729ffeb69f5226abf3261ef2d2eb73ab5854c1294daa3bdb5bdfb7",
|
||||
"sha256:20a3549d7a83e969eb900c726d54b34673efc1d0e3c9856b8227350f7e21d968",
|
||||
"sha256:24258e1875c8a9de1b176bf1873436397669440d1561b06b00eb270bffefcb42",
|
||||
"sha256:318b4404c8ca34cc1514d60de81ac4a0b0d11031a70341c2b7cd4fc01c914d89",
|
||||
"sha256:33a71986741227c8c085ee5929171cd4c9376b2eee189cdc7acc7d81e1a3ca84",
|
||||
"sha256:3499deb97561d6cc75de725fcf744491dd2d10d6213a29c4d62e3980e1522715",
|
||||
"sha256:3ad24690882b68599b9e6b25309000881eebcc731ca499f8dcc549fab006e4a3",
|
||||
"sha256:3c05df947656d8538dfb39fb8ddb9fe3594c9345911aa19f07e2ed0a8d148a6d",
|
||||
"sha256:48cdae5e5291d355fc215ede2ea93738e243c2467b11e41fa5010a76fd278fc5",
|
||||
"sha256:4b382c0ee6ac822673e1a57c2e9878d2ac4cd52038be097bac8535a2ee60ec0e",
|
||||
"sha256:6458293cf299f02f17f58a1ee4b91f77b8ce7a38bc0e757838767f1389479953",
|
||||
"sha256:8ef6627adfe9314b4132d4f5207563ba147e3977019ab1ca3f0b11b04c83c84f",
|
||||
"sha256:9c508bf0b2aadad4349f69aebe080977dbf0cd055cefc15793c4165851a96933",
|
||||
"sha256:9d7c0706cd86fc17643d78674cdac7f05590a2da1d71c42c2ebfb27df3889f17",
|
||||
"sha256:a2a873b54881c4cf4d8b37f3c426c2b8f797b341e3893650763a62252bda3922",
|
||||
"sha256:b79fc81352a3c907a1223499d790a4a7b77be342b794e19628046c4c95676356",
|
||||
"sha256:c040a047209edaf860ce6dd5b55de718e047144b26b0ee4198dd19907c128eac",
|
||||
"sha256:d71992826cfed66f5ad68364b2c6c3c1ab305294a642deae96ad77004981fb0f",
|
||||
"sha256:e467d0977997b43ca80b7af42de3d1cfa779988f6507965e6d4fb1a004e963a0",
|
||||
"sha256:ecf810b5019ce62846a9203bab82eb02bb9ed60e258b2fd89e2ca19a7010da46",
|
||||
"sha256:f4fb801bfd2bcbfc4a7f2819c95ea6a1cfef197420ae9849b01b08b9970a51b3",
|
||||
"sha256:f63404731fa5fa0c21d00af119b867e30208e3fc148c9b13fb6a541a8df203b2",
|
||||
"sha256:f8e8f3f20e32f73f81ec408061f7a81ada07d7b3fac0787bdd233b93e4ff7d9c",
|
||||
"sha256:fb3eaba16b6cf01f12860edccac40f98362bc17225575f3bcabb333d0b4ed6dc"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.1.1"
|
||||
},
|
||||
"premailer": {
|
||||
"hashes": [
|
||||
"sha256:25c97c4c1838a8045ed1da1a14bd82ce458687878aa162378a78aa82a6aec6af",
|
||||
"sha256:4e71cc09ad1438f827d1070ffac54ceb3a6a07c995fa82cb34c1ef163adeb432"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.0.1"
|
||||
},
|
||||
"psd-tools": {
|
||||
"hashes": [
|
||||
"sha256:1a8dd69783c84217f3a25938916c289e5653543c5610e9013769520e8bd65b3c",
|
||||
"sha256:7f3fd8577fb627405a204a65d4ccea48299f95338a71fbd9709bdb9d7789cc4e",
|
||||
"sha256:f519a08049c19b3ef37ccc2b39af11ac5ded59d2674fc4c28103e4db57a9aa99"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.4"
|
||||
},
|
||||
"psycopg2-binary": {
|
||||
"hashes": [
|
||||
"sha256:04afb59bbbd2eab3148e6816beddc74348078b8c02a1113ea7f7822f5be4afe3",
|
||||
"sha256:098b18f4d8857a8f9b206d1dc54db56c2255d5d26458917e7bcad61ebfe4338f",
|
||||
"sha256:0bf855d4a7083e20ead961fda4923887094eaeace0ab2d76eb4aa300f4bbf5bd",
|
||||
"sha256:197dda3ffd02057820be83fe4d84529ea70bf39a9a4daee1d20ffc74eb3d042e",
|
||||
"sha256:278ef63afb4b3d842b4609f2c05ffbfb76795cf6a184deeb8707cd5ed3c981a5",
|
||||
"sha256:3cbf8c4fc8f22f0817220891cf405831559f4d4c12c4f73913730a2ea6c47a47",
|
||||
"sha256:4305aed922c4d9d6163ab3a41d80b5a1cfab54917467da8168552c42cad84d32",
|
||||
"sha256:47ee296f704fb8b2a616dec691cdcfd5fa0f11943955e88faa98cbd1dc3b3e3d",
|
||||
"sha256:4a0e38cb30457e70580903367161173d4a7d1381eb2f2cfe4e69b7806623f484",
|
||||
"sha256:4d6c294c6638a71cafb82a37f182f24321f1163b08b5d5ca076e11fe838a3086",
|
||||
"sha256:4f3233c366500730f839f92833194fd8f9a5c4529c8cd8040aa162c3740de8e5",
|
||||
"sha256:5221f5a3f4ca2ddf0d58e8b8a32ca50948be9a43351fda797eb4e72d7a7aa34d",
|
||||
"sha256:5c6ca0b507540a11eaf9e77dee4f07c131c2ec80ca0cffa146671bf690bc1c02",
|
||||
"sha256:789bd89d71d704db2b3d5e67d6d518b158985d791d3b2dec5ab85457cfc9677b",
|
||||
"sha256:7b94d29239efeaa6a967f3b5971bd0518d2a24edd1511edbf4a2c8b815220d07",
|
||||
"sha256:89bc65ef3301c74cf32db25334421ea6adbe8f65601ea45dcaaf095abed910bb",
|
||||
"sha256:89d6d3a549f405c20c9ae4dc94d7ed2de2fa77427a470674490a622070732e62",
|
||||
"sha256:97521704ac7127d7d8ba22877da3c7bf4a40366587d238ec679ff38e33177498",
|
||||
"sha256:a395b62d5f44ff6f633231abe568e2203b8fabf9797cd6386aa92497df912d9a",
|
||||
"sha256:a6d32c37f714c3f34158f3fa659f3a8f2658d5f53c4297d45579b9677cc4d852",
|
||||
"sha256:a89ee5c26f72f2d0d74b991ce49e42ddeb4ac0dc2d8c06a0f2770a1ab48f4fe0",
|
||||
"sha256:b4c8b0ef3608e59317bfc501df84a61e48b5445d45f24d0391a24802de5f2d84",
|
||||
"sha256:b5fcf07140219a1f71e18486b8dc28e2e1b76a441c19374805c617aa6d9a9d55",
|
||||
"sha256:b86f527f00956ecebad6ab3bb30e3a75fedf1160a8716978dd8ce7adddedd86f",
|
||||
"sha256:be4c4aa22ba22f70de36c98b06480e2f1697972d49eb20d525f400d204a6d272",
|
||||
"sha256:c2ac7aa1a144d4e0e613ac7286dae85671e99fe7a1353954d4905629c36b811c",
|
||||
"sha256:de26ef4787b5e778e8223913a3e50368b44e7480f83c76df1f51d23bd21cea16",
|
||||
"sha256:e70ebcfc5372dc7b699c0110454fc4263967f30c55454397e5769eb72c0eb0ce",
|
||||
"sha256:eadbd32b6bc48b67b0457fccc94c86f7ccc8178ab839f684eb285bb592dc143e",
|
||||
"sha256:ecbc6dfff6db06b8b72ae8a2f25ff20fbdcb83cb543811a08f7cb555042aa729"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.7.5"
|
||||
},
|
||||
"pycparser": {
|
||||
"hashes": [
|
||||
"sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"
|
||||
],
|
||||
"version": "==2.19"
|
||||
},
|
||||
"pygments": {
|
||||
"hashes": [
|
||||
"sha256:78f3f434bcc5d6ee09020f92ba487f95ba50f1e3ef83ae96b9d5ffa1bab25c5d",
|
||||
"sha256:dbae1046def0efb574852fab9e90209b23f556367b5a320c0bcb871c77c3e8cc"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.2.0"
|
||||
},
|
||||
"pyjwt": {
|
||||
"hashes": [
|
||||
"sha256:00414bfef802aaecd8cc0d5258b6cb87bd8f553c2986c2c5f29b19dd5633aeb7",
|
||||
"sha256:ddec8409c57e9d371c6006e388f91daf3b0b43bdf9fcbf99451fb7cf5ce0a86d"
|
||||
],
|
||||
"version": "==1.7.0"
|
||||
},
|
||||
"python-dateutil": {
|
||||
"hashes": [
|
||||
"sha256:063df5763652e21de43de7d9e00ccf239f953a832941e37be541614732cdfc93",
|
||||
"sha256:88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.7.5"
|
||||
},
|
||||
"python-magic": {
|
||||
"hashes": [
|
||||
"sha256:604eace6f665809bebbb07070508dfa8cabb2d7cb05be9a56706c60f864f1289",
|
||||
"sha256:a1ec69e76cc513b1af164c02982607f96ff3bb668162a688f2b1bb5f6a5fe05d"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.4.13"
|
||||
},
|
||||
"pytz": {
|
||||
"hashes": [
|
||||
"sha256:31cb35c89bd7d333cd32c5f278fca91b523b0834369e757f4c5641ea252236ca",
|
||||
"sha256:8e0f8568c118d3077b46be7d654cc8167fa916092e28320cde048e54bfc9f1e6"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2018.7"
|
||||
},
|
||||
"raven": {
|
||||
"hashes": [
|
||||
"sha256:02cabffb173b99d860a95d4908e8b1864aad1b8452146e13fd7e212aa576a884",
|
||||
"sha256:56dc9062dd42bca97350e5048ff417c914376366caa3b1b5f788b27ddc0a34b7"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==6.1.0"
|
||||
},
|
||||
"redis": {
|
||||
"hashes": [
|
||||
"sha256:5dfbae6acfc54edf0a7a415b99e0b21c0a3c27a7f787b292eea727b1facc5533",
|
||||
"sha256:97156b37d7cda4e7d8658be1148c983984e1a975090ba458cc7e244025191dbd"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.10.5"
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c",
|
||||
"sha256:a84b8c9ab6239b578f22d1c21d51b696dcfe004032bb80ea832398d6909d7279"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.20.0"
|
||||
},
|
||||
"requests-oauthlib": {
|
||||
"hashes": [
|
||||
"sha256:50a8ae2ce8273e384895972b56193c7409601a66d4975774c60c2aed869639ca",
|
||||
"sha256:883ac416757eada6d3d07054ec7092ac21c7f35cb1d2cf82faf205637081f468"
|
||||
],
|
||||
"version": "==0.8.0"
|
||||
},
|
||||
"sampledata": {
|
||||
"hashes": [
|
||||
"sha256:b06916ef010d3c1a9db8aa314a144f24ad421f28597ff8c568603c451391a2cf"
|
||||
],
|
||||
"version": "==0.3.7"
|
||||
},
|
||||
"serpy": {
|
||||
"hashes": [
|
||||
"sha256:b1481f8cb93d767b23903d1df6cc0a7120cb0694095b6695eb78d9d453b23c65",
|
||||
"sha256:b774bfdf0c3b245660639e9fc5f311a8bbceb2725aaba72fce1fec00b453286e"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.1.1"
|
||||
},
|
||||
"six": {
|
||||
"hashes": [
|
||||
"sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
|
||||
"sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
|
||||
],
|
||||
"version": "==1.11.0"
|
||||
},
|
||||
"tinycss": {
|
||||
"hashes": [
|
||||
"sha256:12306fb50e5e9e7eaeef84b802ed877488ba80e35c672867f548c0924a76716e"
|
||||
],
|
||||
"version": "==0.4"
|
||||
},
|
||||
"unidecode": {
|
||||
"hashes": [
|
||||
"sha256:ed4418b4b1b190487753f1cca6299e8076079258647284414e6d607d1f8a00e0",
|
||||
"sha256:eedac7bfd886f43484787206f6a141b232e2b2a58652c54d06499b187fd84660"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.4.20"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39",
|
||||
"sha256:de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
|
||||
],
|
||||
"version": "==1.24.1"
|
||||
},
|
||||
"vine": {
|
||||
"hashes": [
|
||||
"sha256:52116d59bc45392af9fdd3b75ed98ae48a93e822cee21e5fda249105c59a7a72",
|
||||
"sha256:6849544be74ec3638e84d90bc1cf2e1e9224cc10d96cd4383ec3f69e9bce077b"
|
||||
],
|
||||
"version": "==1.1.4"
|
||||
},
|
||||
"webcolors": {
|
||||
"hashes": [
|
||||
"sha256:e47e68644d41c0b1f1e4d939cfe4039bdf1ab31234df63c7a4f59d4766487206"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.7"
|
||||
},
|
||||
"webencodings": {
|
||||
"hashes": [
|
||||
"sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78",
|
||||
"sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"
|
||||
],
|
||||
"version": "==0.5.1"
|
||||
}
|
||||
},
|
||||
"develop": {
|
||||
"atomicwrites": {
|
||||
"hashes": [
|
||||
"sha256:0312ad34fcad8fac3704d441f7b317e50af620823353ec657a53e981f92920c0",
|
||||
"sha256:ec9ae8adaae229e4f8446952d204a3e4b5fdd2d099f9be3aaf556120135fb3ee"
|
||||
],
|
||||
"version": "==1.2.1"
|
||||
},
|
||||
"attrs": {
|
||||
"hashes": [
|
||||
"sha256:10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69",
|
||||
"sha256:ca4be454458f9dec299268d472aaa5a11f67a4ff70093396e1ceae9c76cf4bbb"
|
||||
],
|
||||
"version": "==18.2.0"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7",
|
||||
"sha256:993f830721089fef441cdfeb4b2c8c9df86f0c63239f06bd025a76a7daddb033"
|
||||
],
|
||||
"version": "==2018.11.29"
|
||||
},
|
||||
"chardet": {
|
||||
"hashes": [
|
||||
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
|
||||
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
|
||||
],
|
||||
"version": "==3.0.4"
|
||||
},
|
||||
"coverage": {
|
||||
"hashes": [
|
||||
"sha256:09e47c529ff77bf042ecfe858fb55c3e3eb97aac2c87f0349ab5a7efd6b3939f",
|
||||
"sha256:0a1f9b0eb3aa15c990c328535655847b3420231af299386cfe5efc98f9c250fe",
|
||||
"sha256:0cc941b37b8c2ececfed341444a456912e740ecf515d560de58b9a76562d966d",
|
||||
"sha256:10e8af18d1315de936d67775d3a814cc81d0747a1a0312d84e27ae5610e313b0",
|
||||
"sha256:1b4276550b86caa60606bd3572b52769860a81a70754a54acc8ba789ce74d607",
|
||||
"sha256:1e8a2627c48266c7b813975335cfdea58c706fe36f607c97d9392e61502dc79d",
|
||||
"sha256:2b224052bfd801beb7478b03e8a66f3f25ea56ea488922e98903914ac9ac930b",
|
||||
"sha256:447c450a093766744ab53bf1e7063ec82866f27bcb4f4c907da25ad293bba7e3",
|
||||
"sha256:46101fc20c6f6568561cdd15a54018bb42980954b79aa46da8ae6f008066a30e",
|
||||
"sha256:4710dc676bb4b779c4361b54eb308bc84d64a2fa3d78e5f7228921eccce5d815",
|
||||
"sha256:510986f9a280cd05189b42eee2b69fecdf5bf9651d4cd315ea21d24a964a3c36",
|
||||
"sha256:5535dda5739257effef56e49a1c51c71f1d37a6e5607bb25a5eee507c59580d1",
|
||||
"sha256:5a7524042014642b39b1fcae85fb37556c200e64ec90824ae9ecf7b667ccfc14",
|
||||
"sha256:5f55028169ef85e1fa8e4b8b1b91c0b3b0fa3297c4fb22990d46ff01d22c2d6c",
|
||||
"sha256:6694d5573e7790a0e8d3d177d7a416ca5f5c150742ee703f3c18df76260de794",
|
||||
"sha256:6831e1ac20ac52634da606b658b0b2712d26984999c9d93f0c6e59fe62ca741b",
|
||||
"sha256:77f0d9fa5e10d03aa4528436e33423bfa3718b86c646615f04616294c935f840",
|
||||
"sha256:828ad813c7cdc2e71dcf141912c685bfe4b548c0e6d9540db6418b807c345ddd",
|
||||
"sha256:85a06c61598b14b015d4df233d249cd5abfa61084ef5b9f64a48e997fd829a82",
|
||||
"sha256:8cb4febad0f0b26c6f62e1628f2053954ad2c555d67660f28dfb1b0496711952",
|
||||
"sha256:a5c58664b23b248b16b96253880b2868fb34358911400a7ba39d7f6399935389",
|
||||
"sha256:aaa0f296e503cda4bc07566f592cd7a28779d433f3a23c48082af425d6d5a78f",
|
||||
"sha256:ab235d9fe64833f12d1334d29b558aacedfbca2356dfb9691f2d0d38a8a7bfb4",
|
||||
"sha256:b3b0c8f660fae65eac74fbf003f3103769b90012ae7a460863010539bb7a80da",
|
||||
"sha256:bab8e6d510d2ea0f1d14f12642e3f35cefa47a9b2e4c7cea1852b52bc9c49647",
|
||||
"sha256:c45297bbdbc8bb79b02cf41417d63352b70bcb76f1bbb1ee7d47b3e89e42f95d",
|
||||
"sha256:d19bca47c8a01b92640c614a9147b081a1974f69168ecd494687c827109e8f42",
|
||||
"sha256:d64b4340a0c488a9e79b66ec9f9d77d02b99b772c8b8afd46c1294c1d39ca478",
|
||||
"sha256:da969da069a82bbb5300b59161d8d7c8d423bc4ccd3b410a9b4d8932aeefc14b",
|
||||
"sha256:ed02c7539705696ecb7dc9d476d861f3904a8d2b7e894bd418994920935d36bb",
|
||||
"sha256:ee5b8abc35b549012e03a7b1e86c09491457dba6c94112a2482b18589cc2bdb9"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.5.2"
|
||||
},
|
||||
"coveralls": {
|
||||
"hashes": [
|
||||
"sha256:ab638e88d38916a6cedbf80a9cd8992d5fa55c77ab755e262e00b36792b7cd6d",
|
||||
"sha256:b2388747e2529fa4c669fb1e3e2756e4e07b6ee56c7d9fce05f35ccccc913aa0"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.5.1"
|
||||
},
|
||||
"docopt": {
|
||||
"hashes": [
|
||||
"sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
|
||||
],
|
||||
"version": "==0.6.2"
|
||||
},
|
||||
"factory-boy": {
|
||||
"hashes": [
|
||||
"sha256:6f25cc4761ac109efd503f096e2ad99421b1159f01a29dbb917359dcd68e08ca",
|
||||
"sha256:d552cb872b310ae78bd7429bf318e42e1e903b1a109e899a523293dfa762ea4f"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.11.1"
|
||||
},
|
||||
"faker": {
|
||||
"hashes": [
|
||||
"sha256:c61a41d0dab8865b850bd00454fb11e90f3fd2a092d8bc90120d1e1c01cff906",
|
||||
"sha256:f909ff9133ce0625ca388b6838190630ad7a593f87eaf058d872338a76241d5d"
|
||||
],
|
||||
"version": "==1.0.0"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
|
||||
"sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
|
||||
],
|
||||
"version": "==2.7"
|
||||
},
|
||||
"more-itertools": {
|
||||
"hashes": [
|
||||
"sha256:c187a73da93e7a8acc0001572aebc7e3c69daf7bf6881a2cea10650bd4420092",
|
||||
"sha256:c476b5d3a34e12d40130bc2f935028b5f636df8f372dc2c1c01dc19681b2039e",
|
||||
"sha256:fcbfeaea0be121980e15bc97b3817b5202ca73d0eae185b4550cbfce2a3ebb3d"
|
||||
],
|
||||
"version": "==4.3.0"
|
||||
},
|
||||
"pluggy": {
|
||||
"hashes": [
|
||||
"sha256:447ba94990e8014ee25ec853339faf7b0fc8050cdc3289d4d71f7f410fb90095",
|
||||
"sha256:bde19360a8ec4dfd8a20dcb811780a30998101f078fc7ded6162f0076f50508f"
|
||||
],
|
||||
"version": "==0.8.0"
|
||||
},
|
||||
"py": {
|
||||
"hashes": [
|
||||
"sha256:bf92637198836372b520efcba9e020c330123be8ce527e535d185ed4b6f45694",
|
||||
"sha256:e76826342cefe3c3d5f7e8ee4316b80d1dd8a300781612ddbc765c17ba25a6c6"
|
||||
],
|
||||
"version": "==1.7.0"
|
||||
},
|
||||
"pytest": {
|
||||
"hashes": [
|
||||
"sha256:3f193df1cfe1d1609d4c583838bea3d532b18d6160fd3f55c9447fdca30848ec",
|
||||
"sha256:e246cf173c01169b9617fc07264b7b1316e78d7a650055235d6d897bc80d9660"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.10.1"
|
||||
},
|
||||
"pytest-django": {
|
||||
"hashes": [
|
||||
"sha256:49e9ffc856bc6a1bec1c26c5c7b7213dff7cc8bc6b64d624c4d143d04aff0bcf",
|
||||
"sha256:b379282feaf89069cb790775ab6bbbd2bd2038a68c7ef9b84a41898e0b551081"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.4.3"
|
||||
},
|
||||
"python-dateutil": {
|
||||
"hashes": [
|
||||
"sha256:063df5763652e21de43de7d9e00ccf239f953a832941e37be541614732cdfc93",
|
||||
"sha256:88f9287c0174266bb0d8cedd395cfba9c58e87e5ad86b2ce58859bc11be3cf02"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.7.5"
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:99dcfdaaeb17caf6e526f32b6a7b780461512ab3f1d992187801694cba42770c",
|
||||
"sha256:a84b8c9ab6239b578f22d1c21d51b696dcfe004032bb80ea832398d6909d7279"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.20.0"
|
||||
},
|
||||
"six": {
|
||||
"hashes": [
|
||||
"sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
|
||||
"sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
|
||||
],
|
||||
"version": "==1.11.0"
|
||||
},
|
||||
"text-unidecode": {
|
||||
"hashes": [
|
||||
"sha256:5a1375bb2ba7968740508ae38d92e1f889a0832913cb1c447d5e2046061a396d",
|
||||
"sha256:801e38bd550b943563660a91de8d4b6fa5df60a542be9093f7abf819f86050cc"
|
||||
],
|
||||
"version": "==1.2"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39",
|
||||
"sha256:de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
|
||||
],
|
||||
"version": "==1.24.1"
|
||||
}
|
||||
}
|
||||
}
|
24
README.md
24
README.md
|
@ -1,10 +1,9 @@
|
|||
# Taiga Backend #
|
||||
|
||||

|
||||
[](https://taiga.io "Managed with Taiga.io")
|
||||
[](https://travis-ci.org/taigaio/taiga-back "Build Status")
|
||||
[](https://coveralls.io/r/taigaio/taiga-back?branch=master "Coverage Status")
|
||||
[](https://www.versioneye.com/user/projects/561bd091a193340f32001464)
|
||||
[](https://github.com/kaleidos "Kaleidos Project")
|
||||
[](https://tree.taiga.io/project/taiga/ "Managed with Taiga.io")
|
||||
[](https://travis-ci.org/taigaio/taiga-back "Build Status")
|
||||
[](https://coveralls.io/r/taigaio/taiga-back?branch=master "Coverage Status")
|
||||
|
||||
|
||||
## Contribute to Taiga ##
|
||||
|
@ -32,7 +31,7 @@ Help us keep the Taiga Community open and inclusive. Please read and follow our
|
|||
|
||||
Every code patch accepted in taiga codebase is licensed under [AGPL v3.0](http://www.gnu.org/licenses/agpl-3.0.html). You must be careful to not include any code that can not be licensed under this license.
|
||||
|
||||
Please read carefully [our license](https://github.com/taigaio/taiga-back/blob/master/LICENSE) and ask us if you have any questions.
|
||||
Please read carefully [our license](https://github.com/taigaio/taiga-back/blob/master/LICENSE) and ask us if you have any questions as well as the [Contribution policy](https://github.com/taigaio/taiga-back/blob/master/CONTRIBUTING.md).
|
||||
|
||||
|
||||
#### Bug reports, enhancements and support ####
|
||||
|
@ -64,23 +63,23 @@ Currently, we have authored three main documentation hubs:
|
|||
|
||||
#### Translation ####
|
||||
|
||||
We are ready now to accept your help translating Taiga. It's easy (and fun!) just access our team of translators with the link below, set up an account in Transifex and start contributing. Join us to make sure your language is covered! **[Help Taiga to translate content](https://www.transifex.com/signup/ "Help Taiga to trasnlatecontent")**
|
||||
We are ready now to accept your help translating Taiga. It's easy (and fun!) just access our team of translators with the link below, set up an account in Transifex and start contributing. Join us to make sure your language is covered! **[Help Taiga to translate content](https://www.transifex.com/taiga-agile-llc/taiga-back/ "Help Taiga to trasnlatecontent")**
|
||||
|
||||
|
||||
#### Code patches ####
|
||||
|
||||
Taiga will always be glad to receive code patches to update, fix or improve its code.
|
||||
Taiga will always be glad to receive code patches to update, fix or improve its code.
|
||||
|
||||
If you know how to improve our code base or you found a bug, a security vulnerability or a performance issue and you think you can solve it, we will be very happy to accept your pull-request. If your code requires considerable changes, we recommend you first talk to us directly. We will find the best way to help.
|
||||
|
||||
|
||||
#### UI enhancements ####
|
||||
|
||||
Taiga is made for developers and designers. We care enormously about UI because usability and design are both critical aspects of the Taiga experience.
|
||||
Taiga is made for developers and designers. We care enormously about UI because usability and design are both critical aspects of the Taiga experience.
|
||||
|
||||
There are two possible ways to contribute to our UI:
|
||||
- **Bugs**: If you find a bug regarding front-end, please report it as previously indicated in the Bug reports section or send a pull-request as indicated in the Code Patches section.
|
||||
- **Enhancements**: If its a design or UX bug or enhancement we will love to receive your feedback. Please send us your enhancement, with the reason and, if possible, an example. Our design and UX team will review your enhancement and fix it as soon as possible. We recommend you to use our [mailing list](http://groups.google.co.uk/d/forum/taigaio){target="_blank"} so we can have a lot of different opinions and debate.
|
||||
- **Enhancements**: If its a design or UX bug or enhancement we will love to receive your feedback. Please send us your enhancement, with the reason and, if possible, an example. Our design and UX team will review your enhancement and fix it as soon as possible. We recommend you to use our [mailing list](http://groups.google.co.uk/d/forum/taigaio) so we can have a lot of different opinions and debate.
|
||||
- **Language Localization**: We are eager to offer localized versions of Taiga. Some members of the community have already volunteered to work to provide a variety of languages. We are working to implement some changes to allow for this and expect to accept these requests in the near future.
|
||||
|
||||
|
||||
|
@ -94,13 +93,12 @@ pip install -r requirements.txt
|
|||
python manage.py migrate --noinput
|
||||
python manage.py loaddata initial_user
|
||||
python manage.py loaddata initial_project_templates
|
||||
python manage.py loaddata initial_role
|
||||
python manage.py sample_data
|
||||
```
|
||||
|
||||
**IMPORTANT: Taiga only runs with python 3.4+**
|
||||
**IMPORTANT: Taiga only runs with python 3.5+**
|
||||
|
||||
Initial auth data: admin/123123
|
||||
|
||||
If you want a complete environment for production usage, you can try the taiga bootstrapping
|
||||
scripts https://github.com/taigaio/taiga-scripts (warning: alpha state). All the information about the different installation methods (production, development, vagrant, docker...) can be found here http://taigaio.github.io/taiga-doc/dist/#_installation_guide.
|
||||
scripts https://github.com/taigaio/taiga-scripts (warning: alpha state). All the information about the different installation methods (production, development, vagrant, docker...) can be found here http://taigaio.github.io/taiga-doc/dist/#_installation_guide.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
[pytest]
|
||||
DJANGO_SETTINGS_MODULE = settings.testing
|
||||
python_paths = .
|
||||
filterwarnings =
|
||||
once
|
||||
ignore::django.utils.deprecation.RemovedInDjango20Warning
|
||||
ignore::DeprecationWarning:taiga.base.api.serializers
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
-r requirements.txt
|
||||
|
||||
factory_boy==2.6.1
|
||||
py==1.4.31
|
||||
pytest==2.8.7
|
||||
pytest-django==2.9.1
|
||||
pytest-pythonpath==0.7
|
||||
|
||||
coverage==4.0.3
|
||||
coveralls==1.1
|
||||
django-slowdown==0.0.1
|
||||
|
||||
transifex-client==0.11.1.beta
|
|
@ -1,37 +1,63 @@
|
|||
Django==1.9.2
|
||||
#djangorestframework==2.3.13 # It's not necessary since Taiga 1.7
|
||||
django-picklefield==0.3.2
|
||||
django-sampledatahelper==0.4.0
|
||||
gunicorn==19.4.5
|
||||
psycopg2==2.6.1
|
||||
Pillow==3.1.1
|
||||
pytz==2015.7
|
||||
six==1.10.0
|
||||
amqp==1.4.9
|
||||
djmail==0.12.0.post1
|
||||
django-pgjson==0.3.1
|
||||
djorm-pgarray==1.2 # Use until Taiga 2.1. Keep compatibility with old migrations
|
||||
django-jinja==2.1.2
|
||||
jinja2==2.8
|
||||
pygments==2.0.2
|
||||
django-sites==0.9
|
||||
Markdown==2.6.5
|
||||
fn==0.4.3
|
||||
-i https://pypi.org/simple
|
||||
amqp==2.3.2
|
||||
asana==0.6.7
|
||||
asn1crypto==0.24.0
|
||||
billiard==3.5.0.5
|
||||
bleach==2.1.4
|
||||
cairocffi==0.9.0
|
||||
cairosvg==2.0.3
|
||||
celery==4.0.2
|
||||
certifi==2018.11.29
|
||||
cffi==1.11.5
|
||||
chardet==3.0.4
|
||||
contextlib2==0.5.5
|
||||
cryptography==2.3.1
|
||||
cssselect==1.0.3
|
||||
cssutils==1.0.2
|
||||
diff-match-patch==20121119
|
||||
requests==2.9.1
|
||||
django-ipware==1.1.6
|
||||
django-jinja==2.3.1
|
||||
django-pglocks==1.0.2
|
||||
django-picklefield==0.3.2
|
||||
django-sampledatahelper==0.4.1
|
||||
django-sites==0.9
|
||||
django-sr==0.0.4
|
||||
easy-thumbnails==2.3
|
||||
celery==3.1.20
|
||||
django==1.11.16
|
||||
djmail==1.0.1
|
||||
docopt==0.6.2
|
||||
easy-thumbnails==2.4.1
|
||||
fn==0.4.3
|
||||
gunicorn==19.7.1
|
||||
html5lib==1.0.1
|
||||
idna==2.7
|
||||
jinja2==2.10
|
||||
kombu==4.0.2
|
||||
lxml==4.2.5
|
||||
markdown==3.0.1
|
||||
markupsafe==1.1.0
|
||||
netaddr==0.7.19
|
||||
oauthlib==2.1.0
|
||||
olefile==0.46
|
||||
pillow==4.1.1
|
||||
premailer==3.0.1
|
||||
psd-tools==1.4
|
||||
psycopg2-binary==2.7.5
|
||||
pycparser==2.19
|
||||
pygments==2.2.0
|
||||
pyjwt==1.7.0
|
||||
python-dateutil==2.7.5
|
||||
python-magic==0.4.13
|
||||
pytz==2018.7
|
||||
raven==6.1.0
|
||||
redis==2.10.5
|
||||
Unidecode==0.04.19
|
||||
raven==5.10.2
|
||||
bleach==1.4.3
|
||||
django-ipware==1.1.3
|
||||
premailer==2.9.7
|
||||
cssutils==1.0.1 # Compatible with python 3.5
|
||||
lxml==3.5.0
|
||||
git+https://github.com/Xof/django-pglocks.git@dbb8d7375066859f897604132bd437832d2014ea
|
||||
pyjwkest==1.1.5
|
||||
python-dateutil==2.4.2
|
||||
netaddr==0.7.18
|
||||
requests-oauthlib==0.8.0
|
||||
requests==2.20.0
|
||||
sampledata==0.3.7
|
||||
serpy==0.1.1
|
||||
six==1.11.0
|
||||
tinycss==0.4
|
||||
unidecode==0.4.20
|
||||
urllib3==1.24.1
|
||||
vine==1.1.4
|
||||
webcolors==1.7
|
||||
webencodings==0.5.1
|
||||
|
|
|
@ -242,11 +242,7 @@ You need transifex-client, install it.
|
|||
|
||||
1. Install transifex-client, use
|
||||
|
||||
$ pip install --upgrade -r requirements-devel.txt
|
||||
|
||||
or
|
||||
|
||||
$ pip install --upgrade transifex-client==0.11.1.beta
|
||||
$ pip install --upgrade transifex-client
|
||||
|
||||
2. Create ~/.transifexrc file:
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -16,19 +16,22 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from kombu import Exchange, Queue
|
||||
from kombu import Queue
|
||||
|
||||
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
|
||||
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
||||
broker_url = 'amqp://guest:guest@localhost:5672//'
|
||||
result_backend = 'redis://localhost:6379/0'
|
||||
|
||||
CELERY_TIMEZONE = 'Europe/Madrid'
|
||||
CELERY_ENABLE_UTC = True
|
||||
accept_content = ['pickle',] # Values are 'pickle', 'json', 'msgpack' and 'yaml'
|
||||
task_serializer = "pickle"
|
||||
result_serializer = "pickle"
|
||||
|
||||
CELERY_DEFAULT_QUEUE = 'tasks'
|
||||
CELERY_QUEUES = (
|
||||
timezone = 'Europe/Madrid'
|
||||
|
||||
task_default_queue = 'tasks'
|
||||
task_queues = (
|
||||
Queue('tasks', routing_key='task.#'),
|
||||
Queue('transient', routing_key='transient.#', delivery_mode=1)
|
||||
)
|
||||
CELERY_DEFAULT_EXCHANGE = 'tasks'
|
||||
CELERY_DEFAULT_EXCHANGE_TYPE = 'topic'
|
||||
CELERY_DEFAULT_ROUTING_KEY = 'task.default'
|
||||
task_default_exchange = 'tasks'
|
||||
task_default_exchange_type = 'topic'
|
||||
task_default_routing_key = 'task.default'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -95,7 +95,7 @@ LANGUAGES = [
|
|||
#("es-ve", "Español (Venezuela)"), # Venezuelan Spanish
|
||||
#("et", "Eesti"), # Estonian
|
||||
#("eu", "Euskara"), # Basque
|
||||
#("fa", "فارسی"), # Persian
|
||||
("fa", "فارسی"), # Persian
|
||||
("fi", "Suomi"), # Finnish
|
||||
("fr", "Français"), # French
|
||||
#("fy", "Frysk"), # Frisian
|
||||
|
@ -110,12 +110,12 @@ LANGUAGES = [
|
|||
#("io", "IDO"), # Ido
|
||||
#("is", "Íslenska"), # Icelandic
|
||||
("it", "Italiano"), # Italian
|
||||
#("ja", "日本語"), # Japanese
|
||||
("ja", "日本語"), # Japanese
|
||||
#("ka", "ქართული"), # Georgian
|
||||
#("kk", "Қазақша"), # Kazakh
|
||||
#("km", "ភាសាខ្មែរ"), # Khmer
|
||||
#("kn", "ಕನ್ನಡ"), # Kannada
|
||||
#("ko", "한국어"), # Korean
|
||||
("ko", "한국어"), # Korean
|
||||
#("lb", "Lëtzebuergesch"), # Luxembourgish
|
||||
#("lt", "Lietuvių"), # Lithuanian
|
||||
#("lv", "Latviešu"), # Latvian
|
||||
|
@ -148,10 +148,10 @@ LANGUAGES = [
|
|||
("tr", "Türkçe"), # Turkish
|
||||
#("tt", "татар теле"), # Tatar
|
||||
#("udm", "удмурт кыл"), # Udmurt
|
||||
#("uk", "Українська"), # Ukrainian
|
||||
("uk", "Українська"), # Ukrainian
|
||||
#("ur", "اردو"), # Urdu
|
||||
#("vi", "Tiếng Việt"), # Vietnamese
|
||||
#("zh-hans", "中文(简体)"), # Simplified Chinese
|
||||
("zh-hans", "中文(简体)"), # Simplified Chinese
|
||||
("zh-hant", "中文(香港)"), # Traditional Chinese
|
||||
]
|
||||
|
||||
|
@ -211,9 +211,11 @@ STATICFILES_DIRS = (
|
|||
# Don't forget to use absolute paths, not relative paths.
|
||||
)
|
||||
|
||||
# Defautl storage
|
||||
# Default storage
|
||||
DEFAULT_FILE_STORAGE = "taiga.base.storage.FileSystemStorage"
|
||||
|
||||
FILE_UPLOAD_PERMISSIONS = 0o644
|
||||
|
||||
SECRET_KEY = "aw3+t2r(8(0kkrhg8)gx6i96v5^kv%6cfep9wxfom0%7dy0m9e"
|
||||
|
||||
TEMPLATES = [
|
||||
|
@ -282,6 +284,7 @@ INSTALLED_APPS = [
|
|||
"django.contrib.admin",
|
||||
"django.contrib.staticfiles",
|
||||
"django.contrib.sitemaps",
|
||||
"django.contrib.postgres",
|
||||
|
||||
"taiga.base",
|
||||
"taiga.base.api",
|
||||
|
@ -305,6 +308,8 @@ INSTALLED_APPS = [
|
|||
"taiga.projects.tasks",
|
||||
"taiga.projects.issues",
|
||||
"taiga.projects.wiki",
|
||||
"taiga.projects.contact",
|
||||
"taiga.projects.settings",
|
||||
"taiga.searches",
|
||||
"taiga.timeline",
|
||||
"taiga.mdrender",
|
||||
|
@ -316,6 +321,7 @@ INSTALLED_APPS = [
|
|||
"taiga.hooks.bitbucket",
|
||||
"taiga.hooks.gogs",
|
||||
"taiga.webhooks",
|
||||
"taiga.importers",
|
||||
|
||||
"djmail",
|
||||
"django_jinja",
|
||||
|
@ -345,6 +351,10 @@ LOGGING = {
|
|||
"null": {
|
||||
"format": "%(message)s",
|
||||
},
|
||||
"django.server": {
|
||||
"()": "django.utils.log.ServerFormatter",
|
||||
"format": "[%(server_time)s] %(message)s",
|
||||
},
|
||||
},
|
||||
"handlers": {
|
||||
"null": {
|
||||
|
@ -360,7 +370,12 @@ LOGGING = {
|
|||
"level": "ERROR",
|
||||
"filters": ["require_debug_false"],
|
||||
"class": "django.utils.log.AdminEmailHandler",
|
||||
}
|
||||
},
|
||||
"django.server": {
|
||||
"level": "INFO",
|
||||
"class": "logging.StreamHandler",
|
||||
"formatter": "django.server",
|
||||
},
|
||||
},
|
||||
"loggers": {
|
||||
"django": {
|
||||
|
@ -382,6 +397,11 @@ LOGGING = {
|
|||
"handlers": ["console"],
|
||||
"level": "DEBUG",
|
||||
"propagate": False,
|
||||
},
|
||||
"django.server": {
|
||||
"handlers": ["django.server"],
|
||||
"level": "INFO",
|
||||
"propagate": False,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -416,15 +436,22 @@ REST_FRAMEWORK = {
|
|||
"taiga.external_apps.auth_backends.Token",
|
||||
),
|
||||
"DEFAULT_THROTTLE_CLASSES": (
|
||||
"taiga.base.throttling.AnonRateThrottle",
|
||||
"taiga.base.throttling.UserRateThrottle"
|
||||
"taiga.base.throttling.CommonThrottle",
|
||||
),
|
||||
"DEFAULT_THROTTLE_RATES": {
|
||||
"anon": None,
|
||||
"user": None,
|
||||
"anon-write": None,
|
||||
"user-write": None,
|
||||
"anon-read": None,
|
||||
"user-read": None,
|
||||
"import-mode": None,
|
||||
"import-dump-mode": "1/minute",
|
||||
"create-memberships": None,
|
||||
"login-fail": None,
|
||||
"register-success": None,
|
||||
"user-detail": None,
|
||||
"user-update": None,
|
||||
},
|
||||
"DEFAULT_THROTTLE_WHITELIST": [],
|
||||
"FILTER_BACKEND": "taiga.base.filters.FilterBackend",
|
||||
"EXCEPTION_HANDLER": "taiga.base.exceptions.exception_handler",
|
||||
"PAGINATE_BY": 30,
|
||||
|
@ -454,8 +481,6 @@ SOUTH_MIGRATION_MODULES = {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
THN_AVATAR_SIZE = 80 # 80x80 pixels
|
||||
THN_AVATAR_BIG_SIZE = 300 # 300x300 pixels
|
||||
THN_LOGO_SMALL_SIZE = 80 # 80x80 pixels
|
||||
|
@ -463,6 +488,7 @@ THN_LOGO_BIG_SIZE = 300 # 300x300 pixels
|
|||
THN_TIMELINE_IMAGE_SIZE = 640 # 640x??? pixels
|
||||
THN_CARD_IMAGE_WIDTH = 300 # 300 pixels
|
||||
THN_CARD_IMAGE_HEIGHT = 200 # 200 pixels
|
||||
THN_PREVIEW_IMAGE_WIDTH = 800 # 800 pixels
|
||||
|
||||
THN_AVATAR_SMALL = "avatar"
|
||||
THN_AVATAR_BIG = "big-avatar"
|
||||
|
@ -470,6 +496,7 @@ THN_LOGO_SMALL = "logo-small"
|
|||
THN_LOGO_BIG = "logo-big"
|
||||
THN_ATTACHMENT_TIMELINE = "timeline-image"
|
||||
THN_ATTACHMENT_CARD = "card-image"
|
||||
THN_ATTACHMENT_PREVIEW = "preview-image"
|
||||
|
||||
THUMBNAIL_ALIASES = {
|
||||
"": {
|
||||
|
@ -479,6 +506,7 @@ THUMBNAIL_ALIASES = {
|
|||
THN_LOGO_BIG: {"size": (THN_LOGO_BIG_SIZE, THN_LOGO_BIG_SIZE), "crop": True},
|
||||
THN_ATTACHMENT_TIMELINE: {"size": (THN_TIMELINE_IMAGE_SIZE, 0), "crop": True},
|
||||
THN_ATTACHMENT_CARD: {"size": (THN_CARD_IMAGE_WIDTH, THN_CARD_IMAGE_HEIGHT), "crop": True},
|
||||
THN_ATTACHMENT_PREVIEW: {"size": (THN_PREVIEW_IMAGE_WIDTH, 0), "crop": False},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -520,6 +548,7 @@ EXPORTS_TTL = 60 * 60 * 24 # 24 hours
|
|||
|
||||
CELERY_ENABLED = False
|
||||
WEBHOOKS_ENABLED = False
|
||||
WEBHOOKS_BLOCK_PRIVATE_ADDRESS = False
|
||||
|
||||
|
||||
# If is True /front/sitemap.xml show a valid sitemap of taiga-front client
|
||||
|
@ -533,8 +562,34 @@ MAX_PUBLIC_PROJECTS_PER_USER = None # None == no limit
|
|||
MAX_MEMBERSHIPS_PRIVATE_PROJECTS = None # None == no limit
|
||||
MAX_MEMBERSHIPS_PUBLIC_PROJECTS = None # None == no limit
|
||||
|
||||
MAX_PENDING_MEMBERSHIPS = 30 # Max number of unconfirmed memberships in a project
|
||||
|
||||
from .sr import *
|
||||
|
||||
IMPORTERS = {
|
||||
"github": {
|
||||
"active": False,
|
||||
"client_id": "",
|
||||
"client_secret": "",
|
||||
},
|
||||
"trello": {
|
||||
"active": False,
|
||||
"api_key": "",
|
||||
"secret_key": "",
|
||||
},
|
||||
"jira": {
|
||||
"active": False,
|
||||
"consumer_key": "",
|
||||
"cert": "",
|
||||
"pub_cert": "",
|
||||
},
|
||||
"asana": {
|
||||
"active": False,
|
||||
"callback_url": "",
|
||||
"app_id": "",
|
||||
"app_secret": "",
|
||||
}
|
||||
}
|
||||
|
||||
# NOTE: DON'T INSERT MORE SETTINGS AFTER THIS LINE
|
||||
TEST_RUNNER="django.test.runner.DiscoverRunner"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -63,12 +63,24 @@ DATABASES = {
|
|||
#########################################
|
||||
|
||||
#REST_FRAMEWORK["DEFAULT_THROTTLE_RATES"] = {
|
||||
# "anon": "20/min",
|
||||
# "user": "200/min",
|
||||
# "import-mode": "20/sec",
|
||||
# "import-dump-mode": "1/minute"
|
||||
# "anon-write": "20/min",
|
||||
# "user-write": None,
|
||||
# "anon-read": None,
|
||||
# "user-read": None,
|
||||
# "import-mode": None,
|
||||
# "import-dump-mode": "1/minute",
|
||||
# "create-memberships": None,
|
||||
# "login-fail": None,
|
||||
# "register-success": None,
|
||||
# "user-detail": None,
|
||||
# "user-update": None,
|
||||
#}
|
||||
|
||||
# This list should containt:
|
||||
# - Tiga users IDs
|
||||
# - Valid clients IP addresses (X-Forwarded-For header)
|
||||
#REST_FRAMEWORK["DEFAULT_THROTTLE_WHITELIST"] = []
|
||||
|
||||
|
||||
#########################################
|
||||
## MAIL SYSTEM SETTINGS
|
||||
|
@ -80,6 +92,7 @@ DATABASES = {
|
|||
# EMAIL SETTINGS EXAMPLE
|
||||
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
#EMAIL_USE_TLS = False
|
||||
#EMAIL_USE_SSL = False # You cannot use both (TLS and SSL) at the same time!
|
||||
#EMAIL_HOST = 'localhost'
|
||||
#EMAIL_PORT = 25
|
||||
#EMAIL_HOST_USER = 'user'
|
||||
|
@ -146,10 +159,47 @@ DATABASES = {
|
|||
#########################################
|
||||
## CELERY
|
||||
#########################################
|
||||
# Set to True to enable celery and work in async mode or False
|
||||
# to disable it and work in sync mode. You can find the celery
|
||||
# settings in settings/celery.py and settings/celery-local.py
|
||||
#CELERY_ENABLED = True
|
||||
|
||||
#from .celery import *
|
||||
#CELERY_ENABLED = True
|
||||
#
|
||||
# To use celery in memory
|
||||
#CELERY_ENABLED = True
|
||||
#CELERY_ALWAYS_EAGER = True
|
||||
|
||||
#########################################
|
||||
## IMPORTERS
|
||||
#########################################
|
||||
|
||||
# Configuration for the GitHub importer
|
||||
# Remember to enable it in the front client too.
|
||||
#IMPORTERS["github"] = {
|
||||
# "active": True, # Enable or disable the importer
|
||||
# "client_id": "XXXXXX_get_a_valid_client_id_from_github_XXXXXX",
|
||||
# "client_secret": "XXXXXX_get_a_valid_client_secret_from_github_XXXXXX"
|
||||
#}
|
||||
|
||||
# Configuration for the Trello importer
|
||||
# Remember to enable it in the front client too.
|
||||
#IMPORTERS["trello"] = {
|
||||
# "active": True, # Enable or disable the importer
|
||||
# "api_key": "XXXXXX_get_a_valid_api_key_from_trello_XXXXXX",
|
||||
# "secret_key": "XXXXXX_get_a_valid_secret_key_from_trello_XXXXXX"
|
||||
#}
|
||||
|
||||
# Configuration for the Jira importer
|
||||
# Remember to enable it in the front client too.
|
||||
#IMPORTERS["jira"] = {
|
||||
# "active": True, # Enable or disable the importer
|
||||
# "consumer_key": "XXXXXX_get_a_valid_consumer_key_from_jira_XXXXXX",
|
||||
# "cert": "XXXXXX_get_a_valid_cert_from_jira_XXXXXX",
|
||||
# "pub_cert": "XXXXXX_get_a_valid_pub_cert_from_jira_XXXXXX"
|
||||
#}
|
||||
|
||||
# Configuration for the Asane importer
|
||||
# Remember to enable it in the front client too.
|
||||
#IMPORTERS["asana"] = {
|
||||
# "active": True, # Enable or disable the importer
|
||||
# "callback_url": "{}://{}/project/new/import/asana".format(SITES["front"]["scheme"],
|
||||
# SITES["front"]["domain"]),
|
||||
# "app_id": "XXXXXX_get_a_valid_app_id_from_asana_XXXXXX",
|
||||
# "app_secret": "XXXXXX_get_a_valid_app_secret_from_asana_XXXXXX"
|
||||
#}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -19,7 +19,6 @@
|
|||
from .development import *
|
||||
|
||||
CELERY_ENABLED = False
|
||||
CELERY_ALWAYS_EAGER = True
|
||||
|
||||
MEDIA_ROOT = "/tmp"
|
||||
|
||||
|
@ -29,8 +28,21 @@ INSTALLED_APPS = INSTALLED_APPS + [
|
|||
]
|
||||
|
||||
REST_FRAMEWORK["DEFAULT_THROTTLE_RATES"] = {
|
||||
"anon": None,
|
||||
"user": None,
|
||||
"anon-write": None,
|
||||
"anon-read": None,
|
||||
"user-write": None,
|
||||
"user-read": None,
|
||||
"import-mode": None,
|
||||
"import-dump-mode": None,
|
||||
"create-memberships": None,
|
||||
"login-fail": None,
|
||||
"register-success": None,
|
||||
"user-detail": None,
|
||||
"user-update": None,
|
||||
}
|
||||
|
||||
|
||||
IMPORTERS['github']['active'] = True
|
||||
IMPORTERS['jira']['active'] = True
|
||||
IMPORTERS['asana']['active'] = True
|
||||
IMPORTERS['trello']['active'] = True
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
ignore = E41,E266
|
||||
max-line-length = 120
|
||||
exclude =
|
||||
.cache,
|
||||
.git,
|
||||
.tox,
|
||||
.venv,
|
||||
*__pycache__*,
|
||||
*tests*,
|
||||
*scripts*,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -17,29 +17,26 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from functools import partial
|
||||
from enum import Enum
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.conf import settings
|
||||
|
||||
from taiga.base.api import validators
|
||||
from taiga.base.api import serializers
|
||||
from taiga.base.api import viewsets
|
||||
from taiga.base.decorators import list_route
|
||||
from taiga.base import exceptions as exc
|
||||
from taiga.base import response
|
||||
|
||||
from .validators import PublicRegisterValidator
|
||||
from .validators import PrivateRegisterForExistingUserValidator
|
||||
from .validators import PrivateRegisterForNewUserValidator
|
||||
from .validators import PrivateRegisterValidator
|
||||
|
||||
from .services import private_register_for_existing_user
|
||||
from .services import private_register_for_new_user
|
||||
from .services import public_register
|
||||
from .services import make_auth_response_data
|
||||
from .services import get_auth_plugins
|
||||
from .services import accept_invitation_by_existing_user
|
||||
|
||||
from .permissions import AuthPermission
|
||||
from .throttling import LoginFailRateThrottle, RegisterSuccessRateThrottle
|
||||
|
||||
|
||||
def _parse_data(data:dict, *, cls):
|
||||
|
@ -61,41 +58,13 @@ def _parse_data(data:dict, *, cls):
|
|||
# Parse public register data
|
||||
parse_public_register_data = partial(_parse_data, cls=PublicRegisterValidator)
|
||||
|
||||
# Parse private register data for existing user
|
||||
parse_private_register_for_existing_user_data = \
|
||||
partial(_parse_data, cls=PrivateRegisterForExistingUserValidator)
|
||||
|
||||
# Parse private register data for new user
|
||||
parse_private_register_for_new_user_data = \
|
||||
partial(_parse_data, cls=PrivateRegisterForNewUserValidator)
|
||||
|
||||
|
||||
class RegisterTypeEnum(Enum):
|
||||
new_user = 1
|
||||
existing_user = 2
|
||||
|
||||
|
||||
def parse_register_type(userdata:dict) -> str:
|
||||
"""
|
||||
Parses user data and detects that register type is.
|
||||
It returns RegisterTypeEnum value.
|
||||
"""
|
||||
# Create adhoc inner serializer for avoid parse
|
||||
# manually the user data.
|
||||
class _validator(validators.Validator):
|
||||
existing = serializers.BooleanField()
|
||||
|
||||
instance = _validator(data=userdata)
|
||||
if not instance.is_valid():
|
||||
raise exc.RequestValidationError(instance.errors)
|
||||
|
||||
if instance.data["existing"]:
|
||||
return RegisterTypeEnum.existing_user
|
||||
return RegisterTypeEnum.new_user
|
||||
parse_private_register_data = partial(_parse_data, cls=PrivateRegisterValidator)
|
||||
|
||||
|
||||
class AuthViewSet(viewsets.ViewSet):
|
||||
permission_classes = (AuthPermission,)
|
||||
throttle_classes = (LoginFailRateThrottle, RegisterSuccessRateThrottle)
|
||||
|
||||
def _public_register(self, request):
|
||||
if not settings.PUBLIC_REGISTER_ENABLED:
|
||||
|
@ -111,20 +80,18 @@ class AuthViewSet(viewsets.ViewSet):
|
|||
return response.Created(data)
|
||||
|
||||
def _private_register(self, request):
|
||||
register_type = parse_register_type(request.DATA)
|
||||
|
||||
if register_type is RegisterTypeEnum.existing_user:
|
||||
data = parse_private_register_for_existing_user_data(request.DATA)
|
||||
user = private_register_for_existing_user(**data)
|
||||
else:
|
||||
data = parse_private_register_for_new_user_data(request.DATA)
|
||||
user = private_register_for_new_user(**data)
|
||||
data = parse_private_register_data(request.DATA)
|
||||
user = private_register_for_new_user(**data)
|
||||
|
||||
data = make_auth_response_data(user)
|
||||
return response.Created(data)
|
||||
|
||||
@list_route(methods=["POST"])
|
||||
def register(self, request, **kwargs):
|
||||
accepted_terms = request.DATA.get("accepted_terms", None)
|
||||
if accepted_terms in (None, False):
|
||||
raise exc.BadRequest(_("You must accept our terms of service and privacy policy"))
|
||||
|
||||
self.check_permissions(request, 'register', None)
|
||||
|
||||
type = request.DATA.get("type", None)
|
||||
|
@ -140,9 +107,12 @@ class AuthViewSet(viewsets.ViewSet):
|
|||
auth_plugins = get_auth_plugins()
|
||||
|
||||
login_type = request.DATA.get("type", None)
|
||||
invitation_token = request.DATA.get("invitation_token", None)
|
||||
|
||||
if login_type in auth_plugins:
|
||||
data = auth_plugins[login_type]['login_func'](request)
|
||||
if invitation_token:
|
||||
accept_invitation_by_existing_user(invitation_token, data['id'])
|
||||
return response.Ok(data)
|
||||
|
||||
raise exc.BadRequest(_("invalid login type"))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -37,6 +37,8 @@ fraudulent modifications.
|
|||
import re
|
||||
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
from datetime import timedelta
|
||||
from taiga.base.api.authentication import BaseAuthentication
|
||||
|
||||
from .tokens import get_user_for_token
|
||||
|
@ -86,6 +88,10 @@ class Token(BaseAuthentication):
|
|||
user = get_user_for_token(token, "authentication",
|
||||
max_age=max_age_auth_token)
|
||||
|
||||
if user.last_login is None or user.last_login < (timezone.now() - timedelta(minutes=1)):
|
||||
user.last_login = timezone.now()
|
||||
user.save(update_fields=["last_login"])
|
||||
|
||||
return (user, token)
|
||||
|
||||
def authenticate_header(self, request):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -115,7 +115,8 @@ def public_register(username:str, password:str, email:str, full_name:str):
|
|||
user_model = get_user_model()
|
||||
user = user_model(username=username,
|
||||
email=email,
|
||||
full_name=full_name)
|
||||
full_name=full_name,
|
||||
read_new_terms=True)
|
||||
user.set_password(password)
|
||||
try:
|
||||
user.save()
|
||||
|
@ -128,16 +129,9 @@ def public_register(username:str, password:str, email:str, full_name:str):
|
|||
|
||||
|
||||
@tx.atomic
|
||||
def private_register_for_existing_user(token:str, username:str, password:str):
|
||||
"""
|
||||
Register works not only for register users, also serves for accept
|
||||
inviatations for projects as existing user.
|
||||
|
||||
Given a invitation token with parsed parameters, accept inviation
|
||||
as existing user.
|
||||
"""
|
||||
|
||||
user = get_and_validate_user(username=username, password=password)
|
||||
def accept_invitation_by_existing_user(token:str, user_id:int):
|
||||
user_model = get_user_model()
|
||||
user = user_model.objects.get(id=user_id)
|
||||
membership = get_membership_by_token(token)
|
||||
|
||||
try:
|
||||
|
@ -145,8 +139,6 @@ def private_register_for_existing_user(token:str, username:str, password:str):
|
|||
membership.save(update_fields=["user"])
|
||||
except IntegrityError:
|
||||
raise exc.IntegrityError(_("This user is already a member of the project."))
|
||||
|
||||
send_register_email(user)
|
||||
return user
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from taiga.base import throttling
|
||||
|
||||
|
||||
class LoginFailRateThrottle(throttling.GlobalThrottlingMixin, throttling.ThrottleByActionMixin, throttling.SimpleRateThrottle):
|
||||
scope = "login-fail"
|
||||
throttled_actions = ["create"]
|
||||
|
||||
def throttle_success(self, request, view):
|
||||
return True
|
||||
|
||||
def finalize(self, request, response, view):
|
||||
if response.status_code == 400:
|
||||
self.history.insert(0, self.now)
|
||||
self.cache.set(self.key, self.history, self.duration)
|
||||
|
||||
|
||||
class RegisterSuccessRateThrottle(throttling.GlobalThrottlingMixin, throttling.ThrottleByActionMixin, throttling.SimpleRateThrottle):
|
||||
scope = "register-success"
|
||||
throttled_actions = ["register"]
|
||||
|
||||
def throttle_success(self, request, view):
|
||||
return True
|
||||
|
||||
def finalize(self, request, response, view):
|
||||
if response.status_code == 201:
|
||||
self.history.insert(0, self.now)
|
||||
self.cache.set(self.key, self.history, self.duration)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -48,11 +48,5 @@ class PublicRegisterValidator(BaseRegisterValidator):
|
|||
pass
|
||||
|
||||
|
||||
class PrivateRegisterForNewUserValidator(BaseRegisterValidator):
|
||||
token = serializers.CharField(max_length=255, required=True)
|
||||
|
||||
|
||||
class PrivateRegisterForExistingUserValidator(validators.Validator):
|
||||
username = serializers.CharField(max_length=255)
|
||||
password = serializers.CharField(min_length=4)
|
||||
class PrivateRegisterValidator(BaseRegisterValidator):
|
||||
token = serializers.CharField(max_length=255, required=True)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -467,6 +467,11 @@ class ModelField(WritableField):
|
|||
"type": self.model_field.get_internal_type()
|
||||
}
|
||||
|
||||
def validate(self, value):
|
||||
super(ModelField, self).validate(value)
|
||||
if value is None and not self.model_field.null:
|
||||
raise ValidationError(self.error_messages['invalid'])
|
||||
|
||||
|
||||
##### Typed Fields #####
|
||||
|
||||
|
@ -512,8 +517,9 @@ class CharField(WritableField):
|
|||
self.validators.append(validators.MaxLengthValidator(max_length))
|
||||
|
||||
def from_native(self, value):
|
||||
if isinstance(value, six.string_types) or value is None:
|
||||
return value
|
||||
if value in validators.EMPTY_VALUES:
|
||||
return ""
|
||||
|
||||
return smart_text(value)
|
||||
|
||||
def to_native(self, value):
|
||||
|
@ -612,13 +618,24 @@ class ChoiceField(WritableField):
|
|||
return value
|
||||
|
||||
|
||||
class InvalidEmailValidationError(ValidationError):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidDomainValidationError(ValidationError):
|
||||
pass
|
||||
|
||||
|
||||
def validate_user_email_allowed_domains(value):
|
||||
validators.validate_email(value)
|
||||
try:
|
||||
validators.validate_email(value)
|
||||
except ValidationError as e:
|
||||
raise InvalidEmailValidationError(e)
|
||||
|
||||
domain_name = value.split("@")[1]
|
||||
|
||||
if settings.USER_EMAIL_ALLOWED_DOMAINS and domain_name not in settings.USER_EMAIL_ALLOWED_DOMAINS:
|
||||
raise ValidationError(_("You email domain is not allowed"))
|
||||
raise InvalidDomainValidationError(_("You email domain is not allowed"))
|
||||
|
||||
|
||||
class EmailField(CharField):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -24,14 +24,28 @@ from django.core.paginator import (
|
|||
InvalidPage,
|
||||
)
|
||||
from django.http import Http404
|
||||
from django.http import QueryDict
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from .settings import api_settings
|
||||
from .templatetags.api import replace_query_param
|
||||
|
||||
from urllib import parse as urlparse
|
||||
|
||||
import warnings
|
||||
|
||||
|
||||
def replace_query_param(url, key, val):
|
||||
"""
|
||||
Given a URL and a key/val pair, set or replace an item in the query
|
||||
parameters of the URL, and return the new URL.
|
||||
"""
|
||||
(scheme, netloc, path, query, fragment) = urlparse.urlsplit(url)
|
||||
query_dict = QueryDict(query).copy()
|
||||
query_dict[key] = val
|
||||
query = query_dict.urlencode()
|
||||
return urlparse.urlunsplit((scheme, netloc, path, query, fragment))
|
||||
|
||||
|
||||
def strict_positive_int(integer_string, cutoff=None):
|
||||
"""
|
||||
Cast a string to a strictly positive integer.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -20,7 +20,6 @@ import abc
|
|||
|
||||
from functools import reduce
|
||||
|
||||
from taiga.base.utils import sequence as sq
|
||||
from taiga.permissions.services import user_has_perm, is_project_admin
|
||||
from django.apps import apps
|
||||
|
||||
|
@ -112,7 +111,7 @@ class Not(PermissionOperator):
|
|||
super().__init__(component)
|
||||
|
||||
def check_permissions(self, *args, **kwargs):
|
||||
component = sq.first(self.components)
|
||||
component = self.components[0]
|
||||
return (not component.check_permissions(*args, **kwargs))
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -51,28 +51,15 @@ on the response, such as JSON encoded data or HTML output.
|
|||
REST framework also provides an HTML renderer the renders the browsable API.
|
||||
"""
|
||||
|
||||
import django
|
||||
from django import forms
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.http.multipartparser import parse_header
|
||||
from django.template import RequestContext, loader, Template
|
||||
from django.test.client import encode_multipart
|
||||
from django.utils import six
|
||||
from django.utils.encoding import smart_text
|
||||
from django.utils.six import StringIO
|
||||
from django.utils.xmlutils import SimplerXMLGenerator
|
||||
|
||||
from taiga.base import exceptions, status
|
||||
from taiga.base.exceptions import ParseError
|
||||
|
||||
from . import VERSION
|
||||
from .request import is_form_media_type, override_method
|
||||
from .settings import api_settings
|
||||
from .utils import encoders
|
||||
from .utils.breadcrumbs import get_breadcrumbs
|
||||
|
||||
import json
|
||||
import copy
|
||||
|
||||
|
||||
class BaseRenderer(object):
|
||||
|
@ -198,55 +185,6 @@ class JSONPRenderer(JSONRenderer):
|
|||
return callback.encode(self.charset) + b"(" + json + b");"
|
||||
|
||||
|
||||
class XMLRenderer(BaseRenderer):
|
||||
"""
|
||||
Renderer which serializes to XML.
|
||||
"""
|
||||
|
||||
media_type = "application/xml"
|
||||
format = "xml"
|
||||
charset = "utf-8"
|
||||
|
||||
def render(self, data, accepted_media_type=None, renderer_context=None):
|
||||
"""
|
||||
Renders `data` into serialized XML.
|
||||
"""
|
||||
if data is None:
|
||||
return ""
|
||||
|
||||
stream = StringIO()
|
||||
|
||||
xml = SimplerXMLGenerator(stream, self.charset)
|
||||
xml.startDocument()
|
||||
xml.startElement("root", {})
|
||||
|
||||
self._to_xml(xml, data)
|
||||
|
||||
xml.endElement("root")
|
||||
xml.endDocument()
|
||||
return stream.getvalue()
|
||||
|
||||
def _to_xml(self, xml, data):
|
||||
if isinstance(data, (list, tuple)):
|
||||
for item in data:
|
||||
xml.startElement("list-item", {})
|
||||
self._to_xml(xml, item)
|
||||
xml.endElement("list-item")
|
||||
|
||||
elif isinstance(data, dict):
|
||||
for key, value in six.iteritems(data):
|
||||
xml.startElement(key, {})
|
||||
self._to_xml(xml, value)
|
||||
xml.endElement(key)
|
||||
|
||||
elif data is None:
|
||||
# Don't output any value
|
||||
pass
|
||||
|
||||
else:
|
||||
xml.characters(smart_text(data))
|
||||
|
||||
|
||||
class TemplateHTMLRenderer(BaseRenderer):
|
||||
"""
|
||||
An HTML renderer for use with templates.
|
||||
|
@ -363,287 +301,6 @@ class StaticHTMLRenderer(TemplateHTMLRenderer):
|
|||
return data
|
||||
|
||||
|
||||
class HTMLFormRenderer(BaseRenderer):
|
||||
"""
|
||||
Renderers serializer data into an HTML form.
|
||||
|
||||
If the serializer was instantiated without an object then this will
|
||||
return an HTML form not bound to any object,
|
||||
otherwise it will return an HTML form with the appropriate initial data
|
||||
populated from the object.
|
||||
|
||||
Note that rendering of field and form errors is not currently supported.
|
||||
"""
|
||||
media_type = "text/html"
|
||||
format = "form"
|
||||
template = "api/form.html"
|
||||
charset = "utf-8"
|
||||
|
||||
def render(self, data, accepted_media_type=None, renderer_context=None):
|
||||
"""
|
||||
Render serializer data and return an HTML form, as a string.
|
||||
"""
|
||||
renderer_context = renderer_context or {}
|
||||
request = renderer_context["request"]
|
||||
|
||||
template = loader.get_template(self.template)
|
||||
context = RequestContext(request, {"form": data})
|
||||
return template.render(context)
|
||||
|
||||
|
||||
class BrowsableAPIRenderer(BaseRenderer):
|
||||
"""
|
||||
HTML renderer used to self-document the API.
|
||||
"""
|
||||
media_type = "text/html"
|
||||
format = "api"
|
||||
template = "api/api.html"
|
||||
charset = "utf-8"
|
||||
form_renderer_class = HTMLFormRenderer
|
||||
|
||||
def get_default_renderer(self, view):
|
||||
"""
|
||||
Return an instance of the first valid renderer.
|
||||
(Don't use another documenting renderer.)
|
||||
"""
|
||||
renderers = [renderer for renderer in view.renderer_classes
|
||||
if not issubclass(renderer, BrowsableAPIRenderer)]
|
||||
non_template_renderers = [renderer for renderer in renderers
|
||||
if not hasattr(renderer, "get_template_names")]
|
||||
|
||||
if not renderers:
|
||||
return None
|
||||
elif non_template_renderers:
|
||||
return non_template_renderers[0]()
|
||||
return renderers[0]()
|
||||
|
||||
def get_content(self, renderer, data,
|
||||
accepted_media_type, renderer_context):
|
||||
"""
|
||||
Get the content as if it had been rendered by the default
|
||||
non-documenting renderer.
|
||||
"""
|
||||
if not renderer:
|
||||
return "[No renderers were found]"
|
||||
|
||||
renderer_context["indent"] = 4
|
||||
content = renderer.render(data, accepted_media_type, renderer_context)
|
||||
|
||||
render_style = getattr(renderer, "render_style", "text")
|
||||
assert render_style in ["text", "binary"], 'Expected .render_style "text" or "binary", ' \
|
||||
'but got "%s"' % render_style
|
||||
if render_style == "binary":
|
||||
return "[%d bytes of binary content]" % len(content)
|
||||
|
||||
return content
|
||||
|
||||
def show_form_for_method(self, view, method, request, obj):
|
||||
"""
|
||||
Returns True if a form should be shown for this method.
|
||||
"""
|
||||
if not method in view.allowed_methods:
|
||||
return # Not a valid method
|
||||
|
||||
if not api_settings.FORM_METHOD_OVERRIDE:
|
||||
return # Cannot use form overloading
|
||||
|
||||
try:
|
||||
view.check_permissions(request)
|
||||
if obj is not None:
|
||||
view.check_object_permissions(request, obj)
|
||||
except exceptions.APIException:
|
||||
return False # Doesn't have permissions
|
||||
return True
|
||||
|
||||
def get_rendered_html_form(self, view, method, request):
|
||||
"""
|
||||
Return a string representing a rendered HTML form, possibly bound to
|
||||
either the input or output data.
|
||||
|
||||
In the absence of the View having an associated form then return None.
|
||||
"""
|
||||
if request.method == method:
|
||||
try:
|
||||
data = request.DATA
|
||||
files = request.FILES
|
||||
except ParseError:
|
||||
data = None
|
||||
files = None
|
||||
else:
|
||||
data = None
|
||||
files = None
|
||||
|
||||
with override_method(view, request, method) as request:
|
||||
obj = getattr(view, "object", None)
|
||||
if not self.show_form_for_method(view, method, request, obj):
|
||||
return
|
||||
|
||||
if method in ("DELETE", "OPTIONS"):
|
||||
return True # Don't actually need to return a form
|
||||
|
||||
if (not getattr(view, "get_serializer", None)
|
||||
or not any(is_form_media_type(parser.media_type) for parser in view.parser_classes)):
|
||||
return
|
||||
|
||||
serializer = view.get_serializer(instance=obj, data=data, files=files)
|
||||
serializer.is_valid()
|
||||
data = serializer.data
|
||||
|
||||
form_renderer = self.form_renderer_class()
|
||||
return form_renderer.render(data, self.accepted_media_type, self.renderer_context)
|
||||
|
||||
def get_raw_data_form(self, view, method, request):
|
||||
"""
|
||||
Returns a form that allows for arbitrary content types to be tunneled
|
||||
via standard HTML forms.
|
||||
(Which are typically application/x-www-form-urlencoded)
|
||||
"""
|
||||
with override_method(view, request, method) as request:
|
||||
# If we"re not using content overloading there's no point in
|
||||
# supplying a generic form, as the view won't treat the form"s
|
||||
# value as the content of the request.
|
||||
if not (api_settings.FORM_CONTENT_OVERRIDE
|
||||
and api_settings.FORM_CONTENTTYPE_OVERRIDE):
|
||||
return None
|
||||
|
||||
# Check permissions
|
||||
obj = getattr(view, "object", None)
|
||||
if not self.show_form_for_method(view, method, request, obj):
|
||||
return
|
||||
|
||||
# If possible, serialize the initial content for the generic form
|
||||
default_parser = view.parser_classes[0]
|
||||
renderer_class = getattr(default_parser, "renderer_class", None)
|
||||
if (hasattr(view, "get_serializer") and renderer_class):
|
||||
# View has a serializer defined and parser class has a
|
||||
# corresponding renderer that can be used to render the data.
|
||||
|
||||
# Get a read-only version of the serializer
|
||||
serializer = view.get_serializer(instance=obj)
|
||||
if obj is None:
|
||||
for name, field in serializer.fields.items():
|
||||
if getattr(field, "read_only", None):
|
||||
del serializer.fields[name]
|
||||
|
||||
# Render the raw data content
|
||||
renderer = renderer_class()
|
||||
accepted = self.accepted_media_type
|
||||
context = self.renderer_context.copy()
|
||||
context["indent"] = 4
|
||||
content = renderer.render(serializer.data, accepted, context)
|
||||
else:
|
||||
content = None
|
||||
|
||||
# Generate a generic form that includes a content type field,
|
||||
# and a content field.
|
||||
content_type_field = api_settings.FORM_CONTENTTYPE_OVERRIDE
|
||||
content_field = api_settings.FORM_CONTENT_OVERRIDE
|
||||
|
||||
media_types = [parser.media_type for parser in view.parser_classes]
|
||||
choices = [(media_type, media_type) for media_type in media_types]
|
||||
initial = media_types[0]
|
||||
|
||||
# NB. http://jacobian.org/writing/dynamic-form-generation/
|
||||
class GenericContentForm(forms.Form):
|
||||
def __init__(self):
|
||||
super(GenericContentForm, self).__init__()
|
||||
|
||||
self.fields[content_type_field] = forms.ChoiceField(
|
||||
label="Media type",
|
||||
choices=choices,
|
||||
initial=initial
|
||||
)
|
||||
self.fields[content_field] = forms.CharField(
|
||||
label="Content",
|
||||
widget=forms.Textarea,
|
||||
initial=content
|
||||
)
|
||||
|
||||
return GenericContentForm()
|
||||
|
||||
def get_name(self, view):
|
||||
return view.get_view_name()
|
||||
|
||||
def get_description(self, view):
|
||||
return view.get_view_description(html=True)
|
||||
|
||||
def get_breadcrumbs(self, request):
|
||||
return get_breadcrumbs(request.path)
|
||||
|
||||
def get_context(self, data, accepted_media_type, renderer_context):
|
||||
"""
|
||||
Returns the context used to render.
|
||||
"""
|
||||
view = renderer_context["view"]
|
||||
request = renderer_context["request"]
|
||||
response = renderer_context["response"]
|
||||
|
||||
renderer = self.get_default_renderer(view)
|
||||
|
||||
raw_data_post_form = self.get_raw_data_form(view, "POST", request)
|
||||
raw_data_put_form = self.get_raw_data_form(view, "PUT", request)
|
||||
raw_data_patch_form = self.get_raw_data_form(view, "PATCH", request)
|
||||
raw_data_put_or_patch_form = raw_data_put_form or raw_data_patch_form
|
||||
|
||||
response_headers = dict(response.items())
|
||||
renderer_content_type = ""
|
||||
if renderer:
|
||||
renderer_content_type = "%s" % renderer.media_type
|
||||
if renderer.charset:
|
||||
renderer_content_type += " ;%s" % renderer.charset
|
||||
response_headers["Content-Type"] = renderer_content_type
|
||||
|
||||
context = {
|
||||
"content": self.get_content(renderer, data, accepted_media_type, renderer_context),
|
||||
"view": view,
|
||||
"request": request,
|
||||
"response": response,
|
||||
"description": self.get_description(view),
|
||||
"name": self.get_name(view),
|
||||
"version": VERSION,
|
||||
"breadcrumblist": self.get_breadcrumbs(request),
|
||||
"allowed_methods": view.allowed_methods,
|
||||
"available_formats": [renderer.format for renderer in view.renderer_classes],
|
||||
"response_headers": response_headers,
|
||||
|
||||
"put_form": self.get_rendered_html_form(view, "PUT", request),
|
||||
"post_form": self.get_rendered_html_form(view, "POST", request),
|
||||
"delete_form": self.get_rendered_html_form(view, "DELETE", request),
|
||||
"options_form": self.get_rendered_html_form(view, "OPTIONS", request),
|
||||
|
||||
"raw_data_put_form": raw_data_put_form,
|
||||
"raw_data_post_form": raw_data_post_form,
|
||||
"raw_data_patch_form": raw_data_patch_form,
|
||||
"raw_data_put_or_patch_form": raw_data_put_or_patch_form,
|
||||
|
||||
"display_edit_forms": bool(response.status_code != 403),
|
||||
|
||||
"api_settings": api_settings
|
||||
}
|
||||
return context
|
||||
|
||||
def render(self, data, accepted_media_type=None, renderer_context=None):
|
||||
"""
|
||||
Render the HTML for the browsable API representation.
|
||||
"""
|
||||
self.accepted_media_type = accepted_media_type or ""
|
||||
self.renderer_context = renderer_context or {}
|
||||
|
||||
template = loader.get_template(self.template)
|
||||
context = self.get_context(data, accepted_media_type, renderer_context)
|
||||
context = RequestContext(renderer_context["request"], context)
|
||||
ret = template.render(context)
|
||||
|
||||
# Munge DELETE Response code to allow us to return content
|
||||
# (Do this *after* we"ve rendered the template so that we include
|
||||
# the normal deletion response code in the output)
|
||||
response = renderer_context["response"]
|
||||
if response.status_code == status.HTTP_204_NO_CONTENT:
|
||||
response.status_code = status.HTTP_200_OK
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
class MultiPartRenderer(BaseRenderer):
|
||||
media_type = "multipart/form-data; boundary=BoUnDaRyStRiNg"
|
||||
format = "multipart"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -56,6 +56,7 @@ python primitives.
|
|||
response content is handled by parsers and renderers.
|
||||
"""
|
||||
from decimal import Decimal
|
||||
from django.apps import apps
|
||||
from django.core.paginator import Page
|
||||
from django.db import models
|
||||
from django.forms import widgets
|
||||
|
@ -98,7 +99,7 @@ def _resolve_model(obj):
|
|||
"""
|
||||
if type(obj) == str and len(obj.split(".")) == 2:
|
||||
app_name, model_name = obj.split(".")
|
||||
return models.get_model(app_name, model_name)
|
||||
return apps.get_model(app_name, model_name)
|
||||
elif inspect.isclass(obj) and issubclass(obj, models.Model):
|
||||
return obj
|
||||
else:
|
||||
|
@ -817,8 +818,18 @@ class ModelSerializer((six.with_metaclass(SerializerMetaclass, BaseSerializer)))
|
|||
else:
|
||||
# Reverse relationships are only included if they are explicitly
|
||||
# present in the `fields` option on the serializer
|
||||
reverse_rels = opts.get_all_related_objects()
|
||||
reverse_rels += opts.get_all_related_many_to_many_objects()
|
||||
|
||||
# NOTE: Rewrite after Django 1.10 upgrade.
|
||||
# See https://docs.djangoproject.com/es/1.10/ref/models/meta/#migrating-from-the-old-api
|
||||
reverse_rels = [
|
||||
f for f in opts.get_fields()
|
||||
if (f.one_to_many or f.one_to_one)
|
||||
and f.auto_created and not f.concrete
|
||||
]
|
||||
reverse_rels += [
|
||||
f for f in opts.get_fields(include_hidden=True)
|
||||
if f.many_to_many and f.auto_created
|
||||
]
|
||||
|
||||
for relation in reverse_rels:
|
||||
accessor_name = relation.get_accessor_name()
|
||||
|
@ -1024,16 +1035,32 @@ class ModelSerializer((six.with_metaclass(SerializerMetaclass, BaseSerializer)))
|
|||
m2m_data = {}
|
||||
related_data = {}
|
||||
nested_forward_relations = {}
|
||||
model = self.opts.model
|
||||
meta = self.opts.model._meta
|
||||
|
||||
# Reverse fk or one-to-one relations
|
||||
for (obj, model) in meta.get_all_related_objects_with_model():
|
||||
# NOTE: Rewrite after Django 1.10 upgrade.
|
||||
# See https://docs.djangoproject.com/es/1.10/ref/models/meta/#migrating-from-the-old-api
|
||||
related_objes_with_models = [
|
||||
(f, f.model if f.model != model else None)
|
||||
for f in meta.get_fields()
|
||||
if (f.one_to_many or f.one_to_one)
|
||||
and f.auto_created and not f.concrete
|
||||
]
|
||||
for (obj, model) in related_objes_with_models:
|
||||
field_name = obj.get_accessor_name()
|
||||
if field_name in attrs:
|
||||
related_data[field_name] = attrs.pop(field_name)
|
||||
|
||||
# Reverse m2m relations
|
||||
for (obj, model) in meta.get_all_related_m2m_objects_with_model():
|
||||
# NOTE: Rewrite after Django 1.10 upgrade.
|
||||
# See https://docs.djangoproject.com/es/1.10/ref/models/meta/#migrating-from-the-old-api
|
||||
related_m2m_objects_with_model = [
|
||||
(f, f.model if f.model != model else None)
|
||||
for f in meta.get_fields(include_hidden=True)
|
||||
if f.many_to_many and f.auto_created
|
||||
]
|
||||
for (obj, model) in related_m2m_objects_with_model:
|
||||
field_name = obj.get_accessor_name()
|
||||
if field_name in attrs:
|
||||
m2m_data[field_name] = attrs.pop(field_name)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -76,7 +76,6 @@ DEFAULTS = {
|
|||
# Base API policies
|
||||
"DEFAULT_RENDERER_CLASSES": (
|
||||
"taiga.base.api.renderers.JSONRenderer",
|
||||
"taiga.base.api.renderers.BrowsableAPIRenderer",
|
||||
),
|
||||
"DEFAULT_PARSER_CLASSES": (
|
||||
"taiga.base.api.parsers.JSONParser",
|
||||
|
@ -107,6 +106,7 @@ DEFAULTS = {
|
|||
"user": None,
|
||||
"anon": None,
|
||||
},
|
||||
"DEFAULT_THROTTLE_WHITELIST": [],
|
||||
|
||||
# Pagination
|
||||
"PAGINATE_BY": None,
|
||||
|
|
|
@ -1,229 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
* Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
* Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The code is partially taken (and modified) from django rest framework
|
||||
* that is licensed under the following terms:
|
||||
*
|
||||
* Copyright (c) 2011-2014, Tom Christie
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
* list of conditions and the following disclaimer in the documentation and/or
|
||||
* other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This CSS file contains some tweaks specific to the included Bootstrap theme.
|
||||
It's separate from `style.css` so that it can be easily overridden by replacing
|
||||
a single block in the template.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
.form-actions {
|
||||
background: transparent;
|
||||
border-top-color: transparent;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.navbar-inverse .brand a {
|
||||
color: #999;
|
||||
}
|
||||
.navbar-inverse .brand:hover a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* custom navigation styles */
|
||||
.wrapper .navbar{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.navbar .navbar-inner{
|
||||
background: #2C2C2C;
|
||||
color: white;
|
||||
border: none;
|
||||
border-top: 5px solid #A30000;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.navbar .navbar-inner .nav li, .navbar .navbar-inner .nav li a, .navbar .navbar-inner .brand:hover{
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-list > .active > a, .nav-list > .active > a:hover {
|
||||
background: #2c2c2c;
|
||||
}
|
||||
|
||||
.navbar .navbar-inner .dropdown-menu li a, .navbar .navbar-inner .dropdown-menu li{
|
||||
color: #A30000;
|
||||
}
|
||||
.navbar .navbar-inner .dropdown-menu li a:hover{
|
||||
background: #eeeeee;
|
||||
color: #c20000;
|
||||
}
|
||||
|
||||
/*=== dabapps bootstrap styles ====*/
|
||||
|
||||
html{
|
||||
width:100%;
|
||||
background: none;
|
||||
}
|
||||
|
||||
body, .navbar .navbar-inner .container-fluid {
|
||||
max-width: 1150px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
body{
|
||||
background: url("../img/grid.png") repeat-x;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
#content{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* sticky footer and footer */
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
.wrapper {
|
||||
min-height: 100%;
|
||||
height: auto !important;
|
||||
height: 100%;
|
||||
margin: 0 auto -60px;
|
||||
}
|
||||
|
||||
.form-switcher {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.well {
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.well .form-actions {
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.well form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.well form .help-block {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.nav-tabs > li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.nav-tabs li a {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.nav-tabs > .active > a {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.nav-tabs > .active > a:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.tabbable.first-tab-active .tab-content
|
||||
{
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
#footer, #push {
|
||||
height: 60px; /* .push must be the same height as .footer */
|
||||
}
|
||||
|
||||
#footer{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#footer p {
|
||||
text-align: center;
|
||||
color: gray;
|
||||
border-top: 1px solid #DDD;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
color: gray;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#footer a:hover {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* custom general page styles */
|
||||
.hero-unit h2, .hero-unit h1{
|
||||
color: #A30000;
|
||||
}
|
||||
|
||||
body a, body a{
|
||||
color: #A30000;
|
||||
}
|
||||
|
||||
body a:hover{
|
||||
color: #c20000;
|
||||
}
|
||||
|
||||
#content a span{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.request-info {
|
||||
clear:both;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,114 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
* Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
* Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The code is partially taken (and modified) from django rest framework
|
||||
* that is licensed under the following terms:
|
||||
*
|
||||
* Copyright (c) 2011-2014, Tom Christie
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
* list of conditions and the following disclaimer in the documentation and/or
|
||||
* other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* The navbar is fixed at >= 980px wide, so add padding to the body to prevent
|
||||
content running up underneath it. */
|
||||
|
||||
h1 {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.resource-description, .response-info {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
.version:before {
|
||||
content: "v";
|
||||
opacity: 0.6;
|
||||
padding-right: 0.25em;
|
||||
}
|
||||
|
||||
.version {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
.format-option {
|
||||
font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", monospace;
|
||||
}
|
||||
|
||||
.button-form {
|
||||
float: right;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
ul.breadcrumb {
|
||||
margin: 58px 0 0 0;
|
||||
}
|
||||
|
||||
form select, form input, form textarea {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
form select[multiple] {
|
||||
height: 150px;
|
||||
}
|
||||
/* To allow tooltips to work on disabled elements */
|
||||
.disabled-tooltip-shield {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.errorlist {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
word-wrap: normal;
|
||||
white-space: pre;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
* Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
* Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The code is partially taken (and modified) from django rest framework
|
||||
* that is licensed under the following terms:
|
||||
*
|
||||
* Copyright (c) 2011-2014, Tom Christie
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
* list of conditions and the following disclaimer in the documentation and/or
|
||||
* other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
.com { color: #93a1a1; }
|
||||
.lit { color: #195f91; }
|
||||
.pun, .opn, .clo { color: #93a1a1; }
|
||||
.fun { color: #dc322f; }
|
||||
.str, .atv { color: #D14; }
|
||||
.kwd, .prettyprint .tag { color: #1e347b; }
|
||||
.typ, .atn, .dec, .var { color: teal; }
|
||||
.pln { color: #48484c; }
|
||||
|
||||
.prettyprint {
|
||||
padding: 8px;
|
||||
background-color: #f7f7f9;
|
||||
border: 1px solid #e1e1e8;
|
||||
}
|
||||
.prettyprint.linenums {
|
||||
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||
}
|
||||
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums {
|
||||
margin: 0 0 0 33px; /* IE indents via margin-left */
|
||||
}
|
||||
ol.linenums li {
|
||||
padding-left: 12px;
|
||||
color: #bebec5;
|
||||
line-height: 20px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
File diff suppressed because one or more lines are too long
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
* Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
* Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
* Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* The code is partially taken (and modified) from django rest framework
|
||||
* that is licensed under the following terms:
|
||||
*
|
||||
* Copyright (c) 2011-2014, Tom Christie
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
* list of conditions and the following disclaimer in the documentation and/or
|
||||
* other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
function getCookie(c_name)
|
||||
{
|
||||
// From http://www.w3schools.com/js/js_cookies.asp
|
||||
var c_value = document.cookie;
|
||||
var c_start = c_value.indexOf(" " + c_name + "=");
|
||||
if (c_start == -1) {
|
||||
c_start = c_value.indexOf(c_name + "=");
|
||||
}
|
||||
if (c_start == -1) {
|
||||
c_value = null;
|
||||
} else {
|
||||
c_start = c_value.indexOf("=", c_start) + 1;
|
||||
var c_end = c_value.indexOf(";", c_start);
|
||||
if (c_end == -1) {
|
||||
c_end = c_value.length;
|
||||
}
|
||||
c_value = unescape(c_value.substring(c_start,c_end));
|
||||
}
|
||||
return c_value;
|
||||
}
|
||||
|
||||
// JSON highlighting.
|
||||
prettyPrint();
|
||||
|
||||
// Bootstrap tooltips.
|
||||
$('.js-tooltip').tooltip({
|
||||
delay: 1000
|
||||
});
|
||||
|
||||
// Deal with rounded tab styling after tab clicks.
|
||||
$('a[data-toggle="tab"]:first').on('shown', function (e) {
|
||||
$(e.target).parents('.tabbable').addClass('first-tab-active');
|
||||
});
|
||||
$('a[data-toggle="tab"]:not(:first)').on('shown', function (e) {
|
||||
$(e.target).parents('.tabbable').removeClass('first-tab-active');
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').click(function(){
|
||||
document.cookie="tabstyle=" + this.name + "; path=/";
|
||||
});
|
||||
|
||||
// Store tab preference in cookies & display appropriate tab on load.
|
||||
var selectedTab = null;
|
||||
var selectedTabName = getCookie('tabstyle');
|
||||
|
||||
if (selectedTabName) {
|
||||
selectedTab = $('.form-switcher a[name=' + selectedTabName + ']');
|
||||
}
|
||||
|
||||
if (selectedTab && selectedTab.length > 0) {
|
||||
// Display whichever tab is selected.
|
||||
selectedTab.tab('show');
|
||||
} else {
|
||||
// If no tab selected, display rightmost tab.
|
||||
$('.form-switcher a:first').tab('show');
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
* Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
* Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
* Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright (c) 2011-2014, Tom Christie
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
* list of conditions and the following disclaimer in the documentation and/or
|
||||
* other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
||||
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
||||
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
||||
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
||||
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
||||
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
||||
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
||||
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
||||
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
||||
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
||||
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
||||
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
||||
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
||||
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
||||
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
||||
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
||||
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
||||
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
||||
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
||||
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
||||
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
||||
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
||||
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
||||
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
||||
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
|
@ -1,3 +0,0 @@
|
|||
{% extends "api/base.html" %}
|
||||
|
||||
{# Override this template in your own templates directory to customize #}
|
|
@ -1,236 +0,0 @@
|
|||
{% load api %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% block head %}
|
||||
|
||||
{% block meta %}
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta name="robots" content="NONE,NOARCHIVE" />
|
||||
{% endblock %}
|
||||
|
||||
<title>{% block title %}Taiga API REST{% endblock %}</title>
|
||||
|
||||
{% block style %}
|
||||
{% block bootstrap_theme %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "api/css/bootstrap.min.css" %}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "api/css/bootstrap-tweaks.css" %}"/>
|
||||
{% endblock %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "api/css/prettify.css" %}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "api/css/default.css" %}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body class="{% block bodyclass %}{% endblock %} container">
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
{% block navbar %}
|
||||
<div class="navbar {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %}">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<span href="/">
|
||||
{% block branding %}
|
||||
<a class='brand' rel="nofollow" href='https://taiga.io'>
|
||||
Taiga API REST
|
||||
</a>
|
||||
{% endblock %}
|
||||
</span>
|
||||
<ul class="nav pull-right">
|
||||
{% block userlinks %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
{{ user }}
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>{% optional_logout request %}</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>{% optional_login request %}</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
|
||||
<li>
|
||||
<a href="{{ breadcrumb_url }}" {% if forloop.last %}class="active"{% endif %}>{{ breadcrumb_name }}</a> {% if not forloop.last %}<span class="divider">›</span>{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
<!-- Content -->
|
||||
<div id="content">
|
||||
|
||||
{% if 'GET' in allowed_methods %}
|
||||
<form id="get-form" class="pull-right">
|
||||
<fieldset>
|
||||
<div class="btn-group format-selection">
|
||||
<a class="btn btn-primary js-tooltip" href='{{ request.get_full_path }}' rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>
|
||||
|
||||
<button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown" title="Specify a format for the GET request">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for format in available_formats %}
|
||||
<li>
|
||||
<a class="js-tooltip format-option" href='{% add_query_param request api_settings.URL_FORMAT_OVERRIDE format %}' rel="nofollow" title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">{{ format }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if options_form %}
|
||||
<form class="button-form" action="{{ request.get_full_path }}" method="POST" class="pull-right">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="OPTIONS" />
|
||||
<button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the {{ name }} resource">OPTIONS</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if delete_form %}
|
||||
<form class="button-form" action="{{ request.get_full_path }}" method="POST" class="pull-right">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE" />
|
||||
<button class="btn btn-danger js-tooltip" title="Make a DELETE request on the {{ name }} resource">DELETE</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<div class="content-main">
|
||||
<div class="page-header"><h1>{{ name }}</h1></div>
|
||||
{% block description %}
|
||||
{{ description }}
|
||||
{% endblock %}
|
||||
<div class="request-info" style="clear: both" >
|
||||
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
|
||||
</div>
|
||||
<div class="response-info">
|
||||
<pre class="prettyprint"><div class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}
|
||||
{% for key, val in response_headers.items %}<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize_quoted_links }}</span>
|
||||
{% endfor %}
|
||||
</div>{{ content|urlize_quoted_links }}</pre>{% endautoescape %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if display_edit_forms %}
|
||||
|
||||
{% if post_form or raw_data_post_form %}
|
||||
<div {% if post_form %}class="tabbable"{% endif %}>
|
||||
{% if post_form %}
|
||||
<ul class="nav nav-tabs form-switcher">
|
||||
<li><a name='html-tab' href="#object-form" data-toggle="tab">HTML form</a></li>
|
||||
<li><a name='raw-tab' href="#generic-content-form" data-toggle="tab">Raw data</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="well tab-content">
|
||||
{% if post_form %}
|
||||
<div class="tab-pane" id="object-form">
|
||||
{% with form=post_form %}
|
||||
<form action="{{ request.get_full_path }}" method="POST" enctype="multipart/form-data" class="form-horizontal">
|
||||
<fieldset>
|
||||
{{ post_form }}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div {% if post_form %}class="tab-pane"{% endif %} id="generic-content-form">
|
||||
{% with form=raw_data_post_form %}
|
||||
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
||||
<fieldset>
|
||||
{% include "api/raw_data_form.html" %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" title="Make a POST request on the {{ name }} resource">POST</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if put_form or raw_data_put_form or raw_data_patch_form %}
|
||||
<div {% if put_form %}class="tabbable"{% endif %}>
|
||||
{% if put_form %}
|
||||
<ul class="nav nav-tabs form-switcher">
|
||||
<li><a name='html-tab' href="#object-form" data-toggle="tab">HTML form</a></li>
|
||||
<li><a name='raw-tab' href="#generic-content-form" data-toggle="tab">Raw data</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="well tab-content">
|
||||
{% if put_form %}
|
||||
<div class="tab-pane" id="object-form">
|
||||
<form action="{{ request.get_full_path }}" method="POST" enctype="multipart/form-data" class="form-horizontal">
|
||||
<fieldset>
|
||||
{{ put_form }}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div {% if put_form %}class="tab-pane"{% endif %} id="generic-content-form">
|
||||
{% with form=raw_data_put_or_patch_form %}
|
||||
<form action="{{ request.get_full_path }}" method="POST" class="form-horizontal">
|
||||
<fieldset>
|
||||
{% include "api/raw_data_form.html" %}
|
||||
<div class="form-actions">
|
||||
{% if raw_data_put_form %}
|
||||
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PUT" title="Make a PUT request on the {{ name }} resource">PUT</button>
|
||||
{% endif %}
|
||||
{% if raw_data_patch_form %}
|
||||
<button class="btn btn-primary js-tooltip" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="PATCH" title="Make a PATCH request on the {{ name }} resource">PATCH</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<!-- END content-main -->
|
||||
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
|
||||
<div id="push"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- ./wrapper -->
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script src="{% static "api/js/jquery-1.8.1-min.js" %}"></script>
|
||||
<script src="{% static "api/js/bootstrap.min.js" %}"></script>
|
||||
<script src="{% static "api/js/prettify-min.js" %}"></script>
|
||||
<script src="{% static "api/js/default.js" %}"></script>
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
|
@ -1,15 +0,0 @@
|
|||
{% load api %}
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form.fields.values %}
|
||||
{% if not field.read_only %}
|
||||
<div class="control-group {% if field.errors %}error{% endif %}">
|
||||
{{ field.label_tag|add_class:"control-label" }}
|
||||
<div class="controls">
|
||||
{{ field.widget_html }}
|
||||
{% if field.help_text %}<span class="help-block">{{ field.help_text }}</span>{% endif %}
|
||||
{% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -1,3 +0,0 @@
|
|||
{% extends "api/login_base.html" %}
|
||||
|
||||
{# Override this template in your own templates directory to customize #}
|
|
@ -1,52 +0,0 @@
|
|||
{% load api %}
|
||||
<html>
|
||||
|
||||
<head>
|
||||
{% block style %}
|
||||
{% block bootstrap_theme %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "api/css/bootstrap.min.css" %}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "api/css/bootstrap-tweaks.css" %}"/>
|
||||
{% endblock %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "api/css/default.css" %}"/>
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body class="container">
|
||||
|
||||
<div class="container-fluid" style="margin-top: 30px">
|
||||
<div class="row-fluid">
|
||||
<div class="well" style="width: 320px; margin-left: auto; margin-right: auto">
|
||||
<div class="row-fluid">
|
||||
<div>
|
||||
{% block branding %}<h3 style="margin: 0 0 20px;">Taiga API REST</h3>{% endblock %}
|
||||
</div>
|
||||
</div><!-- /row fluid -->
|
||||
|
||||
<div class="row-fluid">
|
||||
<div>
|
||||
<form action="{% url 'api:login' %}" class=" form-inline" method="post">
|
||||
{% csrf_token %}
|
||||
<div id="div_id_username" class="clearfix control-group">
|
||||
<div class="controls">
|
||||
<Label class="span4">Username:</label>
|
||||
<input style="height: 25px" type="text" name="username" maxlength="100" autocapitalize="off" autocorrect="off" class="textinput textInput" id="id_username">
|
||||
</div>
|
||||
</div>
|
||||
<div id="div_id_password" class="clearfix control-group">
|
||||
<div class="controls">
|
||||
<Label class="span4">Password:</label>
|
||||
<input style="height: 25px" type="password" name="password" maxlength="100" autocapitalize="off" autocorrect="off" class="textinput textInput" id="id_password">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
<div class="form-actions-no-box">
|
||||
<input type="submit" name="submit" value="Log in" class="btn btn-primary" id="submit-id-submit">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div><!-- /.row-fluid -->
|
||||
</div><!--/.well-->
|
||||
</div><!-- /.row-fluid -->
|
||||
</div><!-- /.container-fluid -->
|
||||
</body>
|
||||
</html>
|
|
@ -1,12 +0,0 @@
|
|||
{% load api %}
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form %}
|
||||
<div class="control-group">
|
||||
{{ field.label_tag|add_class:"control-label" }}
|
||||
<div class="controls">
|
||||
{{ field }}
|
||||
<span class="help-block">{{ field.help_text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
|
@ -1,258 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# The code is partially taken (and modified) from django rest framework
|
||||
# that is licensed under the following terms:
|
||||
#
|
||||
# Copyright (c) 2011-2014, Tom Christie
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
# Redistributions in binary form must reproduce the above copyright notice, this
|
||||
# list of conditions and the following disclaimer in the documentation and/or
|
||||
# other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from django import template
|
||||
from django.core.urlresolvers import reverse, NoReverseMatch
|
||||
from django.contrib.staticfiles.templatetags.staticfiles import StaticFilesNode
|
||||
from django.http import QueryDict
|
||||
from django.utils.encoding import iri_to_uri
|
||||
from django.utils.html import escape
|
||||
from django.utils.safestring import SafeData, mark_safe
|
||||
from django.utils import six
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.html import smart_urlquote
|
||||
|
||||
from urllib import parse as urlparse
|
||||
|
||||
import re
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
|
||||
@register.tag("static")
|
||||
def do_static(parser, token):
|
||||
return StaticFilesNode.handle_token(parser, token)
|
||||
|
||||
|
||||
def replace_query_param(url, key, val):
|
||||
"""
|
||||
Given a URL and a key/val pair, set or replace an item in the query
|
||||
parameters of the URL, and return the new URL.
|
||||
"""
|
||||
(scheme, netloc, path, query, fragment) = urlparse.urlsplit(url)
|
||||
query_dict = QueryDict(query).copy()
|
||||
query_dict[key] = val
|
||||
query = query_dict.urlencode()
|
||||
return urlparse.urlunsplit((scheme, netloc, path, query, fragment))
|
||||
|
||||
|
||||
# Regex for adding classes to html snippets
|
||||
class_re = re.compile(r'(?<=class=["\'])(.*)(?=["\'])')
|
||||
|
||||
|
||||
# And the template tags themselves...
|
||||
|
||||
@register.simple_tag
|
||||
def optional_login(request):
|
||||
"""
|
||||
Include a login snippet if REST framework's login view is in the URLconf.
|
||||
"""
|
||||
try:
|
||||
login_url = reverse("api:login")
|
||||
except NoReverseMatch:
|
||||
return ""
|
||||
|
||||
snippet = "<a href='%s?next=%s'>Log in</a>" % (login_url, request.path)
|
||||
return snippet
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def optional_logout(request):
|
||||
"""
|
||||
Include a logout snippet if REST framework's logout view is in the URLconf.
|
||||
"""
|
||||
try:
|
||||
logout_url = reverse("api:logout")
|
||||
except NoReverseMatch:
|
||||
return ""
|
||||
|
||||
snippet = "<a href='%s?next=%s'>Log out</a>" % (logout_url, request.path)
|
||||
return snippet
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def add_query_param(request, key, val):
|
||||
"""
|
||||
Add a query parameter to the current request url, and return the new url.
|
||||
"""
|
||||
iri = request.get_full_path()
|
||||
uri = iri_to_uri(iri)
|
||||
return replace_query_param(uri, key, val)
|
||||
|
||||
|
||||
@register.filter
|
||||
def add_class(value, css_class):
|
||||
"""
|
||||
http://stackoverflow.com/questions/4124220/django-adding-css-classes-when-rendering-form-fields-in-a-template
|
||||
|
||||
Inserts classes into template variables that contain HTML tags,
|
||||
useful for modifying forms without needing to change the Form objects.
|
||||
|
||||
Usage:
|
||||
|
||||
{{ field.label_tag|add_class:"control-label" }}
|
||||
|
||||
In the case of REST Framework, the filter is used to add Bootstrap-specific
|
||||
classes to the forms.
|
||||
"""
|
||||
html = six.text_type(value)
|
||||
match = class_re.search(html)
|
||||
if match:
|
||||
m = re.search(r"^%s$|^%s\s|\s%s\s|\s%s$" % (css_class, css_class,
|
||||
css_class, css_class),
|
||||
match.group(1))
|
||||
if not m:
|
||||
return mark_safe(class_re.sub(match.group(1) + " " + css_class,
|
||||
html))
|
||||
else:
|
||||
return mark_safe(html.replace(">", ' class="%s">' % css_class, 1))
|
||||
return value
|
||||
|
||||
|
||||
# Bunch of stuff cloned from urlize
|
||||
TRAILING_PUNCTUATION = [".", ",", ":", ";", ".)", "\"", "'"]
|
||||
WRAPPING_PUNCTUATION = [("(", ")"), ("<", ">"), ("[", "]"), ("<", ">"),
|
||||
("\"", "\""), ("'", "'")]
|
||||
word_split_re = re.compile(r"(\s+)")
|
||||
simple_url_re = re.compile(r"^https?://\[?\w", re.IGNORECASE)
|
||||
simple_url_2_re = re.compile(r"^www\.|^(?!http)\w[^@]+\.(com|edu|gov|int|mil|net|org)$", re.IGNORECASE)
|
||||
simple_email_re = re.compile(r"^\S+@\S+\.\S+$")
|
||||
|
||||
|
||||
def smart_urlquote_wrapper(matched_url):
|
||||
"""
|
||||
Simple wrapper for smart_urlquote. ValueError("Invalid IPv6 URL") can
|
||||
be raised here, see issue #1386
|
||||
"""
|
||||
try:
|
||||
return smart_urlquote(matched_url)
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
|
||||
@register.filter
|
||||
def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=True):
|
||||
"""
|
||||
Converts any URLs in text into clickable links.
|
||||
|
||||
Works on http://, https://, www. links, and also on links ending in one of
|
||||
the original seven gTLDs (.com, .edu, .gov, .int, .mil, .net, and .org).
|
||||
Links can have trailing punctuation (periods, commas, close-parens) and
|
||||
leading punctuation (opening parens) and it"ll still do the right thing.
|
||||
|
||||
If trim_url_limit is not None, the URLs in link text longer than this limit
|
||||
will truncated to trim_url_limit-3 characters and appended with an elipsis.
|
||||
|
||||
If nofollow is True, the URLs in link text will get a rel="nofollow"
|
||||
attribute.
|
||||
|
||||
If autoescape is True, the link text and URLs will get autoescaped.
|
||||
"""
|
||||
trim_url = lambda x, limit=trim_url_limit: limit is not None and (len(x) > limit and ("%s..." % x[:max(0, limit - 3)])) or x
|
||||
safe_input = isinstance(text, SafeData)
|
||||
words = word_split_re.split(force_text(text))
|
||||
for i, word in enumerate(words):
|
||||
if "." in word or "@" in word or ":" in word:
|
||||
# Deal with punctuation.
|
||||
lead, middle, trail = "", word, ""
|
||||
for punctuation in TRAILING_PUNCTUATION:
|
||||
if middle.endswith(punctuation):
|
||||
middle = middle[:-len(punctuation)]
|
||||
trail = punctuation + trail
|
||||
for opening, closing in WRAPPING_PUNCTUATION:
|
||||
if middle.startswith(opening):
|
||||
middle = middle[len(opening):]
|
||||
lead = lead + opening
|
||||
# Keep parentheses at the end only if they"re balanced.
|
||||
if (middle.endswith(closing)
|
||||
and middle.count(closing) == middle.count(opening) + 1):
|
||||
middle = middle[:-len(closing)]
|
||||
trail = closing + trail
|
||||
|
||||
# Make URL we want to point to.
|
||||
url = None
|
||||
nofollow_attr = ' rel="nofollow"' if nofollow else ""
|
||||
if simple_url_re.match(middle):
|
||||
url = smart_urlquote_wrapper(middle)
|
||||
elif simple_url_2_re.match(middle):
|
||||
url = smart_urlquote_wrapper("http://%s" % middle)
|
||||
elif not ":" in middle and simple_email_re.match(middle):
|
||||
local, domain = middle.rsplit("@", 1)
|
||||
try:
|
||||
domain = domain.encode("idna").decode("ascii")
|
||||
except UnicodeError:
|
||||
continue
|
||||
url = "mailto:%s@%s" % (local, domain)
|
||||
nofollow_attr = ""
|
||||
|
||||
# Make link.
|
||||
if url:
|
||||
trimmed = trim_url(middle)
|
||||
if autoescape and not safe_input:
|
||||
lead, trail = escape(lead), escape(trail)
|
||||
url, trimmed = escape(url), escape(trimmed)
|
||||
middle = '<a href="%s"%s>%s</a>' % (url, nofollow_attr, trimmed)
|
||||
words[i] = mark_safe("%s%s%s" % (lead, middle, trail))
|
||||
else:
|
||||
if safe_input:
|
||||
words[i] = mark_safe(word)
|
||||
elif autoescape:
|
||||
words[i] = escape(word)
|
||||
elif safe_input:
|
||||
words[i] = mark_safe(word)
|
||||
elif autoescape:
|
||||
words[i] = escape(word)
|
||||
return "".join(words)
|
||||
|
||||
|
||||
@register.filter
|
||||
def break_long_headers(header):
|
||||
"""
|
||||
Breaks headers longer than 160 characters (~page length)
|
||||
when possible (are comma separated)
|
||||
"""
|
||||
if len(header) > 160 and "," in header:
|
||||
header = mark_safe("<br> " + ", <br>".join(header.split(",")))
|
||||
return header
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -64,6 +64,12 @@ class BaseThrottle(object):
|
|||
"""
|
||||
raise NotImplementedError(".allow_request() must be overridden")
|
||||
|
||||
def finalize(self, request, response, view):
|
||||
"""
|
||||
Optionally, update the Trottling information based on de response.
|
||||
"""
|
||||
return None
|
||||
|
||||
def wait(self):
|
||||
"""
|
||||
Optionally, return a recommended number of seconds to wait before
|
||||
|
@ -105,6 +111,12 @@ class SimpleRateThrottle(BaseThrottle):
|
|||
"""
|
||||
raise NotImplementedError(".get_cache_key() must be overridden")
|
||||
|
||||
def has_to_finalize(self, request, response, view):
|
||||
"""
|
||||
Determine if the finalize method must be executed.
|
||||
"""
|
||||
return self.rate is not None
|
||||
|
||||
def get_rate(self):
|
||||
"""
|
||||
Determine the string representation of the allowed request rate.
|
||||
|
@ -153,11 +165,15 @@ class SimpleRateThrottle(BaseThrottle):
|
|||
# throttle duration
|
||||
while self.history and self.history[-1] <= self.now - self.duration:
|
||||
self.history.pop()
|
||||
if len(self.history) >= self.num_requests:
|
||||
return self.throttle_failure()
|
||||
return self.throttle_success()
|
||||
|
||||
def throttle_success(self):
|
||||
if self.exceeded_throttling_restriction(request, view):
|
||||
return self.throttle_failure()
|
||||
return self.throttle_success(request, view)
|
||||
|
||||
def exceeded_throttling_restriction(self, request, view):
|
||||
return len(self.history) >= self.num_requests
|
||||
|
||||
def throttle_success(self, request, view):
|
||||
"""
|
||||
Inserts the current request's timestamp along with the key
|
||||
into the cache.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -44,7 +44,7 @@
|
|||
|
||||
|
||||
from django.core.urlresolvers import RegexURLResolver
|
||||
from django.conf.urls import patterns, url, include
|
||||
from django.conf.urls import url, include
|
||||
|
||||
from .settings import api_settings
|
||||
|
||||
|
@ -67,7 +67,7 @@ def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required):
|
|||
else:
|
||||
# Regular URL pattern
|
||||
regex = urlpattern.regex.pattern.rstrip("$") + suffix_pattern
|
||||
view = urlpattern._callback or urlpattern._callback_str
|
||||
view = urlpattern.callback
|
||||
kwargs = urlpattern.default_args
|
||||
name = urlpattern.name
|
||||
# Add in both the existing and the new urlpattern
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# The code is partially taken (and modified) from django rest framework
|
||||
# that is licensed under the following terms:
|
||||
#
|
||||
# Copyright (c) 2011-2014, Tom Christie
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
# Redistributions in binary form must reproduce the above copyright notice, this
|
||||
# list of conditions and the following disclaimer in the documentation and/or
|
||||
# other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
"""
|
||||
Login and logout views for the browsable API.
|
||||
|
||||
Add these to your root URLconf if you're using the browsable API and
|
||||
your API requires authentication.
|
||||
|
||||
The urls must be namespaced as 'api', and you should make sure
|
||||
your authentication settings include `SessionAuthentication`.
|
||||
|
||||
urlpatterns = patterns('',
|
||||
...
|
||||
url(r'^auth', include('taiga.base.api.urls', namespace='api'))
|
||||
)
|
||||
"""
|
||||
from django.conf.urls import patterns
|
||||
from django.conf.urls import url
|
||||
|
||||
|
||||
template_name = {"template_name": "api/login.html"}
|
||||
|
||||
urlpatterns = patterns("django.contrib.auth.views",
|
||||
url(r"^login/$", "login", template_name, name="login"),
|
||||
url(r"^logout/$", "logout", template_name, name="logout"),
|
||||
)
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# The code is partially taken (and modified) from django rest framework
|
||||
# that is licensed under the following terms:
|
||||
#
|
||||
# Copyright (c) 2011-2014, Tom Christie
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
# Redistributions in binary form must reproduce the above copyright notice, this
|
||||
# list of conditions and the following disclaimer in the documentation and/or
|
||||
# other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from django.core.urlresolvers import resolve, get_script_prefix
|
||||
|
||||
|
||||
def get_breadcrumbs(url):
|
||||
"""
|
||||
Given a url returns a list of breadcrumbs, which are each a
|
||||
tuple of (name, url).
|
||||
"""
|
||||
|
||||
from taiga.base.api.settings import api_settings
|
||||
from taiga.base.api.views import APIView
|
||||
|
||||
view_name_func = api_settings.VIEW_NAME_FUNCTION
|
||||
|
||||
def breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen):
|
||||
"""
|
||||
Add tuples of (name, url) to the breadcrumbs list,
|
||||
progressively chomping off parts of the url.
|
||||
"""
|
||||
|
||||
try:
|
||||
(view, unused_args, unused_kwargs) = resolve(url)
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
# Check if this is a REST framework view,
|
||||
# and if so add it to the breadcrumbs
|
||||
cls = getattr(view, "cls", None)
|
||||
if cls is not None and issubclass(cls, APIView):
|
||||
# Don't list the same view twice in a row.
|
||||
# Probably an optional trailing slash.
|
||||
if not seen or seen[-1] != view:
|
||||
suffix = getattr(view, "suffix", None)
|
||||
name = view_name_func(cls, suffix)
|
||||
breadcrumbs_list.insert(0, (name, prefix + url))
|
||||
seen.append(view)
|
||||
|
||||
if url == "":
|
||||
# All done
|
||||
return breadcrumbs_list
|
||||
|
||||
elif url.endswith("/"):
|
||||
# Drop trailing slash off the end and continue to try to
|
||||
# resolve more breadcrumbs
|
||||
url = url.rstrip("/")
|
||||
return breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen)
|
||||
|
||||
# Drop trailing non-slash off the end and continue to try to
|
||||
# resolve more breadcrumbs
|
||||
url = url[:url.rfind("/") + 1]
|
||||
return breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen)
|
||||
|
||||
prefix = get_script_prefix().rstrip("/")
|
||||
url = url[len(prefix):]
|
||||
return breadcrumbs_recursive(url, [], prefix, [])
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -144,6 +144,8 @@ class APIView(View):
|
|||
# Allow dependancy injection of other settings to make testing easier.
|
||||
settings = api_settings
|
||||
|
||||
_trottle_instances = None
|
||||
|
||||
@classmethod
|
||||
def as_view(cls, **initkwargs):
|
||||
"""
|
||||
|
@ -286,7 +288,9 @@ class APIView(View):
|
|||
"""
|
||||
Instantiates and returns the list of throttles that this view uses.
|
||||
"""
|
||||
return [throttle() for throttle in self.throttle_classes]
|
||||
if self._trottle_instances is None:
|
||||
self._trottle_instances = [throttle() for throttle in self.throttle_classes]
|
||||
return self._trottle_instances
|
||||
|
||||
def get_content_negotiator(self):
|
||||
"""
|
||||
|
@ -342,6 +346,15 @@ class APIView(View):
|
|||
if not throttle.allow_request(request, self):
|
||||
self.throttled(request, throttle.wait())
|
||||
|
||||
def finalize_throttles(self, request, response):
|
||||
"""
|
||||
Check if request should be throttled.
|
||||
Raises an appropriate exception if the request is throttled.
|
||||
"""
|
||||
for throttle in self.get_throttles():
|
||||
if throttle.has_to_finalize(request, response, self):
|
||||
throttle.finalize(request, response, self)
|
||||
|
||||
# Dispatch methods
|
||||
|
||||
def initialize_request(self, request, *args, **kwargs):
|
||||
|
@ -391,6 +404,8 @@ class APIView(View):
|
|||
for key, value in self.headers.items():
|
||||
response[key] = value
|
||||
|
||||
self.finalize_throttles(request, response)
|
||||
|
||||
return response
|
||||
|
||||
def handle_exception(self, exc):
|
||||
|
@ -441,7 +456,6 @@ class APIView(View):
|
|||
handler = self.http_method_not_allowed
|
||||
|
||||
response = handler(request, *args, **kwargs)
|
||||
|
||||
except Exception as exc:
|
||||
response = self.handle_exception(exc)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -16,12 +16,5 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from .testing import *
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'taiga',
|
||||
'USERNAME': 'postgres',
|
||||
}
|
||||
}
|
||||
from .json import JSONField
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -16,17 +16,14 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from Crypto.PublicKey import RSA
|
||||
from jwkest.jwk import SYMKey
|
||||
from jwkest.jwe import JWE
|
||||
|
||||
from django.core.serializers.json import DjangoJSONEncoder
|
||||
from django.contrib.postgres.fields import JSONField as DjangoJSONField
|
||||
|
||||
|
||||
def encrypt(content, key):
|
||||
sym_key = SYMKey(key=key, alg="A128KW")
|
||||
jwe = JWE(content, alg="A128KW", enc="A256GCM")
|
||||
return jwe.encrypt([sym_key])
|
||||
__all__ = ["JSONField"]
|
||||
|
||||
|
||||
def decrypt(content, key):
|
||||
sym_key = SYMKey(key=key, alg="A128KW")
|
||||
return JWE().decrypt(content, keys=[sym_key])
|
||||
class JSONField(DjangoJSONField):
|
||||
def __init__(self, verbose_name=None, name=None, encoder=DjangoJSONEncoder, **kwargs):
|
||||
super().__init__(verbose_name, name, encoder, **kwargs)
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -252,17 +252,17 @@ def exception_handler(exc):
|
|||
"""
|
||||
|
||||
if isinstance(exc, APIException):
|
||||
headers = {}
|
||||
if getattr(exc, "auth_header", None):
|
||||
headers["WWW-Authenticate"] = exc.auth_header
|
||||
if getattr(exc, "wait", None):
|
||||
headers["X-Throttle-Wait-Seconds"] = "%d" % exc.wait
|
||||
if getattr(exc, "project_data", None):
|
||||
headers["Taiga-Info-Project-Memberships"] = exc.project_data["total_memberships"]
|
||||
headers["Taiga-Info-Project-Is-Private"] = exc.project_data["is_private"]
|
||||
res = response.Response(format_exception(exc), status=exc.status_code)
|
||||
|
||||
detail = format_exception(exc)
|
||||
return response.Response(detail, status=exc.status_code, headers=headers)
|
||||
if getattr(exc, "auth_header", None):
|
||||
res["WWW-Authenticate"] = exc.auth_header
|
||||
if getattr(exc, "wait", None):
|
||||
res["X-Throttle-Wait-Seconds"] = "%d" % exc.wait
|
||||
if getattr(exc, "project_data", None):
|
||||
res["Taiga-Info-Project-Memberships"] = exc.project_data["total_memberships"]
|
||||
res["Taiga-Info-Project-Is-Private"] = exc.project_data["is_private"]
|
||||
|
||||
return res
|
||||
|
||||
elif isinstance(exc, Http404):
|
||||
return response.NotFound({'_error_message': str(exc)})
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -30,7 +30,7 @@ import serpy
|
|||
# NOTE: This should be in other place, for example taiga.base.api.serializers
|
||||
|
||||
|
||||
class JsonField(serializers.WritableField):
|
||||
class JSONField(serializers.WritableField):
|
||||
"""
|
||||
Json objects serializer.
|
||||
"""
|
||||
|
@ -95,12 +95,12 @@ class I18NField(Field):
|
|||
return _(ret)
|
||||
|
||||
|
||||
class I18NJsonField(Field):
|
||||
class I18NJSONField(Field):
|
||||
"""
|
||||
Json objects serializer.
|
||||
"""
|
||||
def __init__(self, i18n_fields=(), *args, **kwargs):
|
||||
super(I18NJsonField, self).__init__(*args, **kwargs)
|
||||
super(I18NJSONField, self).__init__(*args, **kwargs)
|
||||
self.i18n_fields = i18n_fields
|
||||
|
||||
def translate_values(self, d):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -22,7 +22,7 @@ from dateutil.parser import parse as parse_date
|
|||
|
||||
from django.apps import apps
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db.models import Q
|
||||
from django.db.models import Q, OuterRef, Subquery
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from taiga.base import exceptions as exc
|
||||
|
@ -32,6 +32,30 @@ from taiga.base.utils.db import to_tsquery
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_filter_expression_can_view_projects(user, project_id=None):
|
||||
# Filter by user permissions
|
||||
if user.is_authenticated() and user.is_superuser:
|
||||
return Q()
|
||||
elif user.is_authenticated():
|
||||
# authenticated user & project member
|
||||
membership_model = apps.get_model("projects", "Membership")
|
||||
memberships_qs = membership_model.objects.filter(user=user)
|
||||
if project_id:
|
||||
memberships_qs = memberships_qs.filter(project_id=project_id)
|
||||
memberships_qs = memberships_qs.filter(
|
||||
Q(role__permissions__contains=['view_project']) |
|
||||
Q(is_admin=True))
|
||||
|
||||
projects_list = [membership.project_id for membership in
|
||||
memberships_qs]
|
||||
|
||||
return (Q(id__in=projects_list) |
|
||||
Q(public_permissions__contains=["view_project"]))
|
||||
else:
|
||||
# external users / anonymous
|
||||
return Q(anon_permissions__contains=["view_project"])
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Base and Mixins
|
||||
#####################################################################
|
||||
|
@ -105,7 +129,8 @@ class OrderByFilterMixin(QueryParamsFilterMixin):
|
|||
if raw_fieldname in ["owner", "-owner", "assigned_to", "-assigned_to"]:
|
||||
raw_fieldname = "{}__full_name".format(raw_fieldname)
|
||||
|
||||
return super().filter_queryset(request, queryset.order_by(raw_fieldname), view)
|
||||
# We need to add a default order if raw_fieldname gives rows with the same value
|
||||
return super().filter_queryset(request, queryset.order_by(raw_fieldname, "-id"), view)
|
||||
|
||||
|
||||
class FilterBackend(OrderByFilterMixin):
|
||||
|
@ -115,6 +140,17 @@ class FilterBackend(OrderByFilterMixin):
|
|||
pass
|
||||
|
||||
|
||||
class FilterModelAssignedUsers:
|
||||
def get_assigned_users_filter(self, model, value):
|
||||
assigned_users_ids = model.objects.order_by().filter(
|
||||
assigned_users__in=value, id=OuterRef('pk')).values('pk')
|
||||
|
||||
assigned_user_filter = Q(pk__in=Subquery(assigned_users_ids))
|
||||
assigned_to_filter = Q(assigned_to__in=value)
|
||||
|
||||
return Q(assigned_user_filter | assigned_to_filter)
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Permissions filters
|
||||
#####################################################################
|
||||
|
@ -339,14 +375,18 @@ class IsProjectAdminFromWebhookLogFilterBackend(FilterBackend, BaseIsProjectAdmi
|
|||
class BaseRelatedFieldsFilter(FilterBackend):
|
||||
filter_name = None
|
||||
param_name = None
|
||||
exclude_param_name = None
|
||||
|
||||
def __init__(self, filter_name=None, param_name=None):
|
||||
def __init__(self, filter_name=None, param_name=None, exclude_param_name=None):
|
||||
if filter_name:
|
||||
self.filter_name = filter_name
|
||||
|
||||
if param_name:
|
||||
self.param_name = param_name
|
||||
|
||||
if exclude_param_name:
|
||||
self.exclude_param_name
|
||||
|
||||
def _prepare_filter_data(self, query_param_value):
|
||||
def _transform_value(value):
|
||||
try:
|
||||
|
@ -360,75 +400,139 @@ class BaseRelatedFieldsFilter(FilterBackend):
|
|||
values = map(_transform_value, values)
|
||||
return list(values)
|
||||
|
||||
def _get_queryparams(self, params):
|
||||
param_name = self.param_name or self.filter_name
|
||||
def _get_queryparams(self, params, mode=''):
|
||||
param_name = self.exclude_param_name if mode == 'exclude' else self.param_name or self.filter_name
|
||||
raw_value = params.get(param_name, None)
|
||||
|
||||
if raw_value:
|
||||
value = self._prepare_filter_data(raw_value)
|
||||
|
||||
if None in value:
|
||||
qs_in_kwargs = {"{}__in".format(self.filter_name): [v for v in value if v is not None]}
|
||||
qs_isnull_kwargs = {"{}__isnull".format(self.filter_name): True}
|
||||
return Q(**qs_in_kwargs) | Q(**qs_isnull_kwargs)
|
||||
else:
|
||||
return {"{}__in".format(self.filter_name): value}
|
||||
return Q(**{"{}__in".format(self.filter_name): value})
|
||||
|
||||
return None
|
||||
|
||||
def _prepare_filter_query(self, query):
|
||||
return query
|
||||
|
||||
def _prepare_exclude_query(self, query):
|
||||
return ~Q(query)
|
||||
|
||||
def filter_queryset(self, request, queryset, view):
|
||||
query = self._get_queryparams(request.QUERY_PARAMS)
|
||||
if query:
|
||||
if isinstance(query, dict):
|
||||
queryset = queryset.filter(**query)
|
||||
else:
|
||||
queryset = queryset.filter(query)
|
||||
operations = {
|
||||
"filter": self._prepare_filter_query,
|
||||
"exclude": self._prepare_exclude_query,
|
||||
}
|
||||
|
||||
for mode, prepare_method in operations.items():
|
||||
query = self._get_queryparams(request.QUERY_PARAMS, mode=mode)
|
||||
if query:
|
||||
queryset = queryset.filter(prepare_method(query))
|
||||
|
||||
return super().filter_queryset(request, queryset, view)
|
||||
|
||||
|
||||
class OwnersFilter(BaseRelatedFieldsFilter):
|
||||
filter_name = 'owner'
|
||||
exclude_param_name = 'exclude_owner'
|
||||
|
||||
|
||||
class AssignedToFilter(BaseRelatedFieldsFilter):
|
||||
filter_name = 'assigned_to'
|
||||
exclude_param_name = 'exclude_assigned_to'
|
||||
|
||||
|
||||
class AssignedUsersFilter(FilterModelAssignedUsers, BaseRelatedFieldsFilter):
|
||||
filter_name = 'assigned_users'
|
||||
exclude_param_name = 'exclude_assigned_users'
|
||||
|
||||
def _get_queryparams(self, params, mode=''):
|
||||
param_name = self.exclude_param_name if mode == 'exclude' else self.param_name or self.filter_name
|
||||
raw_value = params.get(param_name, None)
|
||||
if raw_value:
|
||||
value = self._prepare_filter_data(raw_value)
|
||||
UserStoryModel = apps.get_model("userstories", "UserStory")
|
||||
|
||||
if None in value:
|
||||
value.remove(None)
|
||||
assigned_users_ids = UserStoryModel.objects.order_by().filter(
|
||||
assigned_users__isnull=True,
|
||||
id=OuterRef('pk')).values('pk')
|
||||
|
||||
assigned_user_filter_none = Q(pk__in=Subquery(assigned_users_ids))
|
||||
assigned_to_filter_none = Q(assigned_to__isnull=True)
|
||||
|
||||
return (self.get_assigned_users_filter(UserStoryModel, value)
|
||||
| Q(assigned_user_filter_none, assigned_to_filter_none))
|
||||
else:
|
||||
return self.get_assigned_users_filter(UserStoryModel, value)
|
||||
|
||||
return None
|
||||
|
||||
|
||||
class StatusesFilter(BaseRelatedFieldsFilter):
|
||||
filter_name = 'status'
|
||||
exclude_param_name = 'exclude_status'
|
||||
|
||||
|
||||
class IssueTypesFilter(BaseRelatedFieldsFilter):
|
||||
filter_name = 'type'
|
||||
param_name = 'type'
|
||||
exclude_param_name = 'exclude_type'
|
||||
|
||||
|
||||
class PrioritiesFilter(BaseRelatedFieldsFilter):
|
||||
filter_name = 'priority'
|
||||
exclude_param_name = 'exclude_priority'
|
||||
|
||||
|
||||
class SeveritiesFilter(BaseRelatedFieldsFilter):
|
||||
filter_name = 'severity'
|
||||
exclude_param_name = 'exclude_severity'
|
||||
|
||||
|
||||
class TagsFilter(FilterBackend):
|
||||
filter_name = 'tags'
|
||||
exclude_param_name = 'exclude_tags'
|
||||
|
||||
def __init__(self, filter_name=None):
|
||||
def __init__(self, filter_name=None, exclude_param_name=None):
|
||||
if filter_name:
|
||||
self.filter_name = filter_name
|
||||
|
||||
def _get_tags_queryparams(self, params):
|
||||
tags = params.get(self.filter_name, None)
|
||||
if exclude_param_name:
|
||||
self.exclude_param_name = exclude_param_name
|
||||
|
||||
def _get_tags_queryparams(self, params, mode=''):
|
||||
param_name = self.exclude_param_name if mode == "exclude" else self.filter_name
|
||||
tags = params.get(param_name, None)
|
||||
if tags:
|
||||
return tags.split(",")
|
||||
|
||||
return None
|
||||
|
||||
def _prepare_filter_query(self, query):
|
||||
return Q(tags__contains=query)
|
||||
|
||||
def _prepare_exclude_query(self, tags):
|
||||
queries = [Q(tags__contains=[tag]) for tag in tags]
|
||||
query = queries.pop()
|
||||
for item in queries:
|
||||
query |= item
|
||||
|
||||
return ~Q(query)
|
||||
|
||||
def filter_queryset(self, request, queryset, view):
|
||||
query_tags = self._get_tags_queryparams(request.QUERY_PARAMS)
|
||||
if query_tags:
|
||||
queryset = queryset.filter(tags__contains=query_tags)
|
||||
operations = {
|
||||
"filter": self._prepare_filter_query,
|
||||
"exclude": self._prepare_exclude_query,
|
||||
}
|
||||
|
||||
for mode, prepare_method in operations.items():
|
||||
query = self._get_tags_queryparams(request.QUERY_PARAMS, mode=mode)
|
||||
if query:
|
||||
queryset = queryset.filter(prepare_method(query))
|
||||
|
||||
return super().filter_queryset(request, queryset, view)
|
||||
|
||||
|
@ -526,6 +630,22 @@ class FinishDateFilter(BaseDateFilter):
|
|||
filter_name_base = "finish_date"
|
||||
|
||||
|
||||
class EstimatedStartFilter(BaseDateFilter):
|
||||
filter_name_base = "estimated_start"
|
||||
|
||||
|
||||
class EstimatedFinishFilter(BaseDateFilter):
|
||||
filter_name_base = "estimated_finish"
|
||||
|
||||
|
||||
class MilestoneEstimatedStartFilter(BaseDateFilter):
|
||||
filter_name_base = "milestone__estimated_start"
|
||||
|
||||
|
||||
class MilestoneEstimatedFinishFilter(BaseDateFilter):
|
||||
filter_name_base = "milestone__estimated_finish"
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Text search filters
|
||||
#####################################################################
|
||||
|
@ -536,13 +656,62 @@ class QFilter(FilterBackend):
|
|||
if q:
|
||||
table = queryset.model._meta.db_table
|
||||
where_clause = ("""
|
||||
to_tsvector('english_nostop',
|
||||
to_tsvector('simple',
|
||||
coalesce({table}.subject, '') || ' ' ||
|
||||
coalesce(array_to_string({table}.tags, ' '), '') || ' ' ||
|
||||
coalesce({table}.ref) || ' ' ||
|
||||
coalesce({table}.description, '')) @@ to_tsquery('english_nostop', %s)
|
||||
coalesce({table}.description, '')) @@ to_tsquery('simple', %s)
|
||||
""".format(table=table))
|
||||
|
||||
queryset = queryset.extra(where=[where_clause], params=[to_tsquery(q)])
|
||||
|
||||
return queryset
|
||||
|
||||
|
||||
class RoleFilter(BaseRelatedFieldsFilter):
|
||||
filter_name = "role_id"
|
||||
param_name = "role"
|
||||
exclude_param_name = "exclude_role"
|
||||
|
||||
def filter_queryset(self, request, queryset, view):
|
||||
Membership = apps.get_model('projects', 'Membership')
|
||||
|
||||
operations = {
|
||||
"filter": self._prepare_filter_query,
|
||||
"exclude": self._prepare_exclude_query,
|
||||
}
|
||||
|
||||
for mode, qs_method in operations.items():
|
||||
query = self._get_queryparams(request.QUERY_PARAMS, mode=mode)
|
||||
if query:
|
||||
memberships = Membership.objects.filter(query).exclude(user__isnull=True).values_list("user_id", flat=True)
|
||||
if memberships:
|
||||
queryset = queryset.filter(qs_method(Q(assigned_to__in=memberships)))
|
||||
|
||||
return FilterBackend.filter_queryset(self, request, queryset, view)
|
||||
|
||||
|
||||
class UserStoriesRoleFilter(FilterModelAssignedUsers, BaseRelatedFieldsFilter):
|
||||
filter_name = "role_id"
|
||||
param_name = "role"
|
||||
exclude_param_name = 'exclude_role'
|
||||
|
||||
def filter_queryset(self, request, queryset, view):
|
||||
Membership = apps.get_model('projects', 'Membership')
|
||||
|
||||
operations = {
|
||||
"filter": self._prepare_filter_query,
|
||||
"exclude": self._prepare_exclude_query,
|
||||
}
|
||||
|
||||
for mode, qs_method in operations.items():
|
||||
query = self._get_queryparams(request.QUERY_PARAMS, mode=mode)
|
||||
if query:
|
||||
memberships = Membership.objects.filter(query).exclude(user__isnull=True).values_list("user_id", flat=True)
|
||||
if memberships:
|
||||
user_story_model = apps.get_model("userstories", "UserStory")
|
||||
queryset = queryset.filter(
|
||||
qs_method(Q(self.get_assigned_users_filter(user_story_model, memberships)))
|
||||
)
|
||||
|
||||
return FilterBackend.filter_queryset(self, request, queryset, view)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -18,43 +18,44 @@
|
|||
|
||||
import datetime
|
||||
|
||||
from optparse import make_option
|
||||
|
||||
from django.apps import apps
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.utils import timezone
|
||||
|
||||
from taiga.base.mails import InlineCSSTemplateMail
|
||||
from taiga.base.mails import mail_builder
|
||||
|
||||
from taiga.projects.models import Project, Membership
|
||||
from taiga.projects.history.models import HistoryEntry
|
||||
from taiga.projects.history.services import get_history_queryset_by_model_instance
|
||||
|
||||
from taiga.users.services import get_user_photo_url
|
||||
from taiga.front.templatetags.functions import resolve as resolve_front_url
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
args = '<email>'
|
||||
option_list = BaseCommand.option_list + (
|
||||
make_option('--locale', '-l', default=None, dest='locale',
|
||||
help='Send emails in an specific language.'),
|
||||
)
|
||||
|
||||
help = 'Send an example of all emails'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
if len(args) != 1:
|
||||
print("Usage: ./manage.py test_emails <email-address>")
|
||||
return
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--locale', '-l',
|
||||
default=None,
|
||||
dest='locale',
|
||||
help='Send emails in an specific language.')
|
||||
parser.add_argument('email',
|
||||
help='Emeil address to send sample emails.')
|
||||
|
||||
|
||||
def handle(self, *args, **options):
|
||||
locale = options.get('locale')
|
||||
test_email = args[0]
|
||||
email_address = options.get('email')
|
||||
|
||||
# Register email
|
||||
context = {"lang": locale,
|
||||
"user": get_user_model().objects.all().order_by("?").first(),
|
||||
"cancel_token": "cancel-token"}
|
||||
|
||||
email = mail_builder.registered_user(test_email, context)
|
||||
email = mail_builder.registered_user(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Membership invitation
|
||||
|
@ -63,13 +64,13 @@ class Command(BaseCommand):
|
|||
membership.invitation_extra_text = "Text example, Text example,\nText example,\n\nText example"
|
||||
|
||||
context = {"lang": locale, "membership": membership}
|
||||
email = mail_builder.membership_invitation(test_email, context)
|
||||
email = mail_builder.membership_invitation(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Membership notification
|
||||
context = {"lang": locale,
|
||||
"membership": Membership.objects.order_by("?").filter(user__isnull=False).first()}
|
||||
email = mail_builder.membership_notification(test_email, context)
|
||||
email = mail_builder.membership_notification(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Feedback
|
||||
|
@ -85,17 +86,17 @@ class Command(BaseCommand):
|
|||
"key2": "value2",
|
||||
},
|
||||
}
|
||||
email = mail_builder.feedback_notification(test_email, context)
|
||||
email = mail_builder.feedback_notification(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Password recovery
|
||||
context = {"lang": locale, "user": get_user_model().objects.all().order_by("?").first()}
|
||||
email = mail_builder.password_recovery(test_email, context)
|
||||
email = mail_builder.password_recovery(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Change email
|
||||
context = {"lang": locale, "user": get_user_model().objects.all().order_by("?").first()}
|
||||
email = mail_builder.change_email(test_email, context)
|
||||
email = mail_builder.change_email(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Export/Import emails
|
||||
|
@ -106,7 +107,7 @@ class Command(BaseCommand):
|
|||
"error_subject": "Error generating project dump",
|
||||
"error_message": "Error generating project dump",
|
||||
}
|
||||
email = mail_builder.export_error(test_email, context)
|
||||
email = mail_builder.export_error(email_address, context)
|
||||
email.send()
|
||||
context = {
|
||||
"lang": locale,
|
||||
|
@ -114,7 +115,7 @@ class Command(BaseCommand):
|
|||
"error_subject": "Error importing project dump",
|
||||
"error_message": "Error importing project dump",
|
||||
}
|
||||
email = mail_builder.import_error(test_email, context)
|
||||
email = mail_builder.import_error(email_address, context)
|
||||
email.send()
|
||||
|
||||
deletion_date = timezone.now() + datetime.timedelta(seconds=60*60*24)
|
||||
|
@ -125,7 +126,7 @@ class Command(BaseCommand):
|
|||
"project": Project.objects.all().order_by("?").first(),
|
||||
"deletion_date": deletion_date,
|
||||
}
|
||||
email = mail_builder.dump_project(test_email, context)
|
||||
email = mail_builder.dump_project(email_address, context)
|
||||
email.send()
|
||||
|
||||
context = {
|
||||
|
@ -133,7 +134,7 @@ class Command(BaseCommand):
|
|||
"user": get_user_model().objects.all().order_by("?").first(),
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
}
|
||||
email = mail_builder.load_dump(test_email, context)
|
||||
email = mail_builder.load_dump(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Notification emails
|
||||
|
@ -187,39 +188,96 @@ class Command(BaseCommand):
|
|||
|
||||
cls = type("InlineCSSTemplateMail", (InlineCSSTemplateMail,), {"name": notification_email[1]})
|
||||
email = cls()
|
||||
email.send(test_email, context)
|
||||
|
||||
email.send(email_address, context)
|
||||
|
||||
# Transfer Emails
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"requester": User.objects.all().order_by("?").first(),
|
||||
"requester": get_user_model().objects.all().order_by("?").first(),
|
||||
}
|
||||
email = mail_builder.transfer_request(test_email, context)
|
||||
email = mail_builder.transfer_request(email_address, context)
|
||||
email.send()
|
||||
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"receiver": User.objects.all().order_by("?").first(),
|
||||
"receiver": get_user_model().objects.all().order_by("?").first(),
|
||||
"token": "test-token",
|
||||
"reason": "Test reason"
|
||||
}
|
||||
email = mail_builder.transfer_start(test_email, context)
|
||||
email = mail_builder.transfer_start(email_address, context)
|
||||
email.send()
|
||||
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"old_owner": User.objects.all().order_by("?").first(),
|
||||
"new_owner": User.objects.all().order_by("?").first(),
|
||||
"old_owner": get_user_model().objects.all().order_by("?").first(),
|
||||
"new_owner": get_user_model().objects.all().order_by("?").first(),
|
||||
"reason": "Test reason"
|
||||
}
|
||||
email = mail_builder.transfer_accept(test_email, context)
|
||||
email = mail_builder.transfer_accept(email_address, context)
|
||||
email.send()
|
||||
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"rejecter": User.objects.all().order_by("?").first(),
|
||||
"rejecter": get_user_model().objects.all().order_by("?").first(),
|
||||
"reason": "Test reason"
|
||||
}
|
||||
email = mail_builder.transfer_reject(test_email, context)
|
||||
email = mail_builder.transfer_reject(email_address, context)
|
||||
email.send()
|
||||
|
||||
|
||||
# Contact with project admins email
|
||||
project = Project.objects.all().order_by("?").first()
|
||||
user = get_user_model().objects.all().order_by("?").first()
|
||||
context = {
|
||||
"full_name": user.get_full_name(),
|
||||
"project_name": project.name,
|
||||
"photo_url": get_user_photo_url(user),
|
||||
"user_profile_url": resolve_front_url("user", user.username),
|
||||
"project_settings_url": resolve_front_url("project-admin", project.slug),
|
||||
"comment": "Test comment notification."
|
||||
}
|
||||
email = mail_builder.contact_notification(email_address, context)
|
||||
email.send()
|
||||
|
||||
# GitHub importer email
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"user": get_user_model().objects.all().order_by("?").first()
|
||||
}
|
||||
email = mail_builder.github_import_success(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Jira importer email
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"user": get_user_model().objects.all().order_by("?").first()
|
||||
}
|
||||
email = mail_builder.jira_import_success(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Trello importer email
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"user": get_user_model().objects.all().order_by("?").first()
|
||||
}
|
||||
email = mail_builder.trello_import_success(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Asana importer email
|
||||
context = {
|
||||
"project": Project.objects.all().order_by("?").first(),
|
||||
"user": get_user_model().objects.all().order_by("?").first()
|
||||
}
|
||||
email = mail_builder.asana_import_success(email_address, context)
|
||||
email.send()
|
||||
|
||||
# Error importer email
|
||||
context = {
|
||||
"user": get_user_model().objects.all().order_by("?").first(),
|
||||
"error_subject": "Error importing GitHub project",
|
||||
"error_message": "Error importing GitHub project",
|
||||
"project": 1234,
|
||||
"exception": "Exception message"
|
||||
}
|
||||
email = mail_builder.importer_import_error(email_address, context)
|
||||
email.send()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2016 Anler Hernández <hello@anler.me>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Anler Hernández <hello@anler.me>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2016 Anler Hernández <hello@anler.me>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Anler Hernández <hello@anler.me>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
import itertools
|
||||
from collections import namedtuple
|
||||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.urlresolvers import NoReverseMatch
|
||||
|
||||
|
@ -79,7 +79,7 @@ class BaseRouter(object):
|
|||
@property
|
||||
def urls(self):
|
||||
if not hasattr(self, '_urls'):
|
||||
self._urls = patterns('', *self.get_urls())
|
||||
self._urls = self.get_urls()
|
||||
return self._urls
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.be>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.be>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
@ -18,20 +18,18 @@
|
|||
|
||||
from django.apps import apps
|
||||
from django.db import models, connection
|
||||
from django.db.utils import DEFAULT_DB_ALIAS, ConnectionHandler
|
||||
from django.db.models.signals import pre_save, post_delete
|
||||
from django.dispatch import Signal
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
from django.dispatch import Signal
|
||||
|
||||
cleanup_pre_delete = Signal(providing_args=["file"])
|
||||
cleanup_post_delete = Signal(providing_args=["file"])
|
||||
|
||||
|
||||
|
||||
def _find_models_with_filefield():
|
||||
result = []
|
||||
for model in apps.get_models():
|
||||
|
@ -50,7 +48,7 @@ def _delete_file(file_obj):
|
|||
cleanup_post_delete.send(sender=None, file=file_obj)
|
||||
except Exception:
|
||||
logger.exception("Unexpected exception while attempting "
|
||||
"to delete old file '%s'".format(file_obj.name))
|
||||
"to delete old file '%s'".format(file_obj.name))
|
||||
|
||||
storage = file_obj.storage
|
||||
if storage and storage.exists(file_obj.name):
|
||||
|
@ -90,9 +88,6 @@ def remove_files_on_delete(sender, instance, **kwargs):
|
|||
|
||||
|
||||
def connect_cleanup_files_signals():
|
||||
connections = ConnectionHandler()
|
||||
backend = connections[DEFAULT_DB_ALIAS]
|
||||
|
||||
for model in _find_models_with_filefield():
|
||||
pre_save.connect(remove_files_on_change, sender=model)
|
||||
post_delete.connect(remove_files_on_delete, sender=model)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.be>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.be>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
|
||||
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
|
||||
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
|
||||
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue