mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-17 06:30:25 +00:00
Compare commits
731 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7770da8a49 | ||
|
|
bbfa3daa0c | ||
|
|
933489a491 | ||
|
|
2a5156005b | ||
|
|
ca28d88c88 | ||
|
|
9227439625 | ||
|
|
78112a85bd | ||
|
|
951c7e5bcf | ||
|
|
5608ae91ea | ||
|
|
8cee4de75d | ||
|
|
f5ee0d12c3 | ||
|
|
245b5911e6 | ||
|
|
39c6d80b7b | ||
|
|
2c6e5f004a | ||
|
|
f893867652 | ||
|
|
9025d59308 | ||
|
|
5fa2670643 | ||
|
|
acc36d9e3e | ||
|
|
d76590de4c | ||
|
|
eba98f9cae | ||
|
|
65c7f21730 | ||
|
|
c59a19f336 | ||
|
|
49f569cc6c | ||
|
|
08867d7e13 | ||
|
|
c724c332c6 | ||
|
|
fbd1ab5931 | ||
|
|
74788d96ff | ||
|
|
09ed44fe56 | ||
|
|
5425e37524 | ||
|
|
ccdbfdd013 | ||
|
|
93a7a213df | ||
|
|
673b0f8eb6 | ||
|
|
fbd3caf0e3 | ||
|
|
77ed1eb117 | ||
|
|
58f38b55cd | ||
|
|
bfe2a8b207 | ||
|
|
26727eb2a5 | ||
|
|
ddc1e39cea | ||
|
|
7ea3d7fc28 | ||
|
|
439f250423 | ||
|
|
69d0387b6d | ||
|
|
32f5c93c84 | ||
|
|
6473fbea4d | ||
|
|
c056ad816e | ||
|
|
769bd37a9a | ||
|
|
9d7286b5aa | ||
|
|
a7be23c4d9 | ||
|
|
3c20e75a0d | ||
|
|
bdfcc5a65b | ||
|
|
18c8c95443 | ||
|
|
563a330db1 | ||
|
|
78e18161dc | ||
|
|
85a5d3b291 | ||
|
|
e8bde774cf | ||
|
|
f60fb8530c | ||
|
|
18d0d18edd | ||
|
|
c4462f79d2 | ||
|
|
ffb7f2d595 | ||
|
|
09545a663e | ||
|
|
0cbaf7f089 | ||
|
|
b285164379 | ||
|
|
7a754a3469 | ||
|
|
2f1959b43e | ||
|
|
2473fa3069 | ||
|
|
f212393331 | ||
|
|
8636f6ce98 | ||
|
|
6ae2354d2a | ||
|
|
8169c11e31 | ||
|
|
2091f9649d | ||
|
|
6263f2a340 | ||
|
|
647260dfb7 | ||
|
|
5f0c3c323d | ||
|
|
75c7d4180a | ||
|
|
68eb9c7c59 | ||
|
|
394b04c2f9 | ||
|
|
5d4ba598d7 | ||
|
|
d44f64f3fd | ||
|
|
26fc9ff235 | ||
|
|
cfe9c1ffa2 | ||
|
|
606118cb04 | ||
|
|
27421081d4 | ||
|
|
90713245bc | ||
|
|
b01ff0b2f6 | ||
|
|
f86f5a1ee2 | ||
|
|
be3a67b9c5 | ||
|
|
4a715d95c0 | ||
|
|
33b41fa311 | ||
|
|
e3822dee39 | ||
|
|
e7200b7b65 | ||
|
|
cce430242c | ||
|
|
2c73396391 | ||
|
|
c8a4153a4d | ||
|
|
9db0b200ff | ||
|
|
aac3e1062b | ||
|
|
c34a0dab19 | ||
|
|
cf822c745b | ||
|
|
28702ef165 | ||
|
|
18fae8d5ed | ||
|
|
dcb43cdb02 | ||
|
|
4aa18f3a8d | ||
|
|
f8bd4be24c | ||
|
|
1054fb25fd | ||
|
|
2b5c180792 | ||
|
|
a95e211d65 | ||
|
|
b20ec951c3 | ||
|
|
047ed08a8a | ||
|
|
a10ff4637b | ||
|
|
1d43c71829 | ||
|
|
4d7b7e6fb0 | ||
|
|
0239a1b96a | ||
|
|
d4065666c6 | ||
|
|
8d41a222b7 | ||
|
|
fdcdf5a484 | ||
|
|
a2a657aa40 | ||
|
|
28cefe56c3 | ||
|
|
c771d1a71a | ||
|
|
b50ede9f6f | ||
|
|
1187eb8709 | ||
|
|
59d95693b7 | ||
|
|
fe52529ceb | ||
|
|
1e8a6e495b | ||
|
|
9224d937d3 | ||
|
|
9f95eb13ef | ||
|
|
ddd126abfc | ||
|
|
59197a4713 | ||
|
|
74103e2100 | ||
|
|
5261650544 | ||
|
|
8e8b48a3f2 | ||
|
|
19dac42021 | ||
|
|
2399dad123 | ||
|
|
611f44aa85 | ||
|
|
da8b7ad73c | ||
|
|
24a8be2d1d | ||
|
|
7f2ae25920 | ||
|
|
0d401c2b9a | ||
|
|
bd35ffc676 | ||
|
|
f3dc001f3a | ||
|
|
36e8889f84 | ||
|
|
b1bf34bdd2 | ||
|
|
d9b3d2c8a6 | ||
|
|
38198c2d9f | ||
|
|
336bb3753d | ||
|
|
73b95eaa70 | ||
|
|
fb05f25084 | ||
|
|
7d2f5b1251 | ||
|
|
4bcc02f735 | ||
|
|
23c256d6a0 | ||
|
|
3b09d8b02d | ||
|
|
e9db0de137 | ||
|
|
49523a3ae8 | ||
|
|
986d7e7fea | ||
|
|
23ea5d6065 | ||
|
|
702b3cd611 | ||
|
|
39d02f4190 | ||
|
|
e74593d4b4 | ||
|
|
829840f411 | ||
|
|
37be02f1c6 | ||
|
|
00522b6c9e | ||
|
|
fdc5563cba | ||
|
|
fdd938b1ac | ||
|
|
eafe2ac7c1 | ||
|
|
f0a5ac67e4 | ||
|
|
a373875c0d | ||
|
|
5511b4dc8d | ||
|
|
d9a6da6e52 | ||
|
|
830bffcf11 | ||
|
|
0b923103f3 | ||
|
|
e7df67e150 | ||
|
|
41133b2b9c | ||
|
|
babe7a70c7 | ||
|
|
23f7f9479a | ||
|
|
754f5dab56 | ||
|
|
f223b85422 | ||
|
|
92e7d52c47 | ||
|
|
cb91aabcf4 | ||
|
|
54f710055a | ||
|
|
e7a40e1806 | ||
|
|
3bf33946c6 | ||
|
|
c532393b97 | ||
|
|
5849d80dcb | ||
|
|
f3ff443373 | ||
|
|
f5701e5c15 | ||
|
|
d3d3fbe991 | ||
|
|
5bd01187d4 | ||
|
|
77fd9401bb | ||
|
|
9872521f6f | ||
|
|
3fbc396fa2 | ||
|
|
8189b9cfaa | ||
|
|
5f9707e467 | ||
|
|
4bdaba8932 | ||
|
|
599ec2d236 | ||
|
|
c7ddb60c3b | ||
|
|
ac531c3941 | ||
|
|
cb9d43e86f | ||
|
|
b2077ba4b8 | ||
|
|
6b1f819770 | ||
|
|
3632af362d | ||
|
|
718b0b7524 | ||
|
|
03f4df0121 | ||
|
|
cbf1263593 | ||
|
|
17641045e8 | ||
|
|
20b5b2ab72 | ||
|
|
25679c7fa3 | ||
|
|
d69729e52f | ||
|
|
eb3ba7e98a | ||
|
|
afa944e5ff | ||
|
|
03dea3c00b | ||
|
|
8a51b321f3 | ||
|
|
664aeb24ec | ||
|
|
1802fce73d | ||
|
|
de3905cd4b | ||
|
|
a51eb82f6b | ||
|
|
a67db4c46a | ||
|
|
0649044717 | ||
|
|
ff3cbd413a | ||
|
|
b089a4027c | ||
|
|
59990bbef5 | ||
|
|
7d86cfc000 | ||
|
|
cde4de20c8 | ||
|
|
84ae23b903 | ||
|
|
d61b9922ce | ||
|
|
a6e7755a55 | ||
|
|
8809ae2089 | ||
|
|
dda1211f43 | ||
|
|
836d85668e | ||
|
|
a20c98d6d4 | ||
|
|
e74c603bda | ||
|
|
6144278a9e | ||
|
|
03ebd91f78 | ||
|
|
2f43a66055 | ||
|
|
7e7542ef2b | ||
|
|
84bf9f2073 | ||
|
|
b341d763f0 | ||
|
|
d12f82d241 | ||
|
|
7032e19e2e | ||
|
|
3d79503b58 | ||
|
|
d51069ade8 | ||
|
|
bd8cf8c686 | ||
|
|
5ab2bad9a0 | ||
|
|
42808d5bb5 | ||
|
|
50df9addc2 | ||
|
|
5ff619979f | ||
|
|
f0e9db3ee5 | ||
|
|
92e58112eb | ||
|
|
c64aeee0ef | ||
|
|
2079a7be9b | ||
|
|
b30f91e5b8 | ||
|
|
0b7c7dba8b | ||
|
|
20e86a7a28 | ||
|
|
af82d2b9b1 | ||
|
|
606db2fe7a | ||
|
|
4c35c506a7 | ||
|
|
4a4b11176e | ||
|
|
09fcceef13 | ||
|
|
4072d4c009 | ||
|
|
34b98fb8ac | ||
|
|
930375e3b2 | ||
|
|
ca86c60499 | ||
|
|
d9530074e4 | ||
|
|
b8ab2e4408 | ||
|
|
d1f5e060f8 | ||
|
|
f66ac09bdf | ||
|
|
2f8f890ce0 | ||
|
|
b169d28653 | ||
|
|
ee445acadf | ||
|
|
cd65542d03 | ||
|
|
a32fdb1f30 | ||
|
|
ff721a2ef6 | ||
|
|
e694d23ec8 | ||
|
|
5fa2f53e13 | ||
|
|
a7feb05ca4 | ||
|
|
cfce0f4afb | ||
|
|
2b044712b6 | ||
|
|
690401d604 | ||
|
|
eb768817f3 | ||
|
|
087a918542 | ||
|
|
33b83ead5f | ||
|
|
b492f0a166 | ||
|
|
cfba14384e | ||
|
|
7806053516 | ||
|
|
08f38c26c2 | ||
|
|
7f830c8aeb | ||
|
|
bf21d8dac4 | ||
|
|
35cb0bcc75 | ||
|
|
fa86f85afc | ||
|
|
3ddaaefba4 | ||
|
|
9e29500f5c | ||
|
|
1aa4ee36d6 | ||
|
|
361aeda9da | ||
|
|
f0f9074ca2 | ||
|
|
7c3bc1e0b0 | ||
|
|
68cc955fce | ||
|
|
3b0526b335 | ||
|
|
03261fa461 | ||
|
|
bb127c9483 | ||
|
|
bab18c97c1 | ||
|
|
966e549ace | ||
|
|
6f531ea09f | ||
|
|
8dc0821539 | ||
|
|
29eaa661d5 | ||
|
|
555b022fb2 | ||
|
|
b44fe10e22 | ||
|
|
466ae1d5b7 | ||
|
|
eb204104bd | ||
|
|
6ff47746df | ||
|
|
e8c5e9ec52 | ||
|
|
ee0c1b0031 | ||
|
|
b7b0d9ba8c | ||
|
|
3c7fc0fc0e | ||
|
|
26ba68115f | ||
|
|
1b7b803b1b | ||
|
|
0210ea8f07 | ||
|
|
45b7aea7f6 | ||
|
|
5f76d84e72 | ||
|
|
ac0f5da4f6 | ||
|
|
be1080c43d | ||
|
|
4959a095c4 | ||
|
|
3844a952c0 | ||
|
|
738e3a9dd8 | ||
|
|
e7f8170237 | ||
|
|
af11cb012e | ||
|
|
e5f1940f3e | ||
|
|
57ef2a428c | ||
|
|
69f2a357f8 | ||
|
|
52c337a72c | ||
|
|
acae0a2620 | ||
|
|
99ae00a0ae | ||
|
|
802265b60f | ||
|
|
ee2ca9feff | ||
|
|
ee1c90cd9f | ||
|
|
a7951353a8 | ||
|
|
7dbf50426f | ||
|
|
d62b612583 | ||
|
|
f7ef575709 | ||
|
|
82d9e7ae65 | ||
|
|
4089ad4aab | ||
|
|
555588f13c | ||
|
|
ae39a26e13 | ||
|
|
598b0a704f | ||
|
|
14d2a20431 | ||
|
|
6273e68dde | ||
|
|
76ab676530 | ||
|
|
ef77c8242d | ||
|
|
4cfe10e645 | ||
|
|
fb0e73a37e | ||
|
|
5ed5123836 | ||
|
|
9e4d2ec039 | ||
|
|
82e56bdae5 | ||
|
|
f1f9f6e83e | ||
|
|
3cc592a906 | ||
|
|
2004df71bb | ||
|
|
0f7c880907 | ||
|
|
7090d00265 | ||
|
|
ab8770fb16 | ||
|
|
62ec7771d2 | ||
|
|
cded4c4027 | ||
|
|
a9a9d4574e | ||
|
|
da632d2841 | ||
|
|
29425ea5e4 | ||
|
|
d1a4b849ab | ||
|
|
9957e782c3 | ||
|
|
82934d4445 | ||
|
|
58b0eb5df7 | ||
|
|
116ae29dab | ||
|
|
854832accd | ||
|
|
944baf62db | ||
|
|
ff8a0a5c27 | ||
|
|
b0a18a13a1 | ||
|
|
54c4bcf933 | ||
|
|
e8c68f5c0c | ||
|
|
8853a0423d | ||
|
|
d2741ced7b | ||
|
|
99b9285f80 | ||
|
|
d528ccc095 | ||
|
|
aeaa45e31a | ||
|
|
0ac9181197 | ||
|
|
ca8f057b5e | ||
|
|
e8b9dcb109 | ||
|
|
f8b5372adf | ||
|
|
3e9c7f13ec | ||
|
|
3daa553898 | ||
|
|
ae0ab23b12 | ||
|
|
5477b7ad36 | ||
|
|
a287898c59 | ||
|
|
c545912561 | ||
|
|
31941ca309 | ||
|
|
fc4f6a5741 | ||
|
|
c0f8839faf | ||
|
|
dba0b1b51c | ||
|
|
fd98d91614 | ||
|
|
bed88973d7 | ||
|
|
783401415d | ||
|
|
daa2623430 | ||
|
|
4f70167f49 | ||
|
|
d5a33da0a3 | ||
|
|
15c90a3388 | ||
|
|
4b4b693ecb | ||
|
|
4506613482 | ||
|
|
da4c86fd87 | ||
|
|
15f2d6a89e | ||
|
|
aeb8a84726 | ||
|
|
bb33879e3b | ||
|
|
60f26b7748 | ||
|
|
90342afba2 | ||
|
|
8def10b2da | ||
|
|
9b7560e720 | ||
|
|
df8334dfa4 | ||
|
|
c6e077250e | ||
|
|
da6ff9f3ce | ||
|
|
a909ab1517 | ||
|
|
91117a8e58 | ||
|
|
2ec6441de3 | ||
|
|
f2d1fbd24f | ||
|
|
f178f2fccd | ||
|
|
e68794def7 | ||
|
|
8ef601e84d | ||
|
|
5d736580a9 | ||
|
|
ec0300fa32 | ||
|
|
18fda874b0 | ||
|
|
84d8d424d0 | ||
|
|
3ca4fa394f | ||
|
|
58dac69ee7 | ||
|
|
0b2efdb5f8 | ||
|
|
06c2e81392 | ||
|
|
4977f269b5 | ||
|
|
153137d4eb | ||
|
|
fff84a6bfe | ||
|
|
47df410c07 | ||
|
|
e2f6bb859e | ||
|
|
0052cd3a9a | ||
|
|
96cde5cc94 | ||
|
|
61ae3ec149 | ||
|
|
7b8b9afa96 | ||
|
|
152059528a | ||
|
|
db63852846 | ||
|
|
d6d1fabf24 | ||
|
|
ec1c1f669a | ||
|
|
89e6cd8db0 | ||
|
|
c2b122fdac | ||
|
|
043787ea45 | ||
|
|
b2f4290bf2 | ||
|
|
6e42b9459d | ||
|
|
2a8bab0170 | ||
|
|
1b7382526f | ||
|
|
835992b8d0 | ||
|
|
5cd153736d | ||
|
|
78b063a586 | ||
|
|
121f5b8564 | ||
|
|
2f22eecc1b | ||
|
|
77d4e00158 | ||
|
|
506f58f705 | ||
|
|
35b1125429 | ||
|
|
a9c2d1d198 | ||
|
|
4d5b170e10 | ||
|
|
e57f821ce1 | ||
|
|
3dcb24e8e4 | ||
|
|
322a7793ed | ||
|
|
40052d671d | ||
|
|
c132a7cdd0 | ||
|
|
8935395534 | ||
|
|
876cc2c723 | ||
|
|
e66175ed21 | ||
|
|
ed23fbf09e | ||
|
|
ba2eb5b22d | ||
|
|
d4ca6ec59a | ||
|
|
038313c81c | ||
|
|
4908a9675e | ||
|
|
c007924df0 | ||
|
|
9a8a836141 | ||
|
|
12d19fc0ee | ||
|
|
1337c5fd49 | ||
|
|
b26766deeb | ||
|
|
115c7f9a09 | ||
|
|
261322e9a6 | ||
|
|
075f887837 | ||
|
|
229db4ff86 | ||
|
|
ac2ce6e647 | ||
|
|
5b33fcde51 | ||
|
|
07789f566f | ||
|
|
16842e8e33 | ||
|
|
2a462e6846 | ||
|
|
aefd7d8df0 | ||
|
|
04bb629a42 | ||
|
|
0862210d4d | ||
|
|
596af4a085 | ||
|
|
847d0ee78f | ||
|
|
8ec6157215 | ||
|
|
7f4b799b1b | ||
|
|
6bd314631b | ||
|
|
8c399fadf8 | ||
|
|
a1a94676a4 | ||
|
|
2dcc816e29 | ||
|
|
d433013fcc | ||
|
|
c5737331f0 | ||
|
|
3435331d60 | ||
|
|
03acbe0486 | ||
|
|
473ea98f98 | ||
|
|
4522e65ce6 | ||
|
|
21e18f9adc | ||
|
|
a8cf4554ad | ||
|
|
b94143ca9d | ||
|
|
5b4dba559a | ||
|
|
d41a70143e | ||
|
|
61ce055e70 | ||
|
|
819f8cd677 | ||
|
|
c141efbb45 | ||
|
|
09201f8fba | ||
|
|
e7d4ef4fbc | ||
|
|
673a3027dd | ||
|
|
9f449a6b66 | ||
|
|
6af02f4489 | ||
|
|
ee4dfb4ac6 | ||
|
|
1ef08cc20f | ||
|
|
4288b2568d | ||
|
|
483386635d | ||
|
|
f128b23643 | ||
|
|
3c44a8b930 | ||
|
|
32bcce562e | ||
|
|
2842699b71 | ||
|
|
a6d407b887 | ||
|
|
679a997f80 | ||
|
|
260cabcddf | ||
|
|
550c6b684b | ||
|
|
f61c6648ea | ||
|
|
882da13585 | ||
|
|
a6276c6141 | ||
|
|
2282f9681d | ||
|
|
771af88877 | ||
|
|
5889c5d849 | ||
|
|
187773979b | ||
|
|
5de843313b | ||
|
|
5ab4f33b6a | ||
|
|
3feabdf938 | ||
|
|
74573faf7a | ||
|
|
ecb5ea2bf9 | ||
|
|
7db738d469 | ||
|
|
0f3cfed915 | ||
|
|
d407d804b0 | ||
|
|
dab5e36c10 | ||
|
|
cf77eb0ec5 | ||
|
|
aa6d246fac | ||
|
|
8217789e11 | ||
|
|
142f33f2f6 | ||
|
|
fd6eec2a54 | ||
|
|
ce5566be82 | ||
|
|
653dac411d | ||
|
|
4205660251 | ||
|
|
fa94f81e7f | ||
|
|
3e31974b39 | ||
|
|
973996cfe0 | ||
|
|
6331b94a81 | ||
|
|
56b26fb190 | ||
|
|
3796d312e3 | ||
|
|
7c6f6a7b4a | ||
|
|
793cec7828 | ||
|
|
745f2750fa | ||
|
|
1a860031ee | ||
|
|
80aa636e82 | ||
|
|
7e96b27c5f | ||
|
|
7e0a676ad9 | ||
|
|
f65d7e3722 | ||
|
|
9fad9ff9d1 | ||
|
|
4f904e73fd | ||
|
|
19e2bac445 | ||
|
|
0fe07d4002 | ||
|
|
6589fef693 | ||
|
|
9e8efcd218 | ||
|
|
1bea34ac1a | ||
|
|
807b3776fb | ||
|
|
a5d03899a9 | ||
|
|
9492c8372a | ||
|
|
0de830abf9 | ||
|
|
2ef846a8fa | ||
|
|
1d254c8cae | ||
|
|
12579fdd0e | ||
|
|
c4120fa22a | ||
|
|
da4cf6deb9 | ||
|
|
a826c5e186 | ||
|
|
39aaacccb6 | ||
|
|
4aec1a3836 | ||
|
|
033e0124cf | ||
|
|
433fb51b6a | ||
|
|
1d037f27a2 | ||
|
|
ca93b5ea97 | ||
|
|
26a63473be | ||
|
|
1b798b66bb | ||
|
|
6de616daa5 | ||
|
|
136cac7cf7 | ||
|
|
b580ba7f41 | ||
|
|
9d54ed1650 | ||
|
|
f469e8f25e | ||
|
|
24f67b9c07 | ||
|
|
5037d0e2c9 | ||
|
|
e819e7df02 | ||
|
|
5cfae7a0bc | ||
|
|
2c2214415f | ||
|
|
2f4c1aaf66 | ||
|
|
8ce2c7eeab | ||
|
|
00af2cfbac | ||
|
|
c036fd723f | ||
|
|
670a3ece72 | ||
|
|
2fc9a006a2 | ||
|
|
1f0856b5d3 | ||
|
|
bacf9b66cb | ||
|
|
761651e61a | ||
|
|
1aa9a02957 | ||
|
|
ecaa2ebef0 | ||
|
|
b0ff9abf5f | ||
|
|
8644fb02f9 | ||
|
|
0f56bde069 | ||
|
|
e458766d36 | ||
|
|
ead8ccdc26 | ||
|
|
f19b5dc0a0 | ||
|
|
e7f0611eea | ||
|
|
2a0e08243f | ||
|
|
4dd9d61e2f | ||
|
|
9ee3275fd0 | ||
|
|
4bf06dd6c2 | ||
|
|
330cafa309 | ||
|
|
39bf48ca20 | ||
|
|
b44c66e301 | ||
|
|
7a0f29f2c6 | ||
|
|
6a6b3d5f79 | ||
|
|
b166874c10 | ||
|
|
b22dc3407a | ||
|
|
273a950500 | ||
|
|
6f12cb5e15 | ||
|
|
fb284542f9 | ||
|
|
b586bd007a | ||
|
|
3b0d8f6910 | ||
|
|
d008b3e842 | ||
|
|
dedaadae5f | ||
|
|
7e86c1172e | ||
|
|
04ab4a1f4c | ||
|
|
381361b648 | ||
|
|
bb3988b7b8 | ||
|
|
d0bfca08af | ||
|
|
90c62a33df | ||
|
|
5595b68fb5 | ||
|
|
256efa679e | ||
|
|
5c26287100 | ||
|
|
27544d5a51 | ||
|
|
edcdb00fbd | ||
|
|
48dd204738 | ||
|
|
ab31053e9d | ||
|
|
86d593a577 | ||
|
|
2ccb399c11 | ||
|
|
eefab2dec4 | ||
|
|
8f2f9fa280 | ||
|
|
edec446e30 | ||
|
|
5027b0772b | ||
|
|
56466a61bd | ||
|
|
5974642840 | ||
|
|
7d7be0b696 | ||
|
|
e199b13c3c | ||
|
|
a5d728df66 | ||
|
|
095bc1ad5d | ||
|
|
858d39e5f4 | ||
|
|
2af4aed976 | ||
|
|
9ea725600f | ||
|
|
26eeaf14aa | ||
|
|
911dcb442a | ||
|
|
b88587f682 | ||
|
|
5ae57ac541 | ||
|
|
7e58115e11 | ||
|
|
8e4c155c33 | ||
|
|
5ce79eee08 | ||
|
|
fde3814fdf | ||
|
|
39df8267c4 | ||
|
|
25a9d72322 | ||
|
|
d2d65bdb3f | ||
|
|
af54f424ed | ||
|
|
6d12d7d8e6 | ||
|
|
e6cb526df4 | ||
|
|
e9cfa3545f | ||
|
|
caee5ac214 | ||
|
|
bb32ae8bf2 | ||
|
|
b1c7089556 | ||
|
|
de37dfb1f8 | ||
|
|
320c6b6d4b | ||
|
|
0fe407565d | ||
|
|
305d9029fb | ||
|
|
af2bd4d546 | ||
|
|
1a04f285ff | ||
|
|
01361d214d | ||
|
|
b9e178347b | ||
|
|
806e032032 | ||
|
|
777e82672d | ||
|
|
87d38f0619 | ||
|
|
aaad5636fa | ||
|
|
2be7320425 | ||
|
|
1c503be2d8 | ||
|
|
4fb43db3e8 | ||
|
|
9d6cbe3094 | ||
|
|
39a4d01706 | ||
|
|
90c5c20cb5 | ||
|
|
b7feb5f284 | ||
|
|
4b8b8d8b47 | ||
|
|
45855f9b50 | ||
|
|
5be8972dac | ||
|
|
b3bb9dbf82 | ||
|
|
938369ef50 | ||
|
|
03d5ed03f5 | ||
|
|
bc3c67f375 | ||
|
|
cc6e8467c4 | ||
|
|
b0a8594990 | ||
|
|
d140086dd1 | ||
|
|
9c296ccff5 | ||
|
|
a802dfe8ae | ||
|
|
574037acfe | ||
|
|
c45a544a1d | ||
|
|
4ac722add4 | ||
|
|
d52bc0fe15 | ||
|
|
c1bb642747 | ||
|
|
7827bf0003 | ||
|
|
972968b5b1 | ||
|
|
26211ac3d2 | ||
|
|
d72d7e4deb | ||
|
|
f2c8480a2f | ||
|
|
68c5f11b85 | ||
|
|
4e2a45aab9 | ||
|
|
b389af9bb9 | ||
|
|
4cb6f9fc3f | ||
|
|
f822eedae9 | ||
|
|
83689f37d6 | ||
|
|
1195f38b84 | ||
|
|
0da6f453b7 | ||
|
|
1916f7cba4 | ||
|
|
0690385b4c | ||
|
|
6a9eb0b3b3 | ||
|
|
3ee0bc5da2 |
287 changed files with 15476 additions and 2251 deletions
22
.coveragerc
Normal file
22
.coveragerc
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[run]
|
||||
include =
|
||||
djadmin2*
|
||||
example*
|
||||
omit =
|
||||
*/tests*
|
||||
|
||||
[report]
|
||||
# Regexes for lines to exclude from consideration
|
||||
exclude_lines =
|
||||
# Don't complain about missing debug-only code:
|
||||
def __repr__
|
||||
if self\.debug
|
||||
|
||||
# Don't complain if tests don't hit defensive assertion code:
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
||||
|
||||
# Don't complain if non-runnable code isn't run:
|
||||
if 0:
|
||||
if False:
|
||||
if __name__ == .__main__.:
|
||||
53
.github/workflows/release.yml
vendored
Normal file
53
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'jazzband/django-admin2'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: release-${{ hashFiles('**/setup.py') }}
|
||||
restore-keys: |
|
||||
release-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U setuptools twine wheel
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
python setup.py --version
|
||||
python setup.py sdist --format=gztar bdist_wheel
|
||||
twine check dist/*
|
||||
|
||||
- name: Upload packages to Jazzband
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
user: jazzband
|
||||
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
|
||||
repository_url: https://jazzband.co/projects/django-admin2/upload
|
||||
47
.github/workflows/test.yml
vendored
Normal file
47
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
name: Test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 5
|
||||
matrix:
|
||||
python-version: [3.5, 3.6, 3.7, 3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key:
|
||||
-${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
|
||||
restore-keys: |
|
||||
-${{ matrix.python-version }}-v1-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install --upgrade tox tox-gh-actions
|
||||
|
||||
- name: Tox tests
|
||||
run: |
|
||||
tox -v
|
||||
|
||||
- name: Upload coverage
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
name: Python ${{ matrix.python-version }}
|
||||
25
.gitignore
vendored
25
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
|||
*.py[co]
|
||||
|
||||
# Packages
|
||||
.eggs/
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist
|
||||
|
|
@ -20,10 +21,7 @@ pip-log.txt
|
|||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
# Mr Developer
|
||||
.mr.developer.cfg
|
||||
|
||||
# Django
|
||||
|
|
@ -42,7 +40,6 @@ coverage
|
|||
|
||||
# Sphinx
|
||||
docs/_build
|
||||
docs/_static
|
||||
|
||||
# Launchpad
|
||||
lp-cache
|
||||
|
|
@ -52,4 +49,20 @@ _data
|
|||
logfile
|
||||
|
||||
# SQLite
|
||||
*.db
|
||||
*.db
|
||||
|
||||
# vim swap files
|
||||
*.sw[o-z]
|
||||
|
||||
# Sublime Text
|
||||
*.sublime-workspace
|
||||
*.sublime-project
|
||||
|
||||
# test media upload
|
||||
media
|
||||
|
||||
# PyCharm
|
||||
.idea/
|
||||
|
||||
.cache
|
||||
.pytest_cache
|
||||
10
.travis.yml
10
.travis.yml
|
|
@ -1,10 +0,0 @@
|
|||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
before_install:
|
||||
- export PIP_USE_MIRRORS=true
|
||||
- export PIP_INDEX_URL=https://simple.crate.io/
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
script:
|
||||
- python runtests.py
|
||||
88
AUTHORS.rst
88
AUTHORS.rst
|
|
@ -1,12 +1,21 @@
|
|||
CONTRIBUTORS
|
||||
============
|
||||
|
||||
Project Lead
|
||||
===============
|
||||
------------
|
||||
|
||||
* Daniel Greenfeld <pydanny@gmail.com>
|
||||
* Asif Saif Uddin (@auvipy)
|
||||
* Daniel Greenfeld (@pydanny / <pydanny@gmail.com>)
|
||||
|
||||
Translation Managers
|
||||
--------------------
|
||||
|
||||
* Henri Colas (@NotSqrt)
|
||||
* Danilo Bargen (@dbrgn)
|
||||
* Asif Saif Uddin (@auvipy)
|
||||
|
||||
Developers
|
||||
=============
|
||||
----------
|
||||
|
||||
* Audrey Roy (@audreyr)
|
||||
* Peter Ingelsby (@inglesp)
|
||||
|
|
@ -18,4 +27,75 @@ Developers
|
|||
* Chris Lawlor (@chrislawlor)
|
||||
* Ben Tappin <ben@mrben.co.uk>
|
||||
* Allison Kapture (@akapture)
|
||||
* Roman Gladkov (@d1ffuz0r / d1fffuz0r@gmail.com)
|
||||
* Roman Gladkov (@d1ffuz0r / <d1fffuz0r@gmail.com>)
|
||||
* Pau Rosello Van Schoor (@paurosello)
|
||||
* Wade Austin (@waustin)
|
||||
* the5fire (@the5fire)
|
||||
* Andrews Medina (@andrewsmedina / <andrewsmedina@gmail.com>)
|
||||
* Wade Austin (@waustin)
|
||||
* Douglas Miranda (@douglasmiranda / <douglasmirandasilva@gmail.com>)
|
||||
* Ethan Soergel (@esoergel / <esoergel@gmail.com>)
|
||||
* Ryan Balfanz (@RyanBalfanz / <ryan@ryanbalfanz.net>)
|
||||
* Tom Christie (@tomchristie)
|
||||
* Chris Jones (@chrisjones-brack3t / <chris@brack3t.com>)
|
||||
* Danilo Bargen (@dbrgn)
|
||||
* Ignasi Fosch Alonso (@ifosch)
|
||||
* Henri Colas (@NotSqrt)
|
||||
* Andy Boot (@bootandy)
|
||||
* Eleonore Mayola (@Eleonore9)
|
||||
* Michal Kuffa (@beezz / Michal Kuffa)
|
||||
* Tom Viner (@tomviner)
|
||||
* Marek Zelinkaa (@marekzelinka)
|
||||
* Andrea de Marco (@z4r)
|
||||
* Kenneth Love (@kennethlove / <kenneth@gigantuan.net>)
|
||||
* Kevin Diale (@powersurge360 / <powersurge360@gmail.com>)
|
||||
* James Rivett-Carnac (@yarbelk / james.rivettcarnac@gmail.com)
|
||||
* Andrew Mosson (@amosson / amosson@tippit.com)
|
||||
* marangonico
|
||||
* Kamil Gałuszka (@galuszkak / galuszkak@gmail.com)
|
||||
* Germano Gabbianelli (@tyrion)
|
||||
* Arthur (@arthur-wsw / arthur@wallstreetweb.net)
|
||||
|
||||
Translators
|
||||
-----------
|
||||
|
||||
Catalan
|
||||
|
||||
* Ignasi Fosch Alonso (@NaTx)
|
||||
|
||||
Chinese
|
||||
|
||||
* Eric Ho (@EricHo)
|
||||
* Shiyao.Ma (@introom)
|
||||
|
||||
French
|
||||
|
||||
* Henri Colas (@NotSqrt)
|
||||
|
||||
German
|
||||
|
||||
* Danilo Bargen (@dbrgn)
|
||||
* Jannis Leidel (@jezdez)
|
||||
* Albrecht Mühlenschulte (@a7p)
|
||||
|
||||
Italian
|
||||
|
||||
* Margherita Zamponi (@margherita.zamponi)
|
||||
|
||||
Polish
|
||||
|
||||
* Dariusz Smigiel (@dasm)
|
||||
* Marcin Jabrzyk (@bzyx)
|
||||
|
||||
Portuguese (Brazil)
|
||||
|
||||
* andrewsmedina
|
||||
|
||||
Slovak
|
||||
|
||||
* Marek Zelinkaa (@marekzelinka)
|
||||
* Ivana Kellyérová (@eruraina)
|
||||
|
||||
Spanish
|
||||
|
||||
* Ignasi Fosch Alonso (@NaTx)
|
||||
|
|
|
|||
46
CODE_OF_CONDUCT.md
Normal file
46
CODE_OF_CONDUCT.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Code of Conduct
|
||||
|
||||
As contributors and maintainers of the Jazzband projects, 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 the Jazzband a harassment-free experience
|
||||
for everyone, regardless of the 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
|
||||
|
||||
The Jazzband roadies 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, the roadies commit themselves to fairly and
|
||||
consistently applying these principles to every aspect of managing the jazzband
|
||||
projects. Roadies who do not follow or enforce the Code of Conduct may be permanently
|
||||
removed from the Jazzband roadies.
|
||||
|
||||
This code of conduct applies both within project spaces and in public spaces when an
|
||||
individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
|
||||
contacting the roadies at `roadies@jazzband.co`. All complaints will be reviewed and
|
||||
investigated and will result in a response that is deemed necessary and appropriate to
|
||||
the circumstances. Roadies 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 [https://contributor-covenant.org/version/1/3/0/][version]
|
||||
|
||||
[homepage]: https://contributor-covenant.org
|
||||
[version]: https://contributor-covenant.org/version/1/3/0/
|
||||
16
CONTRIBUTING.rst
Normal file
16
CONTRIBUTING.rst
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Contributing
|
||||
============
|
||||
|
||||
.. image:: https://jazzband.co/static/img/jazzband.svg
|
||||
:target: https://jazzband.co/
|
||||
:alt: Jazzband
|
||||
|
||||
This is a `Jazzband <https://jazzband.co>`_ project. By contributing you agree to abide by the `Contributor Code of Conduct <https://jazzband.co/about/conduct>`_ and follow the `guidelines <https://jazzband.co/about/guidelines>`_.
|
||||
|
||||
Also, please read the following:
|
||||
|
||||
* Our design_ document, which lists the constraints and goals of the project.
|
||||
* Our contributing_ document, which describes our procedures and methods.
|
||||
|
||||
.. _design: https://django-admin2.readthedocs.io/en/latest/design.html
|
||||
.. _contributing: https://django-admin2.readthedocs.io/en/latest/contributing.html
|
||||
140
HISTORY.rst
Normal file
140
HISTORY.rst
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
History
|
||||
=========
|
||||
|
||||
0.7.0 (2016-11-16)
|
||||
|
||||
* Fix Django 1.8 issues and add 1.9, 1.10 compatibility
|
||||
* Update django-rest-framework to 3.3.x
|
||||
* Remove django-crispy-forms and django-floppyforms
|
||||
* Regenerate example project to make it django 1.9 compatible
|
||||
* Update tox and travis and add flake8
|
||||
* Rename AdminModel2Mixin to Admin2ModelMixin
|
||||
* Add migrations
|
||||
* remove south migrations
|
||||
* Replace IPAddressField with GenericIPAddressField
|
||||
* Fix password link in user admin
|
||||
* Fix user logout on password change
|
||||
* Fix tests
|
||||
* Drop support of django versions lower then 1.8
|
||||
* Drop older url.patterns
|
||||
|
||||
|
||||
|
||||
0.6.1 (2014-02-26)
|
||||
|
||||
* Fix empty form display
|
||||
* Added more explicit installation instructions
|
||||
* Added migration instructions
|
||||
* Added view descriptions for "registry" and "app_verbose_names"
|
||||
* Show a nice message and margin if there are no visible fields
|
||||
* Updated widget controls for Django 1.6 changes.
|
||||
* Better error messages for admin views that fail to instantiate
|
||||
* Added png glyphicons to MANIFEST
|
||||
|
||||
0.6.0 (2013-09-12)
|
||||
|
||||
* Implemented LogHistory to track recent history
|
||||
* New system for adding new views to ModelAdmin2 object
|
||||
* Fixed missing enctype="multipart/form-data" functionality
|
||||
* Implemented "app verbose name"
|
||||
* Apps can have customized names
|
||||
* List Actions can be set so they don't require selecting a model
|
||||
* Implemented ModelAdmin2.ordering
|
||||
* To maintain API consistency, renamed views.AdminView's "url" argument to "regex"
|
||||
* Implemented ModelAdmin2.date_hierarchy
|
||||
* Changed theming system to make default theme follow the same rules as third-party themes.
|
||||
* Inlines now separated into stacked and tabular formats
|
||||
* Code coverage now displaying in README
|
||||
* User list page now showing all default columns and filters
|
||||
* Vast documentation improvements
|
||||
* Converted to ``django.utils.encoding.force_str`` instead ``unicode`` in order to type edge cases
|
||||
* setup.py fix
|
||||
|
||||
0.5.1 (2013-07-14)
|
||||
|
||||
* No longer pinning dependencies on specific versions
|
||||
* `Documentation on built-in views`_ shows context variables.
|
||||
* Added django-filter to dependency list
|
||||
* Problem with related_name resolved
|
||||
* Fixed the height of the change_form
|
||||
* Example app actually shows added content
|
||||
* Pull requests going forward are internationalized_
|
||||
* FAQ_ begun
|
||||
|
||||
.. _`internationalized`: https://django-admin2.readthedocs.io/en/latest/contributing.html#internationalize
|
||||
.. _`Documentation on built-in views`: https://django-admin2.readthedocs.io/en/latest/ref/built-in-views.html
|
||||
.. _faq: https://django-admin2.readthedocs.io/en/latest/faq.html
|
||||
|
||||
0.5.0 (2013-07-08)
|
||||
|
||||
* Implemented customizable value renderers
|
||||
* Implemented list filters using django-filters. Greatly supersedes what Django provides.
|
||||
* Implemented ModelAdmin2.save_on_top and ModelAdmin2.save_on_bottom
|
||||
* Implemented BooleanField icons for List and Detail views
|
||||
* Implemented default ``django.contrib.auth`` and ``django.contrib.sites`` registrations
|
||||
* Implemented the displayed of verbose field/method names in list view
|
||||
* Implemented client-side ordering of model list fields in default theme
|
||||
* Implemented improved internal naming conventions
|
||||
* Improved example project home page
|
||||
* Improved internal test coverage
|
||||
* Documentation for Context Variables in Themes
|
||||
* Corrected early nomenclature decisions
|
||||
* Much improved Internationalization
|
||||
* Added django-admin2 to Transifex
|
||||
* Translations for French, Polish, Slovak, Chinese, German, Catalan, Italian, and Spanish.
|
||||
|
||||
0.4.0 (2013-06-30)
|
||||
|
||||
* Implemented both Function- and Class-based Action views
|
||||
* Implemented ModelAdmin2.list_display
|
||||
* Implemented ModelAdmin2.fieldsets
|
||||
* Dropdown widget now displays the selected choice
|
||||
* Added support for callables in ModelAdmin2.list_display
|
||||
* Added screenshots to README
|
||||
* Added second example project
|
||||
* Fixed breadcrumbs
|
||||
* Default theme: Proper closing of template and media blocks
|
||||
* Default theme: Standardized indentation in default theme templates
|
||||
* Default theme: Pointed to CDN for JQuery
|
||||
* Default theme: Added basic style for login form
|
||||
* Default theme: Internationalized all text strings
|
||||
|
||||
|
||||
0.3.0 (2013-05-31)
|
||||
|
||||
* HTML5 forms via floppyforms.
|
||||
* Many API improvements.
|
||||
* Added Breadcrumbs.
|
||||
* Added Login, Logout, ChangePassword views.
|
||||
* Added Actions.
|
||||
* Added support for inlines.
|
||||
* Added view based permission controls
|
||||
* Implement delete confirmations for child models.
|
||||
* Testrunner now can run on a specific test set or module.
|
||||
* Internal code refactoring to follow standards.
|
||||
* Moved to git-flow for accepting pull requests.
|
||||
* Model create/update pages now have save options.
|
||||
* Added i18n to all templates, much of internal code.
|
||||
* All print statements replaced with proper logging.
|
||||
* Design goals specified in the documentation.
|
||||
|
||||
0.2.0 (2013-05-19)
|
||||
|
||||
* Birth! (Working Prototype)
|
||||
* Easy-to-extend API that follows similar patterns to django.contrib.admin.
|
||||
* Built-in RESTFUL API powered by django-rest-framework.
|
||||
* Default theme built on Twitter Bootstrap.
|
||||
* Easy to implement theme system.
|
||||
* Basic permission controls.
|
||||
* Testrunner
|
||||
* Documentation
|
||||
|
||||
0.1.1 (2013-05-17)
|
||||
|
||||
* Code adoption from django-mongonaut.
|
||||
* Preperation for Django Circus sprints.
|
||||
|
||||
0.1 (2013-05-13)
|
||||
|
||||
* Discussion with Russell Keith-Magee.
|
||||
* Inception.
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
include README.rst
|
||||
include LICENSE
|
||||
include AUTHORS.rst
|
||||
include MANIFEST.in
|
||||
include HISTORY.rst
|
||||
include MANIFEST.in
|
||||
recursive-include djadmin2 *.html *.css *.js *.png
|
||||
|
|
|
|||
256
README.rst
256
README.rst
|
|
@ -1,125 +1,225 @@
|
|||
===============
|
||||
=============
|
||||
django-admin2
|
||||
===============
|
||||
|
||||
.. image:: https://travis-ci.org/pydanny/django-admin2.png
|
||||
:alt: Build Status
|
||||
:target: https://travis-ci.org/pydanny/django-admin2
|
||||
|
||||
**Warning:** This project is currently in an **alpha** state and currently not meant for real projects.
|
||||
|
||||
One of the most useful parts of ``django.contrib.admin`` is the ability to configure various views that touch and alter data. django-admin2 is a complete rewrite of that library using modern Class-Based Views and enjoying a design focused on extendibility and adaptability. By starting over, we can avoid the legacy code and make it easier to write extensions and themes.
|
||||
|
||||
Contributing
|
||||
=============
|
||||
|
||||
Yes please! Please read our formal contributing document at: https://django-admin2.readthedocs.org/en/latest/contributing.html
|
||||
.. image:: https://jazzband.co/static/img/badge.svg
|
||||
:target: https://jazzband.co/
|
||||
:alt: Jazzband
|
||||
.. image:: https://github.com/jazzband/django-admin2/workflows/Test/badge.svg
|
||||
:target: https://github.com/jazzband/django-admin2/actions
|
||||
:alt: GitHub Actions
|
||||
.. image:: https://codecov.io/gh/jazzband/django-admin2/branch/main/graph/badge.svg?token=PcC594rhI4
|
||||
:target: https://codecov.io/gh/jazzband/django-admin2
|
||||
:alt: Code coverage
|
||||
|
||||
One of the most useful parts of ``django.contrib.admin`` is the ability to
|
||||
configure various views that touch and alter data. django-admin2 is a complete
|
||||
rewrite of that library using modern Class-Based Views and enjoying a design
|
||||
focused on extendibility and adaptability. By starting over, we can avoid the
|
||||
legacy code and make it easier to write extensions and themes.
|
||||
|
||||
Full Documentation at: https://django-admin2.readthedocs.io/
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
* Easy-to-extend API that follows similar patterns to ``django.contrib.admin``.
|
||||
* Built-in RESTFUL API powered by ``django-rest-framework``.
|
||||
* Default theme built on Twitter Bootstrap that is just starting to act like the current Django admin.
|
||||
* Easy to implement theme system.
|
||||
* Permission controls
|
||||
* Custom actions
|
||||
* Add/Change form inlines
|
||||
* i18n
|
||||
* Rewrite of the Django Admin backend
|
||||
* Drop-in themes
|
||||
* Built-in RESTful API
|
||||
|
||||
Screenshots
|
||||
===========
|
||||
|
||||
.. image:: https://github.com/jazzband/django-admin2/raw/main/screenshots/Site_administration.png
|
||||
:width: 722px
|
||||
:alt: Site administration
|
||||
:align: center
|
||||
:target: https://github.com/jazzband/django-admin2/raw/main/screenshots/Site_administration.png
|
||||
|
||||
.. image:: https://github.com/jazzband/django-admin2/raw/main/screenshots/Select_user.png
|
||||
:width: 722px
|
||||
:alt: Select user
|
||||
:align: center
|
||||
:target: https://github.com/jazzband/django-admin2/raw/main/screenshots/Select_user.png
|
||||
|
||||
Requirements
|
||||
=============
|
||||
============
|
||||
|
||||
* Django 1.5+
|
||||
* Python 2.7+ or Python 3.3+
|
||||
* django-braces
|
||||
* django-extra-views
|
||||
* django-floppyforms
|
||||
* django-rest-framework
|
||||
* Sphinx (for documentation)
|
||||
* Django 2.2+
|
||||
* Python 3.5+
|
||||
* django-braces_
|
||||
* django-extra-views_
|
||||
* django-rest-framework_
|
||||
* django-filter_
|
||||
* Sphinx_ (for documentation)
|
||||
|
||||
Basic Pattern
|
||||
==============
|
||||
.. _django-braces: https://github.com/brack3t/django-braces
|
||||
.. _django-extra-views: https://github.com/AndrewIngram/django-extra-views
|
||||
.. _django-rest-framework: https://github.com/tomchristie/django-rest-framework
|
||||
.. _django-filter: https://github.com/alex/django-filter
|
||||
.. _Sphinx: http://sphinx-doc.org/
|
||||
|
||||
Our goal is to make this API work:
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Use pip to install from PyPI:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
pip install django-admin2
|
||||
|
||||
Add djadmin2 and rest_framework to your settings file:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
...
|
||||
'djadmin2',
|
||||
'rest_framework', # for the browsable API templates
|
||||
...
|
||||
)
|
||||
|
||||
Add setting for apps and the default theme in your settings file:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_bootstrap3',)
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
||||
Add djadmin2 urls to your URLconf:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# urls.py
|
||||
from django.conf.urls import include
|
||||
|
||||
from djadmin2.site import djadmin2_site
|
||||
|
||||
djadmin2_site.autodiscover()
|
||||
|
||||
urlpatterns = [
|
||||
...
|
||||
url(r'^admin2/', include(djadmin2_site.urls)),
|
||||
]
|
||||
|
||||
|
||||
How to write django-admin2 modules
|
||||
==================================
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# myapp/admin2.py
|
||||
# Import your custom models
|
||||
from .models import Post, Comment
|
||||
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
||||
from django.contrib.auth.models import User
|
||||
from djadmin2.site import djadmin2_site
|
||||
from djadmin2.types import ModelAdmin2
|
||||
|
||||
import djadmin2
|
||||
from .models import Post, Comment
|
||||
|
||||
|
||||
class UserAdmin2(djadmin2.ModelAdmin2):
|
||||
class UserAdmin2(ModelAdmin2):
|
||||
# Replicates the traditional admin for django.contrib.auth.models.User
|
||||
create_form_class = UserCreationForm
|
||||
update_form_class = UserChangeForm
|
||||
|
||||
|
||||
# Register each model with the admin
|
||||
djadmin2.default.register(Post)
|
||||
djadmin2.default.register(Comment)
|
||||
djadmin2.default.register(User, UserAdmin2)
|
||||
djadmin2_site.register(Post)
|
||||
djadmin2_site.register(Comment)
|
||||
djadmin2_site.register(User, UserAdmin2)
|
||||
|
||||
Migrating from 0.6.x
|
||||
====================
|
||||
|
||||
Themes
|
||||
========
|
||||
- The default theme has been updated to bootstrap3, be sure to replace your reference to the new one.
|
||||
- Django rest framework also include multiple pagination system, the only one supported now is the PageNumberPagination.
|
||||
|
||||
Therefore, your `settings` need to include this:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_bootstrap3',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
|
||||
The default admin2 site has move into djadmin2.site make sure your use the news djadmin2_site in your urls.py:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# urls.py
|
||||
from django.conf.urls import include
|
||||
|
||||
from djadmin2.site import djadmin2_site
|
||||
|
||||
djadmin2_site.autodiscover()
|
||||
|
||||
urlpatterns = [
|
||||
...
|
||||
url(r'^admin2/', include(djadmin2_site.urls)),
|
||||
]
|
||||
|
||||
Migrating from 0.5.x
|
||||
====================
|
||||
|
||||
Themes are now defined explicitly, including the default theme. Therefore, your `settings` need to include this:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default"
|
||||
|
||||
Drop-In Themes
|
||||
==============
|
||||
|
||||
The default theme is whatever bootstrap is most current. Specifically:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
ADMIN2_THEME_DIRECTORY = "admin2/bootstrap/"
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_bootstrap3',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
||||
If you create a new theme, please define it thus:
|
||||
If you create a new theme, you define it thus:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
ADMIN2_THEME_DIRECTORY = "admin2/foundation/"
|
||||
# In settings.py
|
||||
# Mythical theme! This does not exit... YET!
|
||||
INSTALLED_APPS += ('djadmin2theme_foundation',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_foundation"
|
||||
|
||||
|
||||
History
|
||||
=========
|
||||
Code of Conduct
|
||||
======================
|
||||
|
||||
0.3.0 (2013-05-31)
|
||||
Everyone interacting in the django-admin2 project's codebases, issue trackers, chat
|
||||
rooms, and mailing lists is expected to follow the `Jazzband Code of Conduct`_.
|
||||
|
||||
* HTML5 forms via floppyforms.
|
||||
* Many API improvements.
|
||||
* Added Breadcrumbs.
|
||||
* Added Login, Logout, ChangePassword views.
|
||||
* Added Actions.
|
||||
* Added support for inlines.
|
||||
* Added view based permission controls
|
||||
* Implement delete confirmations for child models.
|
||||
* Testrunner now can run on a specific test set or module.
|
||||
* Internal code refactoring to follow standards.
|
||||
* Moved to git-flow for accepting pull requests.
|
||||
* Model create/update pages now have save options.
|
||||
* Added i18n to all templates, much of internal code.
|
||||
* All print statements replaced with proper logging.
|
||||
* Design goals specified in the documentation.
|
||||
.. _`Jazzband Code of Conduct`: https://jazzband.co/about/conduct
|
||||
|
||||
0.2.0 (2013-05-19)
|
||||
Follows Best Practices
|
||||
======================
|
||||
|
||||
* Birth! (Working Prototype)
|
||||
* Easy-to-extend API that follows similar patterns to django.contrib.admin.
|
||||
* Built-in RESTFUL API powered by django-rest-framework.
|
||||
* Default theme built on Twitter Bootstrap.
|
||||
* Easy to implement theme system.
|
||||
* Basic permission controls.
|
||||
* Testrunner
|
||||
* Documentation
|
||||
.. image:: http://twoscoops.smugmug.com/Two-Scoops-Press-Media-Kit/i-C8s5jkn/0/O/favicon-152.png
|
||||
:name: Two Scoops Logo
|
||||
:align: center
|
||||
:alt: Two Scoops of Django
|
||||
:target: http://twoscoopspress.org/products/two-scoops-of-django-1-8
|
||||
|
||||
0.1.1 (2013-05-17)
|
||||
This project follows best practices as espoused in `Two Scoops of Django: Best Practices for Django 1.8`_.
|
||||
|
||||
* Code adoption from django-mongonaut.
|
||||
* Preperation for Django Circus sprints.
|
||||
|
||||
0.1 (2013-05-13)
|
||||
|
||||
* Discussion with Russell Keith-Magee.
|
||||
* Inception.
|
||||
.. _`Two Scoops of Django: Best Practices for Django 1.8`: http://twoscoopspress.org/products/two-scoops-of-django-1-8
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
__version__ = '0.3.0'
|
||||
__version__ = '0.7.1'
|
||||
|
||||
__author__ = 'Daniel Greenfeld & Contributors'
|
||||
|
||||
|
|
@ -7,10 +7,4 @@ VERSION = __version__ # synonym
|
|||
# Default datetime input and output formats
|
||||
ISO_8601 = 'iso-8601'
|
||||
|
||||
from . import core
|
||||
from . import types
|
||||
|
||||
|
||||
default = core.Admin2()
|
||||
ModelAdmin2 = types.ModelAdmin2
|
||||
Admin2Inline = types.Admin2Inline
|
||||
default_app_config = "djadmin2.apps.Djadmin2Config"
|
||||
|
|
|
|||
|
|
@ -1,76 +1,171 @@
|
|||
from django.contrib import messages
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.template.response import TemplateResponse
|
||||
from django.utils.encoding import force_text
|
||||
from django.db import router
|
||||
from django.utils.encoding import force_str
|
||||
from django.utils.text import capfirst
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils.translation import gettext_lazy, ngettext, pgettext_lazy
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from . import utils
|
||||
from . import permissions, utils
|
||||
from .viewmixins import Admin2ModelMixin
|
||||
|
||||
|
||||
def get_description(action):
|
||||
if hasattr(action, 'description'):
|
||||
# This is for classes
|
||||
return action.description
|
||||
else:
|
||||
# This if for functions
|
||||
return capfirst(action.__name__.replace('_', ' '))
|
||||
|
||||
|
||||
def delete_selected(request, queryset):
|
||||
# We check whether the user has permission to delete the objects in the
|
||||
# queryset.
|
||||
#
|
||||
# TODO: This duplicates some of the permission-checking functionality in
|
||||
# BaseAdmin2. Investigate how to DRY this out.
|
||||
#
|
||||
class BaseListAction(Admin2ModelMixin, TemplateView):
|
||||
|
||||
permission_classes = (permissions.IsStaffPermission,)
|
||||
|
||||
empty_message = gettext_lazy(
|
||||
'Items must be selected in order to perform actions '
|
||||
'on them. No items have been changed.'
|
||||
)
|
||||
|
||||
only_selected = True
|
||||
|
||||
queryset = None
|
||||
|
||||
def __init__(self, queryset, *args, **kwargs):
|
||||
self.queryset = queryset
|
||||
self.model = queryset.model
|
||||
|
||||
options = utils.model_options(self.model)
|
||||
|
||||
self.app_label = options.app_label
|
||||
self.model_name = options.model_name
|
||||
|
||||
self.item_count = len(queryset)
|
||||
|
||||
if self.item_count <= 1:
|
||||
objects_name = options.verbose_name
|
||||
else:
|
||||
objects_name = options.verbose_name_plural
|
||||
self.objects_name = force_str(objects_name)
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def get_queryset(self):
|
||||
""" Replaced `get_queryset` from `Admin2ModelMixin`"""
|
||||
return self.queryset
|
||||
|
||||
def description(self):
|
||||
raise NotImplementedError("List action classes require"
|
||||
" a description attribute.")
|
||||
|
||||
@property
|
||||
def success_message(self):
|
||||
raise NotImplementedError(
|
||||
"List actions classes require a success_message"
|
||||
)
|
||||
|
||||
@property
|
||||
def success_message_plural(self):
|
||||
"""
|
||||
A plural form for the success_message
|
||||
|
||||
If not provided, falls back to the regular form
|
||||
"""
|
||||
return self.success_message
|
||||
|
||||
@property
|
||||
def default_template_name(self):
|
||||
raise NotImplementedError(
|
||||
"List actions classes using display_nested_response"
|
||||
" require a template"
|
||||
)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
""" Utility method when you want to display nested objects
|
||||
(such as during a bulk update/delete)
|
||||
"""
|
||||
context = super().get_context_data()
|
||||
|
||||
def _format_callback(obj):
|
||||
opts = utils.model_options(obj)
|
||||
return '%s: %s' % (force_str(capfirst(opts.verbose_name)),
|
||||
force_str(obj))
|
||||
|
||||
using = router.db_for_write(self.model)
|
||||
|
||||
collector = utils.NestedObjects(using=using)
|
||||
collector.collect(self.queryset)
|
||||
|
||||
context.update({
|
||||
'view': self,
|
||||
'objects_name': self.objects_name,
|
||||
'queryset': self.queryset,
|
||||
'deletable_objects': collector.nested(_format_callback),
|
||||
})
|
||||
|
||||
return context
|
||||
|
||||
def get(self, request):
|
||||
if self.item_count > 0:
|
||||
return super().get(request)
|
||||
|
||||
message = _(self.empty_message)
|
||||
messages.add_message(request, messages.INFO, message)
|
||||
|
||||
return None
|
||||
|
||||
def post(self, request):
|
||||
if self.process_queryset() is None:
|
||||
|
||||
# objects_name should already be pluralized, see __init__
|
||||
message = ngettext(
|
||||
self.success_message,
|
||||
self.success_message_plural,
|
||||
self.item_count
|
||||
) % {
|
||||
'count': self.item_count, 'items': self.objects_name
|
||||
}
|
||||
|
||||
messages.add_message(request, messages.INFO, message)
|
||||
|
||||
return None
|
||||
|
||||
def process_queryset(self):
|
||||
msg = 'Must be provided to do some actions with queryset'
|
||||
raise NotImplementedError(msg)
|
||||
|
||||
|
||||
class DeleteSelectedAction(BaseListAction):
|
||||
# TODO: Check that user has permission to delete all related obejcts. See
|
||||
# `get_deleted_objects` in contrib.admin.util for how this is currently
|
||||
# done. (Hint: I think we can do better.)
|
||||
|
||||
model = queryset.model
|
||||
opts = utils.model_options(model)
|
||||
permission_name = '%s.delete.%s' \
|
||||
% (opts.app_label, opts.object_name.lower())
|
||||
has_permission = request.user.has_perm(permission_name)
|
||||
default_template_name = "actions/delete_selected_confirmation.html"
|
||||
|
||||
if len(queryset) == 1:
|
||||
objects_name = opts.verbose_name
|
||||
else:
|
||||
objects_name = opts.verbose_name_plural
|
||||
objects_name = unicode(objects_name)
|
||||
description = gettext_lazy("Delete selected items")
|
||||
|
||||
if request.POST.get('confirmed'):
|
||||
success_message = pgettext_lazy(
|
||||
'singular form',
|
||||
'Successfully deleted %(count)s %(items)s',
|
||||
)
|
||||
success_message_plural = pgettext_lazy(
|
||||
'plural form',
|
||||
'Successfully deleted %(count)s %(items)s',
|
||||
)
|
||||
|
||||
permission_classes = BaseListAction.permission_classes + (
|
||||
permissions.ModelDeletePermission,
|
||||
)
|
||||
|
||||
def post(self, request):
|
||||
if request.POST.get('confirmed'):
|
||||
super().post(request)
|
||||
else:
|
||||
# The user has not confirmed that they want to delete the
|
||||
# objects, so render a template asking for their confirmation.
|
||||
return self.get(request)
|
||||
|
||||
def process_queryset(self):
|
||||
# The user has confirmed that they want to delete the objects.
|
||||
if has_permission:
|
||||
num_objects_deleted = len(queryset)
|
||||
queryset.delete()
|
||||
message = "Successfully deleted %d %s" % \
|
||||
(num_objects_deleted, objects_name)
|
||||
messages.add_message(request, messages.INFO, message)
|
||||
return None
|
||||
else:
|
||||
raise PermissionDenied
|
||||
else:
|
||||
# The user has not confirmed that they want to delete the objects, so
|
||||
# render a template asking for their confirmation.
|
||||
if has_permission:
|
||||
template = 'admin2/bootstrap/delete_selected_confirmation.html'
|
||||
|
||||
def _format_callback(obj):
|
||||
opts = utils.model_options(obj)
|
||||
return '%s: %s' % (force_text(capfirst(opts.verbose_name)),
|
||||
force_text(obj))
|
||||
|
||||
collector = utils.NestedObjects(using=None)
|
||||
collector.collect(queryset)
|
||||
|
||||
context = {
|
||||
'queryset': queryset,
|
||||
'objects_name': objects_name,
|
||||
'deletable_objects': collector.nested(_format_callback),
|
||||
}
|
||||
return TemplateResponse(request, template, context)
|
||||
else:
|
||||
message = "Permission to delete %s denied" % objects_name
|
||||
messages.add_message(request, messages.INFO, message)
|
||||
return None
|
||||
|
||||
delete_selected.description = "Delete selected items"
|
||||
self.get_queryset().delete()
|
||||
|
|
|
|||
55
djadmin2/admin2.py
Normal file
55
djadmin2/admin2.py
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
from django.conf import settings
|
||||
from django.contrib.auth.models import Group, User
|
||||
from django.contrib.sites.models import Site
|
||||
from rest_framework.relations import PrimaryKeyRelatedField
|
||||
|
||||
from djadmin2.apiviews import Admin2APISerializer
|
||||
from djadmin2.forms import UserCreationForm, UserChangeForm
|
||||
from djadmin2.site import djadmin2_site
|
||||
from djadmin2.types import ModelAdmin2
|
||||
|
||||
|
||||
class GroupSerializer(Admin2APISerializer):
|
||||
permissions = PrimaryKeyRelatedField(many=True, read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = Group
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
class GroupAdmin2(ModelAdmin2):
|
||||
api_serializer_class = GroupSerializer
|
||||
|
||||
|
||||
class UserSerializer(Admin2APISerializer):
|
||||
user_permissions = PrimaryKeyRelatedField(many=True, read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = User
|
||||
exclude = ('password',)
|
||||
|
||||
|
||||
class UserAdmin2(ModelAdmin2):
|
||||
create_form_class = UserCreationForm
|
||||
update_form_class = UserChangeForm
|
||||
search_fields = ('username', 'groups__name', 'first_name', 'last_name',
|
||||
'email')
|
||||
list_filter = ('is_staff', 'is_superuser', 'is_active', 'groups')
|
||||
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
|
||||
|
||||
api_serializer_class = UserSerializer
|
||||
|
||||
|
||||
# Register each model with the admin
|
||||
djadmin2_site.register(User, UserAdmin2)
|
||||
djadmin2_site.register(Group, GroupAdmin2)
|
||||
|
||||
|
||||
# Register the sites app if it's been activated in INSTALLED_APPS
|
||||
if "django.contrib.sites" in settings.INSTALLED_APPS:
|
||||
|
||||
class SiteAdmin2(ModelAdmin2):
|
||||
list_display = ('domain', 'name')
|
||||
search_fields = ('domain', 'name')
|
||||
|
||||
djadmin2_site.register(Site, SiteAdmin2)
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
from django.utils.encoding import force_str
|
||||
|
||||
from rest_framework import fields, generics, serializers
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.reverse import reverse
|
||||
from rest_framework.reverse import reverse as drf_reverse
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from . import utils
|
||||
|
|
@ -12,13 +11,32 @@ API_VERSION = '0.1'
|
|||
|
||||
|
||||
class Admin2APISerializer(serializers.HyperlinkedModelSerializer):
|
||||
_default_view_name = 'admin2:%(app_label)s_%(model_name)s_api-detail'
|
||||
_default_view_name = 'admin2:%(app_label)s_%(model_name)s_api_detail'
|
||||
|
||||
pk = fields.Field(source='pk')
|
||||
__str__ = fields.Field(source='__unicode__')
|
||||
pk = fields.ReadOnlyField()
|
||||
__unicode__ = fields.ReadOnlyField(source='__str__')
|
||||
|
||||
def get_extra_kwargs(self):
|
||||
extra_kwargs = super().get_extra_kwargs()
|
||||
extra_kwargs.update({
|
||||
'url': {'view_name': self._get_default_view_name(self.Meta.model)}
|
||||
})
|
||||
return extra_kwargs
|
||||
|
||||
def _get_default_view_name(self, model):
|
||||
"""
|
||||
Return the view name to use if 'view_name' is not specified in 'Meta'
|
||||
"""
|
||||
model_meta = model._meta
|
||||
format_kwargs = {
|
||||
'app_label': model_meta.app_label,
|
||||
'model_name': model_meta.object_name.lower()
|
||||
}
|
||||
return self._default_view_name % format_kwargs
|
||||
|
||||
|
||||
class Admin2APIMixin(Admin2Mixin):
|
||||
model = None
|
||||
raise_exception = True
|
||||
|
||||
def get_serializer_class(self):
|
||||
|
|
@ -31,18 +49,21 @@ class Admin2APIMixin(Admin2Mixin):
|
|||
# Admin2APISerializer base class
|
||||
_default_view_name = ':'.join((
|
||||
self.model_admin.admin.name,
|
||||
'%(app_label)s_%(model_name)s_api-detail'))
|
||||
'%(app_label)s_%(model_name)s_api_detail'))
|
||||
|
||||
class Meta:
|
||||
model = model_class
|
||||
fields = '__all__'
|
||||
|
||||
return ModelAPISerilizer
|
||||
return super(Admin2APIMixin, self).get_serializer_class()
|
||||
return super().get_serializer_class()
|
||||
|
||||
|
||||
class IndexAPIView(Admin2APIMixin, APIView):
|
||||
apps = None
|
||||
registry = None
|
||||
app_verbose_names = None
|
||||
app_verbose_name = None
|
||||
|
||||
def get_model_data(self, model):
|
||||
model_admin = self.registry[model]
|
||||
|
|
@ -52,8 +73,8 @@ class IndexAPIView(Admin2APIMixin, APIView):
|
|||
'app_label': model_options.app_label,
|
||||
'model_name': model_options.object_name.lower(),
|
||||
}
|
||||
model_url = reverse(
|
||||
'%(current_app)s:%(app_label)s_%(model_name)s_api-list' % opts,
|
||||
model_url = drf_reverse(
|
||||
'%(current_app)s:%(app_label)s_%(model_name)s_api_list' % opts,
|
||||
request=self.request,
|
||||
format=self.kwargs.get('format'))
|
||||
model_options = utils.model_options(model)
|
||||
|
|
@ -70,6 +91,7 @@ class IndexAPIView(Admin2APIMixin, APIView):
|
|||
return {
|
||||
'app_label': app_label,
|
||||
'models': model_data,
|
||||
'app_verbose_name': force_str(self.app_verbose_names.get(app_label))
|
||||
}
|
||||
|
||||
def get(self, request):
|
||||
|
|
|
|||
16
djadmin2/apps.py
Normal file
16
djadmin2/apps.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from django.apps import AppConfig
|
||||
from django.db.models.signals import post_migrate
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from djadmin2.permissions import create_view_permissions
|
||||
|
||||
|
||||
class Djadmin2Config(AppConfig):
|
||||
name = 'djadmin2'
|
||||
verbose_name = _("Django Admin2")
|
||||
|
||||
def ready(self):
|
||||
post_migrate.connect(
|
||||
create_view_permissions,
|
||||
dispatch_uid="django-admin2.djadmin2.permissions.create_view_permissions"
|
||||
)
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
from django.conf import settings
|
||||
|
||||
MODEL_ADMIN_ATTRS = (
|
||||
'list_display', 'list_display_links', 'list_filter', 'admin',
|
||||
'index_view', 'detail_view', 'create_view', 'update_view', 'delete_view',
|
||||
'get_default_view_kwargs', 'get_actions')
|
||||
|
||||
ADMIN2_THEME_DIRECTORY = getattr(settings, "ADMIN2_THEME_DIRECTORY", "admin2/bootstrap")
|
||||
254
djadmin2/contrib/floppyforms.py
Normal file
254
djadmin2/contrib/floppyforms.py
Normal file
|
|
@ -0,0 +1,254 @@
|
|||
import django
|
||||
import floppyforms
|
||||
from copy import deepcopy
|
||||
|
||||
_WIDGET_COMMON_ATTRIBUTES = (
|
||||
'is_hidden',
|
||||
'needs_multipart_form',
|
||||
'is_localized',
|
||||
'is_required')
|
||||
|
||||
_WIDGET_COMMON_ARGUMENTS = ('attrs',)
|
||||
|
||||
|
||||
def _copy_attributes(original, new_widget, attributes):
|
||||
for attr in attributes:
|
||||
original_value = getattr(original, attr)
|
||||
original_value = deepcopy(original_value)
|
||||
|
||||
# Don't set the attribute if it is a property. In that case we can be
|
||||
# sure that the widget class is taking care of the calculation for that
|
||||
# property.
|
||||
old_value_on_new_widget = getattr(new_widget.__class__, attr, None)
|
||||
if not isinstance(old_value_on_new_widget, property):
|
||||
setattr(new_widget, attr, original_value)
|
||||
|
||||
|
||||
def _create_widget(widget_class, copy_attributes=(), init_arguments=()):
|
||||
# attach defaults that apply for all widgets
|
||||
copy_attributes = tuple(copy_attributes) + _WIDGET_COMMON_ATTRIBUTES
|
||||
init_arguments = tuple(init_arguments) + _WIDGET_COMMON_ARGUMENTS
|
||||
|
||||
def create_new_widget(original):
|
||||
kwargs = {}
|
||||
for argname in init_arguments:
|
||||
kwargs[argname] = getattr(original, argname)
|
||||
new_widget = widget_class(**kwargs)
|
||||
_copy_attributes(
|
||||
original,
|
||||
new_widget,
|
||||
copy_attributes)
|
||||
return new_widget
|
||||
return create_new_widget
|
||||
|
||||
|
||||
def _create_radioselect(original):
|
||||
# return original widget if the renderer is something else than what
|
||||
# django ships with by default. This means if this condition evaluates to
|
||||
# true, then a custom renderer was specified. We cannot emulate its
|
||||
# behaviour so we shouldn't guess and just return the original widget
|
||||
if original.renderer is not django.forms.widgets.RadioFieldRenderer:
|
||||
return original
|
||||
create_new_widget = _create_widget(
|
||||
floppyforms.widgets.RadioSelect,
|
||||
('choices', 'allow_multiple_selected',))
|
||||
return create_new_widget(original)
|
||||
|
||||
|
||||
def _create_splitdatetimewidget(widget_class):
|
||||
def create_new_widget(original):
|
||||
new_widget = widget_class(
|
||||
attrs=original.attrs,
|
||||
date_format=original.widgets[0].format,
|
||||
time_format=original.widgets[1].format)
|
||||
_copy_attributes(original, new_widget, _WIDGET_COMMON_ARGUMENTS)
|
||||
return new_widget
|
||||
return create_new_widget
|
||||
|
||||
|
||||
def _create_multiwidget(widget_class, copy_attributes=(), init_arguments=()):
|
||||
create_new_widget = _create_widget(widget_class, copy_attributes,
|
||||
init_arguments)
|
||||
|
||||
def create_new_multiwidget(original):
|
||||
multiwidget = create_new_widget(original)
|
||||
multiwidget.widgets = [
|
||||
floppify_widget(widget)
|
||||
for widget in multiwidget.widgets]
|
||||
return multiwidget
|
||||
return create_new_multiwidget
|
||||
|
||||
|
||||
# this dictionary keeps a mapping from django's widget classes to a callable
|
||||
# that will accept an instance of this class. It will return a new instance of
|
||||
# a corresponding floppyforms widget, with the same semantics -- all relevant
|
||||
# attributes will be copied to the new widget.
|
||||
_django_to_floppyforms_widget = {
|
||||
django.forms.widgets.Input:
|
||||
_create_widget(floppyforms.widgets.Input, ('input_type',)),
|
||||
django.forms.widgets.TextInput:
|
||||
_create_widget(floppyforms.widgets.TextInput, ('input_type',)),
|
||||
django.forms.widgets.PasswordInput:
|
||||
_create_widget(floppyforms.widgets.PasswordInput, ('input_type',)),
|
||||
django.forms.widgets.HiddenInput:
|
||||
_create_widget(floppyforms.widgets.HiddenInput, ('input_type',)),
|
||||
django.forms.widgets.MultipleHiddenInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.MultipleHiddenInput,
|
||||
('input_type',),
|
||||
init_arguments=('choices',)),
|
||||
django.forms.widgets.FileInput:
|
||||
_create_widget(floppyforms.widgets.FileInput, ('input_type',)),
|
||||
django.forms.widgets.ClearableFileInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.ClearableFileInput,
|
||||
(
|
||||
'input_type', 'initial_text', 'input_text',
|
||||
'clear_checkbox_label', 'template_with_initial',
|
||||
'template_with_clear')),
|
||||
django.forms.widgets.Textarea:
|
||||
_create_widget(floppyforms.widgets.Textarea),
|
||||
django.forms.widgets.DateInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.DateInput,
|
||||
init_arguments=('format',)),
|
||||
django.forms.widgets.DateTimeInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.DateTimeInput,
|
||||
init_arguments=('format',)),
|
||||
django.forms.widgets.TimeInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.TimeInput,
|
||||
init_arguments=('format',)),
|
||||
django.forms.widgets.CheckboxInput:
|
||||
_create_widget(floppyforms.widgets.CheckboxInput, ('check_test',)),
|
||||
django.forms.widgets.Select:
|
||||
_create_widget(
|
||||
floppyforms.widgets.Select,
|
||||
('choices', 'allow_multiple_selected',)),
|
||||
django.forms.widgets.NullBooleanSelect:
|
||||
_create_widget(
|
||||
floppyforms.widgets.NullBooleanSelect,
|
||||
('choices', 'allow_multiple_selected',)),
|
||||
django.forms.widgets.SelectMultiple:
|
||||
_create_widget(
|
||||
floppyforms.widgets.SelectMultiple,
|
||||
('choices', 'allow_multiple_selected',)),
|
||||
django.forms.widgets.RadioSelect:
|
||||
_create_radioselect,
|
||||
django.forms.widgets.CheckboxSelectMultiple:
|
||||
_create_widget(
|
||||
floppyforms.widgets.CheckboxSelectMultiple,
|
||||
('choices', 'allow_multiple_selected',)),
|
||||
django.forms.widgets.MultiWidget:
|
||||
_create_widget(
|
||||
floppyforms.widgets.MultiWidget,
|
||||
init_arguments=('widgets',)),
|
||||
django.forms.widgets.SplitDateTimeWidget:
|
||||
_create_splitdatetimewidget(
|
||||
floppyforms.widgets.SplitDateTimeWidget),
|
||||
django.forms.widgets.SplitHiddenDateTimeWidget:
|
||||
_create_splitdatetimewidget(
|
||||
floppyforms.widgets.SplitHiddenDateTimeWidget),
|
||||
django.forms.extras.widgets.SelectDateWidget:
|
||||
_create_widget(
|
||||
floppyforms.widgets.SelectDateWidget,
|
||||
init_arguments=('years',) if django.VERSION >= (1, 7) else ('years', 'required')),
|
||||
}
|
||||
|
||||
_django_field_to_floppyform_widget = {
|
||||
django.forms.fields.FloatField:
|
||||
_create_widget(floppyforms.widgets.NumberInput),
|
||||
django.forms.fields.DecimalField:
|
||||
_create_widget(floppyforms.widgets.NumberInput),
|
||||
django.forms.fields.IntegerField:
|
||||
_create_widget(floppyforms.widgets.NumberInput),
|
||||
django.forms.fields.EmailField:
|
||||
_create_widget(floppyforms.widgets.EmailInput),
|
||||
django.forms.fields.URLField:
|
||||
_create_widget(floppyforms.widgets.URLInput),
|
||||
django.forms.fields.SlugField:
|
||||
_create_widget(floppyforms.widgets.SlugInput),
|
||||
django.forms.fields.GenericIPAddressField:
|
||||
_create_widget(floppyforms.widgets.TextInput),
|
||||
django.forms.fields.SplitDateTimeField:
|
||||
_create_splitdatetimewidget(floppyforms.widgets.SplitDateTimeWidget),
|
||||
}
|
||||
|
||||
|
||||
def allow_floppify_widget_for_field(field):
|
||||
'''
|
||||
We only allow to replace a widget with the floppyform counterpart if the
|
||||
original, by django determined widget is still in place. We don't want to
|
||||
override custom widgets that a user specified.
|
||||
'''
|
||||
# There is a special case for IntegerFields (and all subclasses) that
|
||||
# replaces the default TextInput with a NumberInput, if localization is
|
||||
# turned off. That applies for Django 1.6 upwards.
|
||||
# See the relevant source code in django:
|
||||
# https://github.com/django/django/blob/1.9.6/django/forms/fields.py#L261-264
|
||||
if isinstance(field, django.forms.IntegerField) and not field.localize:
|
||||
if field.widget.__class__ is django.forms.NumberInput:
|
||||
return True
|
||||
|
||||
# We can check if the widget was replaced by comparing the class of the
|
||||
# specified widget with the default widget that is specified on the field
|
||||
# class.
|
||||
if field.widget.__class__ is field.__class__.widget:
|
||||
return True
|
||||
|
||||
# At that point we are assuming that the user replaced the original widget
|
||||
# with a custom one. So we don't allow to overwrite it.
|
||||
return False
|
||||
|
||||
|
||||
def floppify_widget(widget, field=None):
|
||||
'''
|
||||
Get an instance of django.forms.widgets.Widget and return a new widget
|
||||
instance but using the corresponding floppyforms widget class.
|
||||
|
||||
Only original django widgets will be replaced with a floppyforms version.
|
||||
The widget will be returned unaltered if it is not known, e.g. if it's a
|
||||
custom widget from a third-party app.
|
||||
|
||||
The optional parameter ``field`` can be used to influence the widget
|
||||
creation further. This is useful since floppyforms supports more widgets
|
||||
than django does. For example is django using a ``TextInput`` for a
|
||||
``EmailField``, but floppyforms has a better suiting widget called
|
||||
``EmailInput``. If a widget is found specifically for the passed in
|
||||
``field``, it will take precendence to the first parameter ``widget``
|
||||
which will effectively be ignored.
|
||||
'''
|
||||
if field is not None:
|
||||
create_widget = _django_field_to_floppyform_widget.get(
|
||||
field.__class__)
|
||||
if create_widget is not None:
|
||||
if allow_floppify_widget_for_field(field):
|
||||
return create_widget(widget)
|
||||
create_widget = _django_to_floppyforms_widget.get(widget.__class__)
|
||||
if create_widget is not None:
|
||||
return create_widget(widget)
|
||||
return widget
|
||||
|
||||
|
||||
def floppify_form(form_class):
|
||||
'''
|
||||
Take a normal form and return a subclass of that form that replaces all
|
||||
django widgets with the corresponding floppyforms widgets.
|
||||
'''
|
||||
new_form_class = type(form_class.__name__, (form_class,), {})
|
||||
for field in new_form_class.base_fields.values():
|
||||
field.widget = floppify_widget(field.widget, field=field)
|
||||
return new_form_class
|
||||
|
||||
|
||||
def modelform_factory(model, form=django.forms.models.ModelForm, fields=None,
|
||||
exclude=None, formfield_callback=None, widgets=None):
|
||||
form_class = django.forms.models.modelform_factory(
|
||||
model=model,
|
||||
form=form,
|
||||
fields=fields,
|
||||
exclude=exclude,
|
||||
formfield_callback=formfield_callback,
|
||||
widgets=widgets)
|
||||
return floppify_form(form_class)
|
||||
145
djadmin2/core.py
145
djadmin2/core.py
|
|
@ -1,12 +1,12 @@
|
|||
"""
|
||||
WARNING: This file about to undergo major refactoring by @pydanny per Issue #99.
|
||||
WARNING: This file about to undergo major refactoring by @pydanny per
|
||||
Issue #99.
|
||||
"""
|
||||
from importlib import import_module
|
||||
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.conf import settings
|
||||
from django.urls import re_path
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.utils.importlib import import_module
|
||||
|
||||
|
||||
from . import apiviews
|
||||
from . import types
|
||||
|
|
@ -14,21 +14,25 @@ from . import utils
|
|||
from . import views
|
||||
|
||||
|
||||
class Admin2(object):
|
||||
class Admin2:
|
||||
"""
|
||||
The base Admin2 object.
|
||||
It keeps a registry of all registered Models and collects the urls of their
|
||||
related ModelAdmin2 instances.
|
||||
|
||||
It also provides an index view that serves as an entry point to the admin site.
|
||||
It also provides an index view that serves as an entry point to the
|
||||
admin site.
|
||||
"""
|
||||
|
||||
index_view = views.IndexView
|
||||
login_view = views.LoginView
|
||||
app_index_view = views.AppIndexView
|
||||
api_index_view = apiviews.IndexAPIView
|
||||
|
||||
def __init__(self, name='admin2'):
|
||||
def __init__(self, name="admin2"):
|
||||
self.registry = {}
|
||||
self.apps = {}
|
||||
self.app_verbose_names = {}
|
||||
self.name = name
|
||||
|
||||
def register(self, model, model_admin=None, **kwargs):
|
||||
|
|
@ -44,7 +48,9 @@ class Admin2(object):
|
|||
If a model is already registered, this will raise ImproperlyConfigured.
|
||||
"""
|
||||
if model in self.registry:
|
||||
raise ImproperlyConfigured('%s is already registered in django-admin2' % model)
|
||||
raise ImproperlyConfigured(
|
||||
"%s is already registered in django-admin2" % model
|
||||
)
|
||||
if not model_admin:
|
||||
model_admin = types.ModelAdmin2
|
||||
self.registry[model] = model_admin(model, admin=self, **kwargs)
|
||||
|
|
@ -60,12 +66,15 @@ class Admin2(object):
|
|||
"""
|
||||
Deregisters the given model. Remove the model from the self.app as well
|
||||
|
||||
If the model is not already registered, this will raise ImproperlyConfigured.
|
||||
If the model is not already registered, this will raise
|
||||
ImproperlyConfigured.
|
||||
"""
|
||||
try:
|
||||
del self.registry[model]
|
||||
except KeyError:
|
||||
raise ImproperlyConfigured('%s was never registered in django-admin2' % model)
|
||||
raise ImproperlyConfigured(
|
||||
"%s was never registered in django-admin2" % model
|
||||
)
|
||||
|
||||
# Remove the model from the apps registry
|
||||
# Get the app label
|
||||
|
|
@ -78,6 +87,35 @@ class Admin2(object):
|
|||
if self.apps[app_label] is {}:
|
||||
del self.apps[app_label] # no
|
||||
|
||||
def register_app_verbose_name(self, app_label, app_verbose_name):
|
||||
"""
|
||||
Registers the given app label with the given app verbose name.
|
||||
|
||||
If a app_label is already registered, this will raise
|
||||
ImproperlyConfigured.
|
||||
"""
|
||||
if app_label in self.app_verbose_names:
|
||||
raise ImproperlyConfigured(
|
||||
"%s is already registered in django-admin2" % app_label
|
||||
)
|
||||
|
||||
self.app_verbose_names[app_label] = app_verbose_name
|
||||
|
||||
def deregister_app_verbose_name(self, app_label):
|
||||
"""
|
||||
Deregisters the given app label. Remove the app label from the
|
||||
self.app_verbose_names as well.
|
||||
|
||||
If the app label is not already registered, this will raise
|
||||
ImproperlyConfigured.
|
||||
"""
|
||||
try:
|
||||
del self.app_verbose_names[app_label]
|
||||
except KeyError:
|
||||
raise ImproperlyConfigured(
|
||||
"%s app label was never registered in django-admin2" % app_label
|
||||
)
|
||||
|
||||
def autodiscover(self):
|
||||
"""
|
||||
Autodiscovers all admin2.py modules for apps in INSTALLED_APPS by
|
||||
|
|
@ -87,7 +125,7 @@ class Admin2(object):
|
|||
try:
|
||||
import_module("%s.admin2" % app_name)
|
||||
except ImportError as e:
|
||||
if str(e) == "No module named admin2":
|
||||
if str(e).startswith("No module named") and "admin2" in str(e):
|
||||
continue
|
||||
raise e
|
||||
|
||||
|
|
@ -99,68 +137,75 @@ class Admin2(object):
|
|||
for object_admin in self.registry.values():
|
||||
if object_admin.name == name:
|
||||
return object_admin
|
||||
raise ValueError(u'No object admin found with name {}'.format(repr(name)))
|
||||
raise ValueError("No object admin found with name {}".format(repr(name)))
|
||||
|
||||
def get_index_kwargs(self):
|
||||
return {
|
||||
'registry': self.registry,
|
||||
'apps': self.apps,
|
||||
"registry": self.registry,
|
||||
"app_verbose_names": self.app_verbose_names,
|
||||
"apps": self.apps,
|
||||
"login_view": self.login_view,
|
||||
}
|
||||
|
||||
def get_app_index_kwargs(self):
|
||||
return {
|
||||
'registry': self.registry,
|
||||
'apps': self.apps,
|
||||
"registry": self.registry,
|
||||
"app_verbose_names": self.app_verbose_names,
|
||||
"apps": self.apps,
|
||||
}
|
||||
|
||||
def get_api_index_kwargs(self):
|
||||
return {
|
||||
'registry': self.registry,
|
||||
'apps': self.apps,
|
||||
"registry": self.registry,
|
||||
"app_verbose_names": self.app_verbose_names,
|
||||
"apps": self.apps,
|
||||
}
|
||||
|
||||
def get_urls(self):
|
||||
urlpatterns = patterns('',
|
||||
url(regex=r'^$',
|
||||
urlpatterns = [
|
||||
re_path(
|
||||
r"^$",
|
||||
view=self.index_view.as_view(**self.get_index_kwargs()),
|
||||
name='dashboard'
|
||||
name="dashboard",
|
||||
),
|
||||
url(regex='^auth/user/(?P<pk>\d+)/update/password/$',
|
||||
re_path(
|
||||
r"^auth/user/(?P<pk>\d+)/update/password/$",
|
||||
view=views.PasswordChangeView.as_view(),
|
||||
name='password_change'
|
||||
),
|
||||
url(regex='^password_change_done/$',
|
||||
name="password_change",
|
||||
),
|
||||
re_path(
|
||||
"^password_change_done/$",
|
||||
view=views.PasswordChangeDoneView.as_view(),
|
||||
name='password_change_done'
|
||||
),
|
||||
url(regex='^logout/$',
|
||||
view=views.LogoutView.as_view(),
|
||||
name='logout'
|
||||
),
|
||||
url(
|
||||
regex=r'^(?P<app_label>\w+)/$',
|
||||
name="password_change_done",
|
||||
),
|
||||
re_path("^logout/$", view=views.LogoutView.as_view(), name="logout"),
|
||||
re_path(
|
||||
r"^(?P<app_label>\w+)/$",
|
||||
view=self.app_index_view.as_view(**self.get_app_index_kwargs()),
|
||||
name='app_index'
|
||||
name="app_index",
|
||||
),
|
||||
url(
|
||||
regex=r'^api/v0/$',
|
||||
re_path(
|
||||
r"^api/v0/$",
|
||||
view=self.api_index_view.as_view(**self.get_api_index_kwargs()),
|
||||
name='api_index'
|
||||
name="api_index",
|
||||
),
|
||||
)
|
||||
|
||||
for model, model_admin in self.registry.iteritems():
|
||||
]
|
||||
for model, model_admin in self.registry.items():
|
||||
model_options = utils.model_options(model)
|
||||
urlpatterns += patterns('',
|
||||
url('^{}/{}/'.format(
|
||||
model_options.app_label,
|
||||
model_options.object_name.lower()),
|
||||
include(model_admin.urls)),
|
||||
url('^api/v0/{}/{}/'.format(
|
||||
model_options.app_label,
|
||||
model_options.object_name.lower()),
|
||||
include(model_admin.api_urls)),
|
||||
)
|
||||
urlpatterns += [
|
||||
re_path(
|
||||
"^{}/{}/".format(
|
||||
model_options.app_label, model_options.object_name.lower()
|
||||
),
|
||||
model_admin.urls,
|
||||
),
|
||||
re_path(
|
||||
"^api/v0/{}/{}/".format(
|
||||
model_options.app_label, model_options.object_name.lower()
|
||||
),
|
||||
model_admin.api_urls,
|
||||
),
|
||||
]
|
||||
return urlpatterns
|
||||
|
||||
@property
|
||||
|
|
|
|||
139
djadmin2/filters.py
Normal file
139
djadmin2/filters.py
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
import collections.abc
|
||||
from itertools import chain
|
||||
|
||||
import django_filters
|
||||
from django import forms
|
||||
from django.forms import widgets as django_widgets
|
||||
from django.forms.utils import flatatt
|
||||
from django.utils.encoding import force_str
|
||||
from django.utils.html import format_html
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import gettext_lazy
|
||||
|
||||
from .utils import type_str
|
||||
|
||||
LINK_TEMPLATE = '<a href=?{0}={1} {2}>{3}</a>'
|
||||
|
||||
|
||||
class NumericDateFilter(django_filters.DateFilter):
|
||||
field_class = forms.IntegerField
|
||||
|
||||
|
||||
class ChoicesAsLinksWidget(django_widgets.Select):
|
||||
"""Select form widget that renders links for choices
|
||||
instead of select element with options.
|
||||
"""
|
||||
|
||||
def render(self, name, value, attrs=None, choices=()):
|
||||
links = []
|
||||
for choice_value, choice_label in chain(self.choices, choices):
|
||||
links.append(format_html(
|
||||
LINK_TEMPLATE,
|
||||
name, choice_value, flatatt(attrs), force_str(choice_label),
|
||||
))
|
||||
return mark_safe(u"<br />".join(links))
|
||||
|
||||
|
||||
class NullBooleanLinksWidget(
|
||||
ChoicesAsLinksWidget,
|
||||
django_widgets.NullBooleanSelect
|
||||
):
|
||||
def __init__(self, attrs=None, choices=()):
|
||||
super(ChoicesAsLinksWidget, self).__init__(attrs)
|
||||
self.choices = [
|
||||
('1', gettext_lazy('Unknown')),
|
||||
('2', gettext_lazy('Yes')),
|
||||
('3', gettext_lazy('No')),
|
||||
]
|
||||
|
||||
|
||||
#: Maps `django_filter`'s field filters types to our
|
||||
#: custom form widget.
|
||||
FILTER_TYPE_TO_WIDGET = {
|
||||
django_filters.BooleanFilter: NullBooleanLinksWidget,
|
||||
django_filters.ChoiceFilter: ChoicesAsLinksWidget,
|
||||
django_filters.ModelChoiceFilter: ChoicesAsLinksWidget,
|
||||
}
|
||||
|
||||
|
||||
def build_list_filter(request, model_admin, queryset):
|
||||
"""Builds :class:`~django_filters.FilterSet` instance
|
||||
for :attr:`djadmin2.ModelAdmin2.Meta.list_filter` option.
|
||||
|
||||
If :attr:`djadmin2.ModelAdmin2.Meta.list_filter` is not
|
||||
sequence, it's considered to be class with interface like
|
||||
:class:`django_filters.FilterSet` and its instantiate wit
|
||||
`request.GET` and `queryset`.
|
||||
"""
|
||||
# if ``list_filter`` is not iterable return it right away
|
||||
if not isinstance(model_admin.list_filter, collections.abc.Iterable):
|
||||
return model_admin.list_filter(
|
||||
request.GET,
|
||||
queryset=queryset,
|
||||
)
|
||||
# otherwise build :mod:`django_filters.FilterSet`
|
||||
filters = []
|
||||
for field_filter in model_admin.list_filter:
|
||||
if isinstance(field_filter, str):
|
||||
filters.append(get_filter_for_field_name(
|
||||
queryset.model,
|
||||
field_filter,
|
||||
))
|
||||
else:
|
||||
filters.append(field_filter)
|
||||
filterset_dict = {}
|
||||
for field_filter in filters:
|
||||
filterset_dict[field_filter.field_name] = field_filter
|
||||
fields = list(filterset_dict.keys())
|
||||
filterset_dict['Meta'] = type(
|
||||
type_str('Meta'),
|
||||
(),
|
||||
{
|
||||
'model': queryset.model,
|
||||
'fields': fields,
|
||||
},
|
||||
)
|
||||
return type(type_str('%sFilterSet' % queryset.model.__name__), (django_filters.FilterSet, ), filterset_dict,)(request.GET, queryset=queryset)
|
||||
|
||||
|
||||
def build_date_filter(request, model_admin, queryset, field_name="published_date"):
|
||||
filterset_dict = {
|
||||
"year": NumericDateFilter(
|
||||
field_name=field_name,
|
||||
lookup_expr="year",
|
||||
),
|
||||
"month": NumericDateFilter(
|
||||
field_name=field_name,
|
||||
lookup_expr="month",
|
||||
),
|
||||
"day": NumericDateFilter(
|
||||
field_name=field_name,
|
||||
lookup_expr="day",
|
||||
)
|
||||
}
|
||||
filterset_dict["Meta"] = type(
|
||||
type_str('Meta'),
|
||||
(object, ),
|
||||
{"model": queryset.model, "fields": [field_name]},
|
||||
)
|
||||
|
||||
return type(
|
||||
type_str('%sDateFilterSet' % queryset.model.__name__),
|
||||
(django_filters.FilterSet,),
|
||||
filterset_dict,
|
||||
)(request.GET, queryset=queryset)
|
||||
|
||||
|
||||
def get_filter_for_field_name(model, field_name):
|
||||
"""Returns filter for model field by field name.
|
||||
"""
|
||||
filter_ = django_filters.FilterSet.filter_for_field(
|
||||
django_filters.filterset.get_model_field(model, field_name,),
|
||||
field_name,
|
||||
)
|
||||
print("EXTRA!!!!")
|
||||
print(filter_.extra)
|
||||
filter_.widget = FILTER_TYPE_TO_WIDGET.get(
|
||||
filter_.__class__
|
||||
)
|
||||
return filter_
|
||||
|
|
@ -1,239 +1,19 @@
|
|||
from __future__ import unicode_literals
|
||||
from copy import deepcopy
|
||||
|
||||
from django import forms
|
||||
from django.contrib.auth import authenticate
|
||||
from django.contrib.auth.forms import AuthenticationForm
|
||||
import django.forms
|
||||
import django.forms.models
|
||||
import django.forms.extras.widgets
|
||||
from django.utils.translation import ugettext_lazy
|
||||
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
import floppyforms
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
_WIDGET_COMMON_ATTRIBUTES = (
|
||||
'is_hidden',
|
||||
'needs_multipart_form',
|
||||
'is_localized',
|
||||
'is_required')
|
||||
|
||||
_WIDGET_COMMON_ARGUMENTS = ('attrs',)
|
||||
|
||||
|
||||
def _copy_attributes(original, new_widget, attributes):
|
||||
for attr in attributes:
|
||||
original_value = getattr(original, attr)
|
||||
original_value = deepcopy(original_value)
|
||||
setattr(new_widget, attr, original_value)
|
||||
|
||||
|
||||
def _create_widget(widget_class, copy_attributes=(), init_arguments=()):
|
||||
# attach defaults that apply for all widgets
|
||||
copy_attributes = tuple(copy_attributes) + _WIDGET_COMMON_ATTRIBUTES
|
||||
init_arguments = tuple(init_arguments) + _WIDGET_COMMON_ARGUMENTS
|
||||
|
||||
def create_new_widget(original):
|
||||
kwargs = {}
|
||||
for argname in init_arguments:
|
||||
kwargs[argname] = getattr(original, argname)
|
||||
new_widget = widget_class(**kwargs)
|
||||
_copy_attributes(
|
||||
original,
|
||||
new_widget,
|
||||
copy_attributes)
|
||||
return new_widget
|
||||
return create_new_widget
|
||||
|
||||
|
||||
def _create_radioselect(original):
|
||||
# return original widget if the renderer is something else than what
|
||||
# django ships with by default. This means if this condition evaluates to
|
||||
# true, then a custom renderer was specified. We cannot emulate its
|
||||
# behaviour so we shouldn't guess and just return the original widget
|
||||
if original.renderer is not django.forms.widgets.RadioFieldRenderer:
|
||||
return original
|
||||
create_new_widget = _create_widget(
|
||||
floppyforms.widgets.RadioSelect,
|
||||
('allow_multiple_selected',))
|
||||
return create_new_widget(original)
|
||||
|
||||
|
||||
def _create_splitdatetimewidget(widget_class):
|
||||
def create_new_widget(original):
|
||||
new_widget = widget_class(
|
||||
attrs=original.attrs,
|
||||
date_format=original.widgets[0].format,
|
||||
time_format=original.widgets[1].format)
|
||||
_copy_attributes(original, new_widget, _WIDGET_COMMON_ARGUMENTS)
|
||||
return new_widget
|
||||
return create_new_widget
|
||||
|
||||
|
||||
def _create_multiwidget(widget_class, copy_attributes=(), init_arguments=()):
|
||||
create_new_widget = _create_widget(widget_class, copy_attributes,
|
||||
init_arguments)
|
||||
|
||||
def create_new_multiwidget(original):
|
||||
multiwidget = create_new_widget(original)
|
||||
multiwidget.widgets = [
|
||||
floppify_widget(widget)
|
||||
for widget in multiwidget.widgets]
|
||||
return multiwidget
|
||||
return create_new_multiwidget
|
||||
|
||||
|
||||
# this dictionary keeps a mapping from django's widget classes to a callable
|
||||
# that will accept an instance of this class. It will return a new instance of
|
||||
# a corresponding floppyforms widget, with the same semantics -- all relevant
|
||||
# attributes will be copied to the new widget.
|
||||
_django_to_floppyforms_widget = {
|
||||
django.forms.widgets.Input:
|
||||
_create_widget(floppyforms.widgets.Input, ('input_type',)),
|
||||
django.forms.widgets.TextInput:
|
||||
_create_widget(floppyforms.widgets.TextInput, ('input_type',)),
|
||||
django.forms.widgets.PasswordInput:
|
||||
_create_widget(floppyforms.widgets.PasswordInput, ('input_type',)),
|
||||
django.forms.widgets.HiddenInput:
|
||||
_create_widget(floppyforms.widgets.HiddenInput, ('input_type',)),
|
||||
django.forms.widgets.MultipleHiddenInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.MultipleHiddenInput,
|
||||
('input_type',),
|
||||
init_arguments=('choices',)),
|
||||
django.forms.widgets.FileInput:
|
||||
_create_widget(floppyforms.widgets.FileInput, ('input_type',)),
|
||||
django.forms.widgets.ClearableFileInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.ClearableFileInput,
|
||||
(
|
||||
'input_type', 'initial_text', 'input_text',
|
||||
'clear_checkbox_label', 'template_with_initial',
|
||||
'template_with_clear')),
|
||||
django.forms.widgets.Textarea:
|
||||
_create_widget(floppyforms.widgets.Textarea),
|
||||
django.forms.widgets.DateInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.DateInput,
|
||||
init_arguments=('format',)),
|
||||
django.forms.widgets.DateTimeInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.DateTimeInput,
|
||||
init_arguments=('format',)),
|
||||
django.forms.widgets.TimeInput:
|
||||
_create_widget(
|
||||
floppyforms.widgets.TimeInput,
|
||||
init_arguments=('format',)),
|
||||
django.forms.widgets.CheckboxInput:
|
||||
_create_widget(floppyforms.widgets.CheckboxInput, ('check_test',)),
|
||||
django.forms.widgets.Select:
|
||||
_create_widget(
|
||||
floppyforms.widgets.Select,
|
||||
('allow_multiple_selected',)),
|
||||
django.forms.widgets.NullBooleanSelect:
|
||||
_create_widget(
|
||||
floppyforms.widgets.NullBooleanSelect,
|
||||
('allow_multiple_selected',)),
|
||||
django.forms.widgets.SelectMultiple:
|
||||
_create_widget(
|
||||
floppyforms.widgets.SelectMultiple,
|
||||
('allow_multiple_selected',)),
|
||||
django.forms.widgets.RadioSelect:
|
||||
_create_radioselect,
|
||||
django.forms.widgets.CheckboxSelectMultiple:
|
||||
_create_widget(floppyforms.widgets.CheckboxSelectMultiple),
|
||||
django.forms.widgets.MultiWidget:
|
||||
_create_widget(
|
||||
floppyforms.widgets.MultiWidget,
|
||||
init_arguments=('widgets',)),
|
||||
django.forms.widgets.SplitDateTimeWidget:
|
||||
_create_splitdatetimewidget(
|
||||
floppyforms.widgets.SplitDateTimeWidget),
|
||||
django.forms.widgets.SplitHiddenDateTimeWidget:
|
||||
_create_splitdatetimewidget(
|
||||
floppyforms.widgets.SplitHiddenDateTimeWidget),
|
||||
django.forms.extras.widgets.SelectDateWidget:
|
||||
_create_widget(
|
||||
floppyforms.widgets.SelectDateWidget,
|
||||
init_arguments=('years', 'required')),
|
||||
}
|
||||
|
||||
_django_field_to_floppyform_widget = {
|
||||
django.forms.fields.FloatField:
|
||||
_create_widget(floppyforms.widgets.NumberInput),
|
||||
django.forms.fields.DecimalField:
|
||||
_create_widget(floppyforms.widgets.NumberInput),
|
||||
django.forms.fields.IntegerField:
|
||||
_create_widget(floppyforms.widgets.NumberInput),
|
||||
django.forms.fields.EmailField:
|
||||
_create_widget(floppyforms.widgets.EmailInput),
|
||||
django.forms.fields.URLField:
|
||||
_create_widget(floppyforms.widgets.URLInput),
|
||||
django.forms.fields.SlugField:
|
||||
_create_widget(floppyforms.widgets.SlugInput),
|
||||
django.forms.fields.IPAddressField:
|
||||
_create_widget(floppyforms.widgets.IPAddressInput),
|
||||
django.forms.fields.SplitDateTimeField:
|
||||
_create_splitdatetimewidget(floppyforms.widgets.SplitDateTimeWidget),
|
||||
}
|
||||
|
||||
|
||||
def floppify_widget(widget, field=None):
|
||||
'''
|
||||
Get an instance of django.forms.widgets.Widget and return a new widget
|
||||
instance but using the corresponding floppyforms widget class.
|
||||
|
||||
Only original django widgets will be replaced with a floppyforms version.
|
||||
The widget will be returned unaltered if it is not known, e.g. if it's a
|
||||
custom widget from a third-party app.
|
||||
|
||||
The optional parameter ``field`` can be used to influence the widget
|
||||
creation further. This is useful since floppyforms supports more widgets
|
||||
than django does. For example is django using a ``TextInput`` for a
|
||||
``EmailField``, but floppyforms has a better suiting widget called
|
||||
``EmailInput``. If a widget is found specifically for the passed in
|
||||
``field``, it will take precendence to the first parameter ``widget``
|
||||
which will effectively be ignored.
|
||||
'''
|
||||
if field is not None:
|
||||
create_widget = _django_field_to_floppyform_widget.get(
|
||||
field.__class__)
|
||||
if create_widget is not None:
|
||||
# check if the default widget was replaced by a different one, in
|
||||
# that case we cannot create the field specific floppyforms
|
||||
# widget.
|
||||
if field.widget.__class__ is field.__class__.widget:
|
||||
return create_widget(widget)
|
||||
create_widget = _django_to_floppyforms_widget.get(widget.__class__)
|
||||
if create_widget is not None:
|
||||
return create_widget(widget)
|
||||
return widget
|
||||
|
||||
|
||||
def floppify_form(form_class):
|
||||
'''
|
||||
Take a normal form and return a subclass of that form that replaces all
|
||||
django widgets with the corresponding floppyforms widgets.
|
||||
'''
|
||||
new_form_class = type(form_class.__name__, (form_class,), {})
|
||||
for field in new_form_class.base_fields.values():
|
||||
field.widget = floppify_widget(field.widget, field=field)
|
||||
return new_form_class
|
||||
|
||||
|
||||
def modelform_factory(model, form=django.forms.models.ModelForm, fields=None,
|
||||
exclude=None, formfield_callback=None, widgets=None):
|
||||
form_class = django.forms.models.modelform_factory(
|
||||
model=model,
|
||||
form=form,
|
||||
fields=fields,
|
||||
exclude=exclude,
|
||||
formfield_callback=formfield_callback,
|
||||
widgets=widgets)
|
||||
return floppify_form(form_class)
|
||||
|
||||
|
||||
ERROR_MESSAGE = ugettext_lazy("Please enter the correct %(username)s and password "
|
||||
"for a staff account. Note that both fields may be case-sensitive.")
|
||||
# Translators : %(username)s will be replaced by the username_field name
|
||||
# (default : username, but could be email, or something else)
|
||||
ERROR_MESSAGE = _(
|
||||
"Please enter the correct %(username)s and password "
|
||||
"for a staff account. Note that both fields may be case-sensitive."
|
||||
)
|
||||
|
||||
|
||||
class AdminAuthenticationForm(AuthenticationForm):
|
||||
|
|
@ -242,8 +22,14 @@ class AdminAuthenticationForm(AuthenticationForm):
|
|||
Liberally copied from django.contrib.admin.forms.AdminAuthenticationForm
|
||||
|
||||
"""
|
||||
this_is_the_login_form = django.forms.BooleanField(widget=floppyforms.HiddenInput, initial=1,
|
||||
error_messages={'required': ugettext_lazy("Please log in again, because your session has expired.")})
|
||||
error_messages = {
|
||||
'required': _("Please log in again, because your session has expired."),
|
||||
}
|
||||
this_is_the_login_form = forms.BooleanField(
|
||||
widget=forms.HiddenInput,
|
||||
initial=1,
|
||||
error_messages=error_messages
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
username = self.cleaned_data.get('username')
|
||||
|
|
@ -253,11 +39,28 @@ class AdminAuthenticationForm(AuthenticationForm):
|
|||
if username and password:
|
||||
self.user_cache = authenticate(username=username, password=password)
|
||||
if self.user_cache is None:
|
||||
raise floppyforms.ValidationError(message % {
|
||||
raise ValidationError(message % {
|
||||
'username': self.username_field.verbose_name
|
||||
})
|
||||
elif not self.user_cache.is_active or not self.user_cache.is_staff:
|
||||
raise floppyforms.ValidationError(message % {
|
||||
raise ValidationError(message % {
|
||||
'username': self.username_field.verbose_name
|
||||
})
|
||||
return self.cleaned_data
|
||||
|
||||
|
||||
class Admin2UserCreationForm(UserCreationForm):
|
||||
pass
|
||||
|
||||
|
||||
class Admin2UserChangeForm(UserChangeForm):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
print(self.fields['password'].help_text)
|
||||
self.fields['password'].help_text = _("Raw passwords are not stored, so there is no way to see this user's password, but you can change the password using <a href=\"%s\">this form</a>." % self.get_update_password_url())
|
||||
|
||||
def get_update_password_url(self):
|
||||
if self.instance and self.instance.pk:
|
||||
return reverse_lazy('admin2:password_change', args=[self.instance.pk])
|
||||
return 'password/'
|
||||
|
|
|
|||
BIN
djadmin2/locale/bs/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/bs/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
295
djadmin2/locale/bs/LC_MESSAGES/django.po
Normal file
295
djadmin2/locale/bs/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Translators:
|
||||
# amarsahinovic, 2013
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-07 21:32+0000\n"
|
||||
"Last-Translator: amarsahinovic\n"
|
||||
"Language-Team: Bosnian (http://www.transifex.com/projects/p/django-admin2/"
|
||||
"language/bs/)\n"
|
||||
"Language: bs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Stavke moraju biti odabrane da bi se nad njima izvodile akcije. Nijedna "
|
||||
"stavka nije promijenjena."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Izbrišite odabrane stavke"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Uspješno izbrisano %(count)s %(items)s"
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Uspješno izbrisano %(count)s %(items)s"
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Nepoznato"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Da"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "Ne"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Molimo unesite ispravno %(username)s i lozinku za račun osoblja. Imajte na "
|
||||
"umu da oba polja mogu sadržavati velika i mala slova."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Molimo prijavite se ponovo, vaša sesija je istekla."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Promijeni"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Dodaj"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Početna"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s administracija"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Administracija stranice"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Dokumentacija"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Prijavljen kao %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Promijeni lozinku"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Odjavi se"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Nedavne akcije"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "Moje akcije"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Da li ste sigurni?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Izbriši"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Da li ste sigurni da želite obrisati %(model_name)s \"%(object)s\"?\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Sve navedene stavke će biti obrisane:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Sve navedene stavke će biti obrisane:\n"
|
||||
msgstr[2] ""
|
||||
"\n"
|
||||
"Sve navedene stavke će biti obrisane:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Da, siguran sam"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Odaberite %(model_name)s za izmjenu"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Pojam za pretragu"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Traži"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(action_name)s %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Da li ste sigurni da želite obrisati odabrani %(objects_name)s? Sve navedene "
|
||||
"stavke će biti obrisane:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Da li ste sigurni da želite obrisati odabrane %(objects_name)s? Sve navedene "
|
||||
"stavke će biti obrisane:\n"
|
||||
msgstr[2] ""
|
||||
"\n"
|
||||
"Da li ste sigurni da želite obrisati odabrane %(objects_name)s? Sve navedene "
|
||||
"stavke će biti obrisane:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Prijavi se"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Molimo ispravite dole navedenu grešku."
|
||||
msgstr[1] "Molimo ispravite dole navedene greške."
|
||||
msgstr[2] "Molimo ispravite dole navedene greške."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "Hvala što ste proveli kvalitetno vrijeme na stranici danas."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Prijavite se ponovo"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Promjena lozinke uspješna"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Vaša lozinka je promijenjena."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Promjena lozinke"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"Molimo unesite vašu staru lozinku, iz sigurnosnih razloga, a zatim unesite "
|
||||
"Vašu novu lozinku dva puta da bi mogli biti sigurni da ste je unijeli "
|
||||
"ispravno."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Promijeni moju lozinku"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "%(selected)s od %(total)s ukupno"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "Dodaj %(model_verbose_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Sačuvaj i dodaj još jedan"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Sačuvaj i nastavi sa izmjenama"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Sačuvaj"
|
||||
BIN
djadmin2/locale/ca/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/ca/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
266
djadmin2/locale/ca/LC_MESSAGES/django.po
Normal file
266
djadmin2/locale/ca/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Ignasi Fosch Alonso <natx@y10k.ws>, 2013.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-06 14:47+0200\n"
|
||||
"Last-Translator: Ignasi Fosch Alonso <natx@y10k.ws>\n"
|
||||
"Language-Team: https://www.transifex.com/projects/p/django-admin2/language/"
|
||||
"ca/\n"
|
||||
"Language: ca\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
BIN
djadmin2/locale/de/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/de/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
289
djadmin2/locale/de/LC_MESSAGES/django.po
Normal file
289
djadmin2/locale/de/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Translators:
|
||||
# a7p <albrecht@a7p.org>, 2013
|
||||
# dbrgn <gezuru@gmail.com>, 2013
|
||||
# Jannis Leidel <jannis@leidel.info>, 2013
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-08 08:45+0000\n"
|
||||
"Last-Translator: dbrgn <gezuru@gmail.com>\n"
|
||||
"Language-Team: German (http://www.transifex.com/projects/p/django-admin2/"
|
||||
"language/de/)\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Damit Aktionen ausgeführt werden können, müssen Einträge markiert werden. Es "
|
||||
"wurden keine Einträge verändert."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Ausgewählte Einträge löschen"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Erfolgreich %(count)s %(items)s gelöscht."
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Erfolgreich %(count)s %(items)s gelöscht."
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Unbekannt"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Ja"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "Nein"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Bitte geben Sie den korrekten %(username)s und Passwort für einen \"Staff\" "
|
||||
"Accout ein. Beachten Sie in beiden Feldern Groß-/Kleinschreibung."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Bitte melden Sie sich erneut an, da ihre Sitzung abgelaufen ist."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Ändern"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Hinzufügen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s Verwaltung"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Site Verwaltung"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Dokumentation"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Angemeldet als %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Passwort ändern"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Abmelden"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Neuste Aktionen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "Meine Aktionen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Sind Sie sicher?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Löschen"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Sind Sie sicher, dass Sie den %(model_name)s-Eintrag \"%(object)s\" löschen "
|
||||
"möchten?\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Der folgende Eintrag wird gelöscht:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Folgenden Einträge werden gelöscht:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Ja, ich bin sicher"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Wählen Sie den zu ändernden %(model_name)s Eintrag."
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Suchbegriff"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Suchen"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(model_name)s %(action_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Sind Sie sicher, dass Sie das ausgewählte %(objects_name)s löschen möchten? "
|
||||
"Die folgenden Einträge werden gelöscht:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Sind Sie sicher, dass Sie die ausgewählten %(objects_name)s löschen möchten? "
|
||||
"Die folgenden Einträge werden gelöscht:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Anmelden"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Bitte korrigieren Sie den untenstehenden Fehler."
|
||||
msgstr[1] "Bitte korrigieren Sie die untenstehenden Fehler."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "Vielen Dank, dass Sie hier ein paar nette Minuten verbracht haben."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Erneut einloggen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Passwort erfolgreich geändert"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Ihr Passwort wurde geändert."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Passwort ändern"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"Bitte geben Sie aus Sicherheitsgründen erst Ihr altes Passwort und darunter "
|
||||
"dann zweimal (um sicherzustellen, dass Sie es korrekt eingegeben haben) das "
|
||||
"neue Passwort ein."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Mein Passwort ändern"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "%(selected)s von %(total)s ausgewählt"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "%(model_verbose_name)s hinzufügen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Sichern und neu hinzufügen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Speichern und weiter bearbeiten"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Speichern"
|
||||
BIN
djadmin2/locale/en/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/en/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
275
djadmin2/locale/en/LC_MESSAGES/django.po
Normal file
275
djadmin2/locale/en/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-06 13:27+0200\n"
|
||||
"Last-Translator: NotSqrt <notsqrt@gmail.com>\n"
|
||||
"Language-Team: English (https://www.transifex.com/projects/p/django-admin2/language/en_US/)\n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Delete selected items"
|
||||
|
||||
#: actions.py:153
|
||||
#, fuzzy, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Successfully deleted %(count)s %(items)s"
|
||||
|
||||
#: actions.py:157
|
||||
#, fuzzy, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Successfully deleted %(count)s %(items)s"
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Unknown"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Yes"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Please log in again, because your session has expired."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Change"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Add"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s administration"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Site administration"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Documentation"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Logged in as %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Change password"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Log out"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Recent Actions"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "My Actions"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Are you sure?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Delete"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, fuzzy, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"? All of "
|
||||
"the following items will be deleted:"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Yes, I'm sure"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Select %(model_name)s to change"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Search Term"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Search"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, fuzzy, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(action)s %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, fuzzy, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"Are you sure you want to delete the selected %(objects_name)s? All of the "
|
||||
"following items will be deleted:"
|
||||
msgstr[1] ""
|
||||
"Are you sure you want to delete the selected %(objects_name)s? All of the "
|
||||
"following items will be deleted:"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Log in"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Please correct the error below."
|
||||
msgstr[1] "Please correct the errors below."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "Thanks for spending some quality time with the Web site today."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Log in again"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Password change successful"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Your password was changed."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Password change"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Change my password"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "%(selected)s of %(total)s selected"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "Add %(model_verbose_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Save and add another"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Save and continue editing"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Save"
|
||||
BIN
djadmin2/locale/es/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/es/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
266
djadmin2/locale/es/LC_MESSAGES/django.po
Normal file
266
djadmin2/locale/es/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Danilo Bargen <gezuru@gmail.com>, 2013.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-06 14:47+0200\n"
|
||||
"Last-Translator: Danilo Bargen <gezuru@gmail.com>\n"
|
||||
"Language-Team: https://www.transifex.com/projects/p/django-admin2/language/"
|
||||
"es/\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
BIN
djadmin2/locale/fr/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/fr/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
286
djadmin2/locale/fr/LC_MESSAGES/django.po
Normal file
286
djadmin2/locale/fr/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# NotSqrt <notsqrt@gmail.com>, 2013.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-06 13:27+0200\n"
|
||||
"Last-Translator: NotSqrt <notsqrt@gmail.com>\n"
|
||||
"Language-Team: https://www.transifex.com/projects/p/django-admin2/language/"
|
||||
"fr/\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Des éléments doivent être sélectionnés afin d'appliquer les actions. Aucun "
|
||||
"élément n'a été modifié."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Supprimer les objets sélectionnés"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "%(count)s %(items)s a été supprimé avec succès."
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "%(count)s %(items)s ont été supprimés avec succès."
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Inconnu"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Veuillez compléter correctement les champs « %(username)s » et « mot de "
|
||||
"passe » d'un compte autorisé. Sachez que les deux champs peuvent être "
|
||||
"sensibles à la casse."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Reconnectez-vous car votre session a expiré."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Modifier"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Ajouter"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Accueil"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "Administration de %(app_label)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Administration du site"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Documentation"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Connecté en tant que %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Modifier votre mot de passe"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Déconnexion"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Actions récentes"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "Mes actions"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Êtes-vous sûr ?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Voulez-vous vraiment supprimer l'objet %(model_name)s « %(object)s » ?\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"L'élément suivant sera supprimé :\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Les éléments suivants seront supprimés :\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Oui, je suis sûr"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Sélectionnez l'objet %(model_name)s à modifier"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Terme à rechercher"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Recherche"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(action_name)s %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Voulez-vous vraiment supprimer l'objet %(objects_name)s sélectionné ? "
|
||||
"L'élément suivant sera supprimé :\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Voulez-vous vraiment supprimer les objets %(objects_name)s sélectionnés ? "
|
||||
"Les éléments suivants seront supprimés :\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Connexion"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Corrigez l'erreur suivante."
|
||||
msgstr[1] "Corrigez les erreurs suivantes."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "Merci pour le temps que vous avez accordé à ce site aujourd'hui."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Connectez-vous à nouveau"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Mot de passe modifié avec succès"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Votre mot de passe a été modifié."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Modification de votre mot de passe"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"Pour des raisons de sécurité, saisissez votre ancien mot de passe puis votre "
|
||||
"nouveau mot de passe à deux reprises afin de vérifier qu'il est correctement "
|
||||
"saisi."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Modifier mon mot de passe"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "%(selected)s sur %(total)s sélectionnés"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "Ajouter %(model_verbose_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Enregistrer et ajouter un nouveau"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Enregistrer et continuer les modifications"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Enregistrer"
|
||||
BIN
djadmin2/locale/it/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/it/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
266
djadmin2/locale/it/LC_MESSAGES/django.po
Normal file
266
djadmin2/locale/it/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Margherita Zamponi <margherita.zamponi@gmail.com>
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-06 14:47+0200\n"
|
||||
"Last-Translator: Margherita Zamponi <margherita.zamponi@gmail.com>\n"
|
||||
"Language-Team: https://www.transifex.com/projects/p/django-admin2/language/"
|
||||
"it/\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr ""
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr ""
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
BIN
djadmin2/locale/nl/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/nl/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
288
djadmin2/locale/nl/LC_MESSAGES/django.po
Normal file
288
djadmin2/locale/nl/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,288 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Translators:
|
||||
# Density21.5 <jasper@plainspace.com>, 2013
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-08 10:54+0000\n"
|
||||
"Last-Translator: Density21.5 <jasper@plainspace.com>\n"
|
||||
"Language-Team: Dutch (http://www.transifex.com/projects/p/django-admin2/"
|
||||
"language/nl/)\n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Om acties uit kunnen voeren moeten er onderdelen geselecteerd zijn. Er zijn "
|
||||
"geen onderdelen gewijzigd."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Verwijder geselecteerde onderdelen"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "%(count)s %(items)s succesvol verwijderd"
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "%(count)s %(items)s succesvol verwijderd"
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Onbekend"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Ja"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "Nee"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Voer alstublieft een correcte %(username)s en wachtwoord combinatie met "
|
||||
"beheer privileges in. Let er op dat beide velden hoofdletter-gevoelig zijn."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Uw sessie is verlopen, logt u alstublieft opnieuw in."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Wijzigen"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Toevoegen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s beheer"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Site beheer"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Documentatie"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Ingelogd als %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Wijzig wachtwoord"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Uitloggen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Recente acties"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "Mijn acties"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Weet u het zeker?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Verwijderen"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Weet u zeker dat u %(model_name)s \"%(object)s\" wilt verwijderen?\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Het volgende onderdeel zal verwijderd worden:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"De volgende onderdelen zullen verwijderd worden:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Ja, Ik weet het zeker"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Selecteer te wijzigen %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Zoekterm"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Zoek"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(model_name)s %(action_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Weet u zeker dat u geselecteerd \"%(objects_name)s\" wilt verwijderen? De "
|
||||
"volgende onderdelen zullen allemaal verwijderd worden:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Weet u zeker dat u geselecteerde \"%(objects_name)s\" wilt verwijderen? De "
|
||||
"volgende onderdelen zullen allemaal verwijderd worden:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Inloggen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Corrigeert u alstublieft de onderstaande fout."
|
||||
msgstr[1] "Corrigeert u alstublieft de onderstaande fouten"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr ""
|
||||
"Hartelijk dank voor het doorbrengen van enige momenten van uw waardevolle "
|
||||
"tijd met de website."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Opnieuw inloggen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Wachtwoord succesvol gewijzigd"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Uw wachtwoord is gewijzigd"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Wachtwoord wijzigen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"Voert u alstublieft, om veiligheidsredenen, uw oude wachtwoord in en voer "
|
||||
"vervolgens uw nieuwe wachtwoord tweemaal in om te verifiëren dat u het "
|
||||
"wachtwoord correct intypt."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Wijzig mijn wachtwoord"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "%(selected)s van %(total)s geselecteerd"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "Voeg %(model_verbose_name)s toe"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Opslaan en een nieuwe toevoegen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Opslaan en doorgaan met wijzigen"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Opslaan"
|
||||
BIN
djadmin2/locale/pl_PL/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/pl_PL/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
297
djadmin2/locale/pl_PL/LC_MESSAGES/django.po
Normal file
297
djadmin2/locale/pl_PL/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,297 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Translators:
|
||||
# dasm <smigiel.dariusz@gmail.com>, 2013
|
||||
# Marcin Jabrzyk <marcin.jabrzyk@gmail.com>, 2013
|
||||
# Marcin Jabrzyk <marcin.jabrzyk@gmail.com>, 2013
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-08 17:49+0000\n"
|
||||
"Last-Translator: dasm <smigiel.dariusz@gmail.com>\n"
|
||||
"Language-Team: Polish (Poland) (http://www.transifex.com/projects/p/django-"
|
||||
"admin2/language/pl_PL/)\n"
|
||||
"Language: pl_PL\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||
"|| n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Wykonanie akcji wymaga wybrania elementów. Żaden element nie został "
|
||||
"zmieniony."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Usuń wybrane obiekty"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Pomyślnie usunięto %(count)s %(items)s"
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Pomyślnie usunięto %(count)s %(items)s"
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Nieznany"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Tak"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "Nie"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Proszę wprowadzić poprawne %(username)s i hasło do konta administratora. "
|
||||
"Należy pamiętać, że oba pola mogą rozróżniać wielkość wprowadzonych znaków."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Proszę zalogować się ponownie, ponieważ twoja sesja wygasła."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Zmień"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Dodaj"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Początek"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s - administracja"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Administracja stroną"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Dokumentacja"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Zalogowano jako %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Zmień hasło"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Wyloguj się"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Ostatnie akcje"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "Moje akcje"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Jesteś pewien?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Usuń"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Czy chcesz skasować %(model_name)s \"%(object)s\"?\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Następujące element zostanie skasowany:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Następujące elementy zostaną skasowane:\n"
|
||||
msgstr[2] ""
|
||||
"\n"
|
||||
"Następujące elementy zostaną skasowane:\n"
|
||||
"\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Tak, na pewno"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Wybierz %(model_name)s aby zmienić"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Poszukiwane wyrażenie"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Szukaj"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(action_name)s %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Czy chcesz skasować wybrany %(objects_name)s? Następujący obiekt zostanie "
|
||||
"usunięty:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Czy chcesz skasować wybrane %(objects_name)s? Następujące obiekty zostaną "
|
||||
"usunięte:\n"
|
||||
msgstr[2] ""
|
||||
"\n"
|
||||
"Czy chcesz skasować wybrane %(objects_name)s? Następujące elementy zostaną "
|
||||
"usunięte:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Zaloguj się"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Proszę, popraw poniższy błąd."
|
||||
msgstr[1] "Proszę, popraw poniższe błędy."
|
||||
msgstr[2] "Proszę popraw poniższe błędy."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "Dziękujemy za czas spędzony na tej stronie."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Zaloguj się ponownie"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Hasło zostało pomyślnie zmienione"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Twoje hasło zostało zmienione."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Zmiana hasła"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"W celach bezpieczeństwa podaj swoje stare hasło oraz wprowadź dwukrotnie "
|
||||
"nowe hasło, by można było zweryfikować jego poprawność."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Zmień moje hasło"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "%(selected)s z %(total)s wybranych"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "Dodaj %(model_verbose_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Zapisz i dodaj nowe"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Zapisz i kontynuuj edycję"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Zapisz"
|
||||
BIN
djadmin2/locale/pt_BR/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/pt_BR/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
287
djadmin2/locale/pt_BR/LC_MESSAGES/django.po
Normal file
287
djadmin2/locale/pt_BR/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Translators:
|
||||
# andrewsmedina <andrewsmedina@gmail.com>, 2013
|
||||
# Douglas Miranda <douglasmirandasilva@gmail.com>, 2013
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-09 05:03+0000\n"
|
||||
"Last-Translator: Douglas Miranda <douglasmirandasilva@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/"
|
||||
"django-admin2/language/pt_BR/)\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Os itens devem ser selecionados, a fim de executar ações sobre eles. Não há "
|
||||
"itens que foram alterados."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Remover itens selecionados"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "%(count)s %(items)s removidos com sucesso"
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "%(count)s %(items)s removidos com sucesso"
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Desconhecido"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Sim"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "Não"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Por favor digite o %(username)s e senha corretos para uma conta pessoal. "
|
||||
"Note-se que ambos os campos podem diferenciar maiúsculas de minúsculas."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Por favor autentique-se novamente, porque sua sessão expirou."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Alterar"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Adicionar"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Página inicial"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s administração"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Administração"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Documentação"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Autenticado como %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Alterar senha"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Sair"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Ações Recentes"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "Minhas Ações"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Você está certo?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Remover"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Você está certo em querer remover os %(model_name)s \"%(object)s\"?\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"O item seguinte será removido:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Todos os itens seguintes serão removidos:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Sim, eu estou certo"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Selecione %(model_name)s para alterar"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Buscar Termo"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Buscar"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(action_name)s %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Você está certo em querer remover o %(objects_name)s selecionado? Todos os "
|
||||
"itens seguintes serão removidos:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Você está certo em querer remover os %(objects_name)s selecionados? Todo os "
|
||||
"itens seguintes serão removidos:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Autentique-se"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Por favor corrija o erro abaixo."
|
||||
msgstr[1] "Por favor, corrija os erros abaixo."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "Obrigado por passar algum tempo com o site hoje."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Autentique-se novamente"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Senha alterada com sucesso"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Sua senha foi alterada."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Alterar senha"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"Por favor, digite sua senha antiga, por questões de segurança, e, em "
|
||||
"seguida, digite a nova senha duas vezes, para que possamos verificar se você "
|
||||
"digitou corretamente."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Alterar minha senha"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "%(selected)s de %(total)s selecionados"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "Adicionar %(model_verbose_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Salvar e adicionar outro"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Salvar e continuar editando"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Salvar"
|
||||
BIN
djadmin2/locale/sk/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/sk/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
293
djadmin2/locale/sk/LC_MESSAGES/django.po
Normal file
293
djadmin2/locale/sk/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Ivana Kellyerova <eruraina@gmail.com>, 2013
|
||||
# marekzelinka <mzelinka@myopera.com>, 2013
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-07 18:39+0000\n"
|
||||
"Last-Translator: marekzelinka <mzelinka@myopera.com>\n"
|
||||
"Language-Team: Slovak (http://www.transifex.com/projects/p/django-admin2/"
|
||||
"language/sk/)\n"
|
||||
"Language: sk\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr ""
|
||||
"Nevybrali ste položky, ktoré chcete zmeniť. Žiadne položky neboli zmenené."
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "Odstrániť označené položky"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Úspešne vymazaných %(count)s %(items)s"
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "Úspešne vymazaných %(count)s %(items)s"
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "Neznámy"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "Áno"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "Nie"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr ""
|
||||
"Prosím, vyplňte správne položku %(username)s a heslo správcovského účtu. "
|
||||
"Zoberte do úvahy, že v oboch prípadoch sa môžu rozlišovať veľké a malé "
|
||||
"písmená."
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "Vaše prihlásenie vypršalo. Prihláste sa, prosím, znova."
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "Zmeniť"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "Pridať"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "Domov"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s administrácia"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "Administrácia stránky"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "Dokumentácia"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "Prihlásený/-á ako %(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "Zmeniť heslo"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "Odhlásiť sa"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "Posledné zmeny"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "Moje zmeny"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "Určite?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "Odstrániť"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Určite chcete vymazať %(model_name)s \"%(object)s\"?\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Nasledujúca položka bude vymazaná:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Nasledujúce položky budú vymazané:\n"
|
||||
msgstr[2] ""
|
||||
"\n"
|
||||
"Nasledujúce položky budú vymazané:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "Áno, určite"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "Vyberte %(model_name)s na zmenu"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "Vyhľadávaný výraz"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "Hľadať"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(action_name)s %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"Určite chcete vymazať zvolený %(objects_name)s? Odstránite tak všetky "
|
||||
"nasledovné položky:\n"
|
||||
msgstr[1] ""
|
||||
"\n"
|
||||
"Určite chcete vymazať zvolené %(objects_name)s? Odstránite tak všetky "
|
||||
"nasledovné položky:\n"
|
||||
msgstr[2] ""
|
||||
"\n"
|
||||
"Určite chcete vymazať zvolené %(objects_name)s? Odstránite tak všetky "
|
||||
"nasledujúce položky:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "Prihlásiť sa"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "Prosím, opravte chybu nižšie."
|
||||
msgstr[1] "Prosím, opravte chyby nižšie."
|
||||
msgstr[2] "Prosím, opravte chyby nižšie."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "Vďaka za čas strávený na tejto stránke."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "Znova sa prihlásiť"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "Zmena hesla úspešná"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "Vaše heslo bolo zmenené."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "Zmena hesla"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"Z bezpečnostných dôvodov zadajte, prosím, vaše staré heslo a potom nové "
|
||||
"heslo dvakrát, aby sa dalo overiť, že ste sa nepomýlili."
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "Zmeniť moje heslo"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "Vybraných %(selected)s z %(total)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "Pridať %(model_verbose_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "Uložiť a pridať ďalšie"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "Uložiť a pokračovať v úpravách"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "Uložiť"
|
||||
BIN
djadmin2/locale/zh/LC_MESSAGES/django.mo
Normal file
BIN
djadmin2/locale/zh/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
271
djadmin2/locale/zh/LC_MESSAGES/django.po
Normal file
271
djadmin2/locale/zh/LC_MESSAGES/django.po
Normal file
|
|
@ -0,0 +1,271 @@
|
|||
# This file is distributed under the same license as the django-admin2 package.
|
||||
#
|
||||
# Translators:
|
||||
# Translators:
|
||||
# EricHo <eric913@gmail.com>, 2013
|
||||
# introom <i@introo.me>, 2013
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: django-admin2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-07-09 11:57+0200\n"
|
||||
"PO-Revision-Date: 2013-07-08 07:10+0000\n"
|
||||
"Last-Translator: introom <i@introo.me>\n"
|
||||
"Language-Team: Chinese (http://www.transifex.com/projects/p/django-admin2/"
|
||||
"language/zh/)\n"
|
||||
"Language: zh\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#: actions.py:29
|
||||
msgid ""
|
||||
"Items must be selected in order to perform actions on them. No items have "
|
||||
"been changed."
|
||||
msgstr "请选择项目以进行后续操作。当前没有修改的项目。"
|
||||
|
||||
#: actions.py:149
|
||||
msgid "Delete selected items"
|
||||
msgstr "删除所选择的项目"
|
||||
|
||||
#: actions.py:153
|
||||
#, python-format
|
||||
msgctxt "singular form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "已成功地刪除%(count)s %(items)s "
|
||||
|
||||
#: actions.py:157
|
||||
#, python-format
|
||||
msgctxt "plural form"
|
||||
msgid "Successfully deleted %(count)s %(items)s"
|
||||
msgstr "已成功地刪除%(count)s %(items)s "
|
||||
|
||||
#: filters.py:40
|
||||
msgid "Unknown"
|
||||
msgstr "未知"
|
||||
|
||||
#: filters.py:41
|
||||
msgid "Yes"
|
||||
msgstr "是"
|
||||
|
||||
#: filters.py:42
|
||||
msgid "No"
|
||||
msgstr "否"
|
||||
|
||||
#. Translators : %(username)s will be replaced by the username_field name
|
||||
#. (default : username, but could be email, or something else)
|
||||
#: forms.py:242
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please enter the correct %(username)s and password for a staff account. Note "
|
||||
"that both fields may be case-sensitive."
|
||||
msgstr "请输入正确的%(username)s和密码。注意大小写。"
|
||||
|
||||
#: forms.py:253
|
||||
msgid "Please log in again, because your session has expired."
|
||||
msgstr "由于您的会话已经过期,请重新登录。"
|
||||
|
||||
#: views.py:228 templates/djadmin2/bootstrap/model_update_form.html:35
|
||||
#: templates/djadmin2/bootstrap/includes/app_model_list.html:38
|
||||
msgid "Change"
|
||||
msgstr "修改"
|
||||
|
||||
#: views.py:249 templates/djadmin2/bootstrap/includes/app_model_list.html:30
|
||||
msgid "Add"
|
||||
msgstr "增加"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:56
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:10
|
||||
#: templates/djadmin2/bootstrap/model_detail.html:11
|
||||
#: templates/djadmin2/bootstrap/model_list.html:14
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:17
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:10
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:8
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:11
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:10
|
||||
msgid "Home"
|
||||
msgstr "首页"
|
||||
|
||||
#: templates/djadmin2/bootstrap/app_index.html:12
|
||||
#, python-format
|
||||
msgid "%(app_label)s administration"
|
||||
msgstr "%(app_label)s 管理"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:6
|
||||
#: templates/djadmin2/bootstrap/base.html:72
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
msgid "Site administration"
|
||||
msgstr "站点管理"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:23
|
||||
msgid "API"
|
||||
msgstr "API"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:26
|
||||
msgid "Documentation"
|
||||
msgstr "文档"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:35
|
||||
#, python-format
|
||||
msgid "Logged in as %(user)s"
|
||||
msgstr "登入用户:%(user)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:41
|
||||
msgid "Change password"
|
||||
msgstr "修改密码"
|
||||
|
||||
#: templates/djadmin2/bootstrap/base.html:43
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:11
|
||||
msgid "Log out"
|
||||
msgstr "登出"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:13
|
||||
msgid "Recent Actions"
|
||||
msgstr "最近的动作"
|
||||
|
||||
#: templates/djadmin2/bootstrap/index.html:14
|
||||
msgid "My Actions"
|
||||
msgstr "我的动作"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:4
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:6
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:4
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:6
|
||||
msgid "Are you sure?"
|
||||
msgstr "您确定吗?"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:25
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:51
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:118
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:21
|
||||
msgid "Delete"
|
||||
msgstr "删除"
|
||||
|
||||
#. Translators : this is singular, example : delete the post "My Title"
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the %(model_name)s \"%(object)s\"?\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"您确定要删除 %(model_name)s \"%(object)s\"吗?所有以下项目将会被删除:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:36
|
||||
msgid ""
|
||||
"\n"
|
||||
"The following item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"All of the following items will be deleted:\n"
|
||||
msgstr[0] ""
|
||||
"\n"
|
||||
"以下所有項目將被刪除:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_confirm_delete.html:50
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:44
|
||||
msgid "Yes, I'm sure"
|
||||
msgstr "是,我确定"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:4
|
||||
#: templates/djadmin2/bootstrap/model_list.html:6
|
||||
#, python-format
|
||||
msgid "Select %(model_name)s to change"
|
||||
msgstr "选择修改 %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:31
|
||||
msgid "Search Term"
|
||||
msgstr "搜索条目"
|
||||
|
||||
#: templates/djadmin2/bootstrap/model_list.html:32
|
||||
msgid "Search"
|
||||
msgstr "搜索"
|
||||
|
||||
#. Translators : examples : Add post, Change object
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:6
|
||||
#: templates/djadmin2/bootstrap/model_update_form.html:9
|
||||
#, python-format
|
||||
msgid "%(action_name)s %(model_name)s"
|
||||
msgstr "%(action_name)s %(model_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/actions/delete_selected_confirmation.html:27
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"item will be deleted:\n"
|
||||
msgid_plural ""
|
||||
"\n"
|
||||
"Are you sure you want to delete the selected %(objects_name)s? The following "
|
||||
"items will be deleted:\n"
|
||||
msgstr[0] "\n您确定要删除所选择的%(objects_name)s吗?以下所有项目都将被删除:\n"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:15
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:52
|
||||
msgid "Log in"
|
||||
msgstr "登入"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/login.html:27
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:24
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] "请更正以下错误。"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:17
|
||||
msgid "Thanks for spending some quality time with the Web site today."
|
||||
msgstr "感谢您访问本网站。"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/logout.html:18
|
||||
msgid "Log in again"
|
||||
msgstr "重新登入"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:7
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:14
|
||||
msgid "Password change successful"
|
||||
msgstr "密码已成功被修改"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_done.html:20
|
||||
msgid "Your password was changed."
|
||||
msgstr "您的密码已被修改"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:6
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:13
|
||||
msgid "Password change"
|
||||
msgstr "修改密码"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:20
|
||||
msgid ""
|
||||
"Please enter your old password, for security's sake, and then enter your new "
|
||||
"password twice so we can verify you typed it in correctly."
|
||||
msgstr ""
|
||||
"出于安全因素,请您输入旧密码。然后再输入两次新密码以便我们确保您正确地输入了"
|
||||
"新密码。"
|
||||
|
||||
#: templates/djadmin2/bootstrap/auth/password_change_form.html:31
|
||||
msgid "Change my password"
|
||||
msgstr "修改我的密码"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:17
|
||||
#, python-format
|
||||
msgid "%(selected)s of %(total)s selected"
|
||||
msgstr "共选择了%(selected)s/%(total)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/list_actions.html:21
|
||||
#, python-format
|
||||
msgid "Add %(model_verbose_name)s"
|
||||
msgstr "增加%(model_verbose_name)s"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:3
|
||||
msgid "Save and add another"
|
||||
msgstr "保存并且增加下一个"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:4
|
||||
msgid "Save and continue editing"
|
||||
msgstr "保存并且继续编辑"
|
||||
|
||||
#: templates/djadmin2/bootstrap/includes/save_buttons.html:5
|
||||
msgid "Save"
|
||||
msgstr "保存"
|
||||
39
djadmin2/migrations/0001_initial.py
Normal file
39
djadmin2/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
from django.db import migrations, models
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('contenttypes', '0002_remove_content_type_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='LogEntry',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
('action_time', models.DateTimeField(verbose_name='action time', auto_now=True)),
|
||||
('object_id', models.TextField(verbose_name='object id', null=True, blank=True)),
|
||||
('object_repr', models.CharField(max_length=200, verbose_name='object repr')),
|
||||
('action_flag', models.PositiveSmallIntegerField(verbose_name='action flag')),
|
||||
('change_message', models.TextField(verbose_name='change message', blank=True)),
|
||||
('content_type', models.ForeignKey(
|
||||
related_name='log_entries',
|
||||
null=True,
|
||||
blank=True,
|
||||
to='contenttypes.ContentType',
|
||||
on_delete=models.CASCADE)),
|
||||
('user', models.ForeignKey(
|
||||
related_name='log_entries',
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
on_delete=models.CASCADE)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'log entry',
|
||||
'ordering': ('-action_time',),
|
||||
'verbose_name_plural': 'log entries',
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
@ -1 +1,95 @@
|
|||
""" Boilerplate for now, will serve a purpose soon! """
|
||||
from django.conf import settings
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db import models
|
||||
from django.utils.encoding import force_str
|
||||
from django.utils.translation import gettext, gettext_lazy as _
|
||||
|
||||
from .utils import quote
|
||||
|
||||
|
||||
class LogEntryManager(models.Manager):
|
||||
def log_action(self, user_id, obj, action_flag, change_message=''):
|
||||
content_type_id = ContentType.objects.get_for_model(obj).id
|
||||
e = self.model(None, None, user_id, content_type_id,
|
||||
force_str(obj.id), force_str(obj)[:200],
|
||||
action_flag, change_message)
|
||||
e.save()
|
||||
|
||||
|
||||
class LogEntry(models.Model):
|
||||
ADDITION = 1
|
||||
CHANGE = 2
|
||||
DELETION = 3
|
||||
|
||||
action_time = models.DateTimeField(_('action time'), auto_now=True)
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL,
|
||||
related_name='log_entries',
|
||||
on_delete=models.CASCADE)
|
||||
content_type = models.ForeignKey(ContentType, blank=True, null=True,
|
||||
related_name='log_entries',
|
||||
on_delete=models.CASCADE)
|
||||
object_id = models.TextField(_('object id'), blank=True, null=True)
|
||||
object_repr = models.CharField(_('object repr'), max_length=200)
|
||||
action_flag = models.PositiveSmallIntegerField(_('action flag'))
|
||||
change_message = models.TextField(_('change message'), blank=True)
|
||||
|
||||
objects = LogEntryManager()
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('log entry')
|
||||
verbose_name_plural = _('log entries')
|
||||
ordering = ('-action_time',)
|
||||
|
||||
def __repr__(self):
|
||||
return force_str(self.action_time)
|
||||
|
||||
def __str__(self):
|
||||
if self.action_flag == self.ADDITION:
|
||||
return gettext('Added "%(object)s".') % {
|
||||
'object': self.object_repr}
|
||||
elif self.action_flag == self.CHANGE:
|
||||
return gettext('Changed "%(object)s" - %(changes)s') % {
|
||||
'object': self.object_repr,
|
||||
'changes': self.change_message,
|
||||
}
|
||||
elif self.action_flag == self.DELETION:
|
||||
return gettext('Deleted "%(object)s."') % {
|
||||
'object': self.object_repr}
|
||||
|
||||
return gettext('LogEntry Object')
|
||||
|
||||
def is_addition(self):
|
||||
return self.action_flag == self.ADDITION
|
||||
|
||||
def is_change(self):
|
||||
return self.action_flag == self.CHANGE
|
||||
|
||||
def is_deletion(self):
|
||||
return self.action_flag == self.DELETION
|
||||
|
||||
@property
|
||||
def action_type(self):
|
||||
if self.is_addition():
|
||||
return _('added')
|
||||
if self.is_change():
|
||||
return _('changed')
|
||||
if self.is_deletion():
|
||||
return _('deleted')
|
||||
return ''
|
||||
|
||||
def get_edited_object(self):
|
||||
"Returns the edited object represented by this log entry"
|
||||
return self.content_type.get_object_for_this_type(pk=self.object_id)
|
||||
|
||||
def get_admin_url(self):
|
||||
"""
|
||||
Returns the admin URL to edit the object represented by this log entry.
|
||||
This is relative to the Django admin index page.
|
||||
"""
|
||||
if self.content_type and self.object_id:
|
||||
return '{0.app_label}/{0.model}/{1}'.format(
|
||||
self.content_type,
|
||||
quote(self.object_id)
|
||||
)
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
'''
|
||||
"""
|
||||
djadmin2's permission handling. The permission classes have the same API as
|
||||
the permission handling classes of the django-rest-framework. That way, we can
|
||||
reuse them in the admin's REST API.
|
||||
|
|
@ -13,16 +13,25 @@ interface:
|
|||
|
||||
The permission classes are then just fancy wrappers of these basic checks of
|
||||
which it can hold multiple.
|
||||
'''
|
||||
"""
|
||||
import logging
|
||||
import re
|
||||
from django.utils import six
|
||||
|
||||
from django.contrib.auth import get_permission_codename
|
||||
from django.db.utils import DEFAULT_DB_ALIAS
|
||||
from django.apps import apps
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import router
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
logger = logging.getLogger('djadmin2')
|
||||
|
||||
|
||||
def is_authenticated(request, view, obj=None):
|
||||
'''
|
||||
Checks if the current user is authenticated.
|
||||
'''
|
||||
return request.user.is_authenticated()
|
||||
return request.user.is_authenticated
|
||||
|
||||
|
||||
def is_staff(request, view, obj=None):
|
||||
|
|
@ -69,14 +78,20 @@ def model_permission(permission):
|
|||
'Cannot apply model permissions on a view that does not '
|
||||
'have a `.model` or `.queryset` property.')
|
||||
|
||||
try:
|
||||
# django 1.8+
|
||||
model_name = model_class._meta.model_name
|
||||
except AttributeError:
|
||||
model_name = model_class._meta.module_name
|
||||
|
||||
permission_name = permission.format(
|
||||
app_label=model_class._meta.app_label,
|
||||
model_name=model_class._meta.module_name)
|
||||
model_name=model_name)
|
||||
return request.user.has_perm(permission_name, obj)
|
||||
return has_permission
|
||||
|
||||
|
||||
class BasePermission(object):
|
||||
class BasePermission:
|
||||
'''
|
||||
Provides a base class with a common API. It implements a compatible
|
||||
interface to django-rest-framework permission backends.
|
||||
|
|
@ -172,7 +187,7 @@ class ModelDeletePermission(BasePermission):
|
|||
permissions = (model_permission('{app_label}.delete_{model_name}'),)
|
||||
|
||||
|
||||
class TemplatePermissionChecker(object):
|
||||
class TemplatePermissionChecker:
|
||||
'''
|
||||
Can be used in the template like:
|
||||
|
||||
|
|
@ -239,7 +254,7 @@ class TemplatePermissionChecker(object):
|
|||
needs an interface beeing implemented like suggested in:
|
||||
https://github.com/twoscoops/django-admin2/issues/142
|
||||
'''
|
||||
_has_named_permission_regex = re.compile('^has_(?P<name>\w+)_permission$')
|
||||
_has_named_permission_regex = re.compile('^has_(?P<name>\\w+)_permission$')
|
||||
|
||||
view_name_mapping = {
|
||||
'view': 'detail_view',
|
||||
|
|
@ -266,7 +281,7 @@ class TemplatePermissionChecker(object):
|
|||
Return a clone of the permission wrapper with a new model_admin bind
|
||||
to it.
|
||||
'''
|
||||
if isinstance(admin, six.string_types):
|
||||
if isinstance(admin, str):
|
||||
try:
|
||||
admin = self._model_admin.admin.get_admin_by_name(admin)
|
||||
except ValueError:
|
||||
|
|
@ -280,11 +295,11 @@ class TemplatePermissionChecker(object):
|
|||
'''
|
||||
Return a clone of the permission wrapper with a new view bind to it.
|
||||
'''
|
||||
if isinstance(view, six.string_types):
|
||||
if isinstance(view, str):
|
||||
if view not in self.view_name_mapping:
|
||||
return ''
|
||||
view_name = self.view_name_mapping[view]
|
||||
view = getattr(self._model_admin, view_name)
|
||||
view = getattr(self._model_admin, view_name).view
|
||||
# we don't support binding view classes yet, only the name of views
|
||||
# are processed. We have the problem with view classes that we cannot
|
||||
# tell which model admin it was attached to.
|
||||
|
|
@ -329,6 +344,12 @@ class TemplatePermissionChecker(object):
|
|||
def __nonzero__(self):
|
||||
# if no view is bound we will return false, since we don't know which
|
||||
# permission to check we stay save in disallowing the access
|
||||
return self._cast_bool()
|
||||
|
||||
def __bool__(self):
|
||||
return self._cast_bool()
|
||||
|
||||
def _cast_bool(self):
|
||||
if self._view is None:
|
||||
return False
|
||||
if self._obj is None:
|
||||
|
|
@ -336,7 +357,78 @@ class TemplatePermissionChecker(object):
|
|||
else:
|
||||
return self._view.has_permission(self._obj)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
if self._view is None:
|
||||
return ''
|
||||
return unicode(bool(self))
|
||||
return force_str(bool(self))
|
||||
|
||||
|
||||
def create_view_permissions(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs): # noqa
|
||||
"""
|
||||
Create 'view' permissions for all models.
|
||||
|
||||
``django.contrib.auth`` only creates add, change and delete permissions.
|
||||
Since we want to support read-only views, we need to add our own
|
||||
permission.
|
||||
|
||||
Copied from ``https://github.com/django/django/blob/1.9.6/django/contrib/auth/management/__init__.py#L60``.
|
||||
|
||||
"""
|
||||
if not app_config.models_module:
|
||||
return
|
||||
|
||||
try:
|
||||
Permission = apps.get_model('auth', 'Permission')
|
||||
except LookupError:
|
||||
return
|
||||
|
||||
if not router.allow_migrate_model(using, Permission):
|
||||
return
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
# This will hold the permissions we're looking for as
|
||||
# (content_type, (codename, name))
|
||||
searched_perms = list()
|
||||
# The codenames and ctypes that should exist.
|
||||
ctypes = set()
|
||||
for klass in app_config.get_models():
|
||||
# Force looking up the content types in the current database
|
||||
# before creating foreign keys to them.
|
||||
ctype = ContentType.objects.db_manager(using).get_for_model(klass)
|
||||
|
||||
ctypes.add(ctype)
|
||||
perm = (get_permission_codename('view', klass._meta), 'Can view %s' % (klass._meta.verbose_name_raw))
|
||||
searched_perms.append((ctype, perm))
|
||||
|
||||
# Find all the Permissions that have a content_type for a model we're
|
||||
# looking for. We don't need to check for codenames since we already have
|
||||
# a list of the ones we're going to create.
|
||||
all_perms = set(Permission.objects.using(using).filter(
|
||||
content_type__in=ctypes,
|
||||
).values_list(
|
||||
"content_type", "codename"
|
||||
))
|
||||
|
||||
perms = [
|
||||
Permission(codename=codename, name=name, content_type=ct)
|
||||
for ct, (codename, name) in searched_perms
|
||||
if (ct.pk, codename) not in all_perms
|
||||
]
|
||||
# Validate the permissions before bulk_creation to avoid cryptic
|
||||
# database error when the verbose_name is longer than 50 characters
|
||||
permission_name_max_length = Permission._meta.get_field('name').max_length
|
||||
verbose_name_max_length = permission_name_max_length - 11 # len('Can change ') prefix
|
||||
for perm in perms:
|
||||
if len(perm.name) > permission_name_max_length:
|
||||
raise ValidationError(
|
||||
"The verbose_name of %s.%s is longer than %s characters" % (
|
||||
perm.content_type.app_label,
|
||||
perm.content_type.model,
|
||||
verbose_name_max_length,
|
||||
)
|
||||
)
|
||||
Permission.objects.using(using).bulk_create(perms)
|
||||
if verbosity >= 2:
|
||||
for perm in perms:
|
||||
print("Adding permission '%s'" % perm)
|
||||
|
|
|
|||
81
djadmin2/renderers.py
Normal file
81
djadmin2/renderers.py
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
"""
|
||||
There are currently a few renderers that come directly with django-admin2. They
|
||||
are used by default for some field types.
|
||||
"""
|
||||
import os.path
|
||||
from datetime import date, time, datetime
|
||||
|
||||
from django.db import models
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils import formats, timezone
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
from djadmin2 import settings
|
||||
|
||||
|
||||
def boolean_renderer(value, field):
|
||||
"""
|
||||
Render a boolean value as icon.
|
||||
|
||||
This uses the template ``renderers/boolean.html``.
|
||||
|
||||
:param value: The value to process.
|
||||
:type value: boolean
|
||||
:param field: The model field instance
|
||||
:type field: django.db.models.fields.Field
|
||||
:rtype: unicode
|
||||
|
||||
"""
|
||||
# TODO caching of template
|
||||
tpl = os.path.join(settings.ADMIN2_THEME_DIRECTORY, 'renderers/boolean.html')
|
||||
return render_to_string(tpl, {'value': value})
|
||||
|
||||
|
||||
def datetime_renderer(value, field):
|
||||
"""
|
||||
Localize and format the specified date.
|
||||
|
||||
:param value: The value to process.
|
||||
:type value: datetime.date or datetime.time or datetime.datetime
|
||||
:param field: The model field instance
|
||||
:type field: django.db.models.fields.Field
|
||||
:rtype: unicode
|
||||
|
||||
"""
|
||||
if isinstance(value, datetime):
|
||||
# django ticket #23466 Removing seconds from locale formats
|
||||
return formats.localize(timezone.template_localtime(value))
|
||||
elif isinstance(value, (date, time)):
|
||||
return ":".join((formats.localize(value)).split(":")[:2])
|
||||
else:
|
||||
return ":".join(value.split(":")[:2])
|
||||
|
||||
|
||||
def title_renderer(value, field):
|
||||
"""
|
||||
Render a string in title case (capitalize every word).
|
||||
|
||||
:param value: The value to process.
|
||||
:type value: str or unicode
|
||||
:param field: The model field instance
|
||||
:type field: django.db.models.fields.Field
|
||||
:rtype: unicode or str
|
||||
|
||||
"""
|
||||
return force_str(value).title()
|
||||
|
||||
|
||||
def number_renderer(value, field):
|
||||
"""
|
||||
Format a number.
|
||||
|
||||
:param value: The value to process.
|
||||
:type value: float or long
|
||||
:param field: The model field instance
|
||||
:type field: django.db.models.fields.Field
|
||||
:rtype: unicode
|
||||
|
||||
"""
|
||||
if isinstance(field, models.DecimalField):
|
||||
return formats.number_format(value, field.decimal_places)
|
||||
return formats.number_format(value)
|
||||
15
djadmin2/settings.py
Normal file
15
djadmin2/settings.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from django.conf import settings
|
||||
|
||||
|
||||
# Restricts the attributes that are passed from ModelAdmin2 classes to their
|
||||
# views. This is a security feature.
|
||||
# See the docstring on djadmin2.types.ModelAdmin2 for more detail.
|
||||
MODEL_ADMIN_ATTRS = (
|
||||
'actions_selection_counter', "date_hierarchy", 'list_display',
|
||||
'list_display_links', 'list_filter', 'admin', 'search_fields',
|
||||
'field_renderers', 'index_view', 'detail_view', 'create_view',
|
||||
'update_view', 'delete_view', 'get_default_view_kwargs',
|
||||
'get_list_actions', 'get_ordering', 'actions_on_bottom', 'actions_on_top',
|
||||
'ordering', 'save_on_top', 'save_on_bottom', 'readonly_fields', )
|
||||
|
||||
ADMIN2_THEME_DIRECTORY = getattr(settings, "ADMIN2_THEME_DIRECTORY", "djadmin2theme_bootstrap3")
|
||||
3
djadmin2/site.py
Normal file
3
djadmin2/site.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from . import core
|
||||
|
||||
djadmin2_site = core.Admin2()
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
/* Fixes a Bootstrap 2.3 bug. This can be removed when upgrading to Bootstrap v3. */
|
||||
.text-right
|
||||
{
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.text-center
|
||||
{
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.text-left
|
||||
{
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.checkbox-column {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.space-below {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
|
|
@ -1,26 +0,0 @@
|
|||
$(function() {
|
||||
var element = $("#model-list");
|
||||
var selectAllCheckbox = element.find('.model-select-all');
|
||||
var selectCheckboxen = element.find('.model-select');
|
||||
var selectedCount = element.find('#selected-count');
|
||||
|
||||
var updateSelectedCount = function() {
|
||||
var count = 0;
|
||||
for (var ix = 0; ix < selectCheckboxen.length; ix++) {
|
||||
if ($(selectCheckboxen[ix]).prop('checked')) {
|
||||
count++;
|
||||
};
|
||||
};
|
||||
selectAllCheckbox.prop('checked', count == selectCheckboxen.length);
|
||||
selectedCount.text(count);
|
||||
};
|
||||
|
||||
selectAllCheckbox.click(function(e) {
|
||||
selectCheckboxen.prop('checked', this.checked);
|
||||
updateSelectedCount();
|
||||
});
|
||||
|
||||
selectCheckboxen.click(function(e) {
|
||||
updateSelectedCount();
|
||||
});
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,17 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li class="active">{{ app_label|title }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block page_title %}{% blocktrans with app_label=app_label|title %}{{ app_label }} administration{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span7">
|
||||
{% include 'admin2/bootstrap/includes/app_model_list.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
{% if form.errors %}
|
||||
<p class="error-note">
|
||||
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="hidden" name="this_is_the_login_form" value="1" />
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
<button class="btn btn-small btn-success" type="submit">{% trans "Log in" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li class="active">{% trans "Logout" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
|
||||
<p><p><a href="{% url 'admin2:dashboard' %}">{% trans 'Log in again' %}</a></p></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
|
||||
{% block title %}{% trans 'Password change successful' %}{% endblock %}
|
||||
{% block page_title %}{% trans 'Password change successful' %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li class="active">{% trans "Password change successful" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>{% trans 'Your password was changed.' %}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
|
||||
{% block page_title %}{% trans "Password change" %}: {{ form.user }}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li class="active">{% trans "Password change" %} <span class="divider">/</span></li>
|
||||
<li class="active">{{ form.user }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly.</p>
|
||||
|
||||
{% if form.errors %}
|
||||
<p class="error-note">
|
||||
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button class="btn btn-small btn-success" type="submit" name="_save">{% trans "Change my password" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
{% load i18n %}<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>{% block title %}Site administration{% endblock %} | django-admin2</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- Bootstrap -->
|
||||
<link href="{{ STATIC_URL }}themes/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="{{ STATIC_URL }}themes/bootstrap/css/bootstrap-custom.css" rel="stylesheet" media="screen">
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<a tabindex="1" class="brand" href="{% url 'admin2:dashboard' %}">Django-Admin2</a>
|
||||
|
||||
<ul class="nav pull-right">
|
||||
<li><a tabindex="2" href="{% url 'admin2:api_index' %}">{% trans "API" %}</a></li>
|
||||
|
||||
{% if docsroot %}
|
||||
<li><a tabindex="3" href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a tabindex="4" href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
{% if user.get_full_name %}
|
||||
{{ user.get_full_name }}
|
||||
{% else %}
|
||||
{% blocktrans with user=user.username %}
|
||||
Logged in as {{ user }}
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{% if user.has_usable_password %}
|
||||
<li><a href="{% url 'admin2:password_change' user.id %}">{% trans "Change password" %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{% url 'admin2:logout' %}">{% trans "Log out" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="breadcrumb">
|
||||
{% block breadcrumbs %}
|
||||
<li class="active">Home</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="span10">
|
||||
<h3>{% block page_title %}{% trans "Site administration" %}{% endblock %}</h3>
|
||||
</div>
|
||||
</div>
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<script src="http://code.jquery.com/jquery.js"></script>
|
||||
<script src="{{ STATIC_URL }}themes/bootstrap/js/bootstrap.min.js"></script>
|
||||
{% block extrajs %}{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Are you sure?{% endblock %}
|
||||
|
||||
{% block page_title %}Are you sure?{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>{% blocktrans with objects_name=objects_name %}Are you sure you want to delete the selected {{ objects_name }}? All of the following items will be deleted:{% endblocktrans %}</p>
|
||||
|
||||
<ul>
|
||||
{{ deletable_objects|unordered_list }}
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="confirmed" value="yes" />
|
||||
<input type="hidden" name="action" value="delete_selected" />
|
||||
{% for item in queryset %}
|
||||
<input type="hidden" name="selected_model_pk" value="{{ item.pk }}" />
|
||||
{% endfor %}
|
||||
<button class="btn btn-small btn-danger" type="submit">{% trans "Yes, I'm sure" %}</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{% load i18n admin2_tags %}
|
||||
<table class="table table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">
|
||||
<a href="{% url 'admin2:app_index' app_label=app_label %}">{{ app_label|title }}</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for model_class, model_admin in registry.items %}
|
||||
{% with permissions|for_admin:model_admin as permissions %}
|
||||
{% if permissions.has_view_permission or permissions.has_add_permission or permissions.has_change_permission %}
|
||||
<tr>
|
||||
<td width="40%">
|
||||
{% if permissions.has_view_permission %}<a href="{{ model_admin.get_index_url }}">{% endif %}
|
||||
{{ model_admin.verbose_name_plural|title }}
|
||||
{% if permissions.has_view_permission %}</a>{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if permissions.has_add_permission %}
|
||||
<a href="{% url model_admin|admin2_urlname:'create' %}">
|
||||
<i class="icon-plus"></i>
|
||||
{% trans "Add" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if permissions.has_change_permission %}
|
||||
<a href="{{ model_admin.get_index_url }}">
|
||||
<i class="icon-pencil"></i>
|
||||
{% trans "Change" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="span7">
|
||||
{% for app_label, registry in apps.items %}
|
||||
{% include 'admin2/bootstrap/includes/app_model_list.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="span5">
|
||||
<h4>{% trans "Recent Actions" %}</h4>
|
||||
<h5>{% trans "My Actions" %}</h5>
|
||||
TODO
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% trans "Are you sure?" %}{% endblock %}
|
||||
|
||||
{% block page_title %}{% trans "Are you sure?" %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{% trans "Delete" %}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>{% blocktrans with model_name=model_name object=object %}Are you sure you want to delete the {{ model_name }} "{{ object }}"? All of the following items will be deleted:{% endblocktrans %}</p>
|
||||
|
||||
<ul>
|
||||
{{ deletable_objects|unordered_list }}
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button class="btn btn-small btn-danger" type="submit">{% trans "Yes, I'm sure" %}</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
|
||||
{% load admin2_tags %}
|
||||
|
||||
{% block title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block page_title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{{ object }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ object }}
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block page_title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block extrajs %}
|
||||
<script src="/static/themes/bootstrap/js/actions.js"></script>
|
||||
{% endblock extrajs %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{{ model_name_pluralized|title }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="model-list" class="row">
|
||||
<form id="model-list-form" class="form-inline" method="post">
|
||||
<div class="span12">
|
||||
<div class="navbar">
|
||||
{% csrf_token %}
|
||||
<select name="action">
|
||||
{% for action in actions %}
|
||||
<option value="{{ action.name }}">{{ action.description }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="Submit" class="btn">Go</button>
|
||||
<span id="selected-count">0</span> of {{ object_list|length }} selected
|
||||
<div class="pull-right">
|
||||
{% if permissions.has_add_permission %}
|
||||
<a href="{% url view|admin2_urlname:'create' %}" class="btn"><i class="icon-plus"></i> {% blocktrans with model_verbose_name=model|model_verbose_name %}Add {{ model_verbose_name }}{% endblocktrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th><input type="checkbox" class="model-select-all"></th>
|
||||
<th>{{ model_name }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in object_list %}
|
||||
<tr>
|
||||
<td><input type="checkbox" class="model-select" name="selected_model_pk" value="{{ obj.pk }}"></td>
|
||||
<td>
|
||||
{{ obj }}
|
||||
{% if permissions.has_view_permission %}
|
||||
<a href="{% url view|admin2_urlname:'detail' pk=obj.pk %}">{% trans "Detail" %}</a>
|
||||
{% endif %}
|
||||
{% if permissions.has_change_permission %}
|
||||
<a href="{% url view|admin2_urlname:'update' pk=obj.pk %}">{% trans "Edit" %}</a>
|
||||
{% endif %}
|
||||
{% if permissions.has_delete_permission %}
|
||||
<a href="{% url view|admin2_urlname:'delete' pk=obj.pk %}">{% trans "Delete" %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{ object_list|length }} {{ model_name_pluralized }}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
{% extends "admin2/bootstrap/base.html" %}
|
||||
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% blocktrans with action=action model_name=model_name %}{{ action }} {{ model_name }}{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block page_title %}{% blocktrans with action=action model_name=model_name %}{{ action }} {{ model_name }}{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a> <span class="divider">/</span></li>
|
||||
{% if action == 'Add' %}
|
||||
<li class="active">{{ action }}</li>
|
||||
{% else %}
|
||||
<li><a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{% trans 'Change' %}</li>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
|
||||
{% for formset in inlines %}
|
||||
<h4>{{ formset.model|model_verbose_name_plural|capfirst }}</h4>
|
||||
{{ formset.management_form }}
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for field in formset|formset_visible_fieldlist %}
|
||||
<th>{{ field }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for inline_form in formset %}
|
||||
<tr>
|
||||
{% for field in inline_form.visible_fields %}
|
||||
<td>
|
||||
{% if forloop.first %}
|
||||
{% for hidden_field in inline_form.hidden_fields %}
|
||||
{{ hidden_field }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{{ field }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
|
||||
<button class="btn btn-small" type="submit" name="_addanother">{% trans "Save and add another" %}</button>
|
||||
<button class="btn btn-small" type="submit" name="_continue">{% trans "Save and continue editing" %}</button>
|
||||
<button class="btn btn-small btn-success" type="submit" name="_save">{% trans "Save" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
from numbers import Number
|
||||
from datetime import date, time, datetime
|
||||
|
||||
from django import template
|
||||
from django.core.exceptions import FieldDoesNotExist
|
||||
|
||||
from .. import utils, renderers, models, settings
|
||||
|
||||
|
||||
register = template.Library()
|
||||
|
||||
from .. import utils
|
||||
|
||||
|
||||
@register.filter
|
||||
def admin2_urlname(view, action):
|
||||
|
|
@ -37,6 +42,25 @@ def model_verbose_name_plural(obj):
|
|||
return utils.model_verbose_name_plural(obj)
|
||||
|
||||
|
||||
@register.filter
|
||||
def verbose_name_for(verbose_names, app_label):
|
||||
"""
|
||||
Returns the verbose name of an app.
|
||||
"""
|
||||
return verbose_names.get(app_label, None)
|
||||
|
||||
|
||||
@register.filter
|
||||
def model_attr_verbose_name(obj, attr):
|
||||
"""
|
||||
Returns the verbose name of a model field or method.
|
||||
"""
|
||||
try:
|
||||
return utils.model_field_verbose_name(obj, attr)
|
||||
except FieldDoesNotExist:
|
||||
return utils.model_method_verbose_name(obj, attr)
|
||||
|
||||
|
||||
@register.filter
|
||||
def formset_visible_fieldlist(formset):
|
||||
"""
|
||||
|
|
@ -83,3 +107,45 @@ def for_object(permissions, obj):
|
|||
if permissions == '':
|
||||
return permissions
|
||||
return permissions.bind_object(obj)
|
||||
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
def render(context, model_instance, attribute_name):
|
||||
"""
|
||||
This filter applies all renderers specified in admin2.py to the field.
|
||||
"""
|
||||
value = utils.get_attr(model_instance, attribute_name)
|
||||
|
||||
# Get renderer
|
||||
admin = context['view'].model_admin
|
||||
renderer = admin.field_renderers.get(attribute_name, False)
|
||||
if renderer is None:
|
||||
# Renderer has explicitly been overridden
|
||||
return value
|
||||
if not renderer:
|
||||
# Try to automatically pick best renderer
|
||||
if isinstance(value, bool):
|
||||
renderer = renderers.boolean_renderer
|
||||
elif isinstance(value, (date, time, datetime)):
|
||||
renderer = renderers.datetime_renderer
|
||||
elif isinstance(value, Number):
|
||||
renderer = renderers.number_renderer
|
||||
else:
|
||||
return value
|
||||
|
||||
# Apply renderer and return value
|
||||
try:
|
||||
field = model_instance._meta.get_field(attribute_name)
|
||||
except FieldDoesNotExist:
|
||||
# There is no field with the specified name.
|
||||
# It must be a method instead.
|
||||
field = None
|
||||
return renderer(value, field)
|
||||
|
||||
|
||||
@register.inclusion_tag(
|
||||
settings.ADMIN2_THEME_DIRECTORY + '/includes/history.html',
|
||||
takes_context=True)
|
||||
def action_history(context):
|
||||
actions = models.LogEntry.objects.filter(user__pk=context['user'].pk)
|
||||
return {'actions': actions}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
from test_admin2tags import *
|
||||
from test_types import *
|
||||
from test_utils import *
|
||||
from test_views import *
|
||||
from test_core import *
|
||||
59
djadmin2/tests/migrations/0001_initial.py
Normal file
59
djadmin2/tests/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='BigThing',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='RendererTestModel',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
('decimal', models.DecimalField(max_digits=10, decimal_places=5)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SmallThing',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='TagsTestsModel',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
('field1', models.CharField(max_length=23)),
|
||||
('field2', models.CharField(max_length=42, verbose_name='second field')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Tags Test Model',
|
||||
'verbose_name_plural': 'Tags Test Models',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Thing',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='UtilsTestModel',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
||||
('field1', models.CharField(max_length=23)),
|
||||
('field2', models.CharField(max_length=42, verbose_name='second field')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Utils Test Model',
|
||||
'verbose_name_plural': 'Utils Test Models',
|
||||
},
|
||||
),
|
||||
]
|
||||
0
djadmin2/tests/migrations/__init__.py
Normal file
0
djadmin2/tests/migrations/__init__.py
Normal file
50
djadmin2/tests/models.py
Normal file
50
djadmin2/tests/models.py
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
from django.db import models
|
||||
|
||||
|
||||
class Thing(models.Model):
|
||||
pass
|
||||
|
||||
|
||||
class SmallThing(models.Model):
|
||||
pass
|
||||
|
||||
|
||||
class BigThing(models.Model):
|
||||
pass
|
||||
|
||||
|
||||
class TagsTestsModel(models.Model):
|
||||
|
||||
field1 = models.CharField(max_length=23)
|
||||
field2 = models.CharField('second field', max_length=42)
|
||||
|
||||
def was_published_recently(self):
|
||||
return True
|
||||
was_published_recently.boolean = True
|
||||
was_published_recently.short_description = 'Published recently?'
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Tags Test Model"
|
||||
verbose_name_plural = "Tags Test Models"
|
||||
|
||||
|
||||
class RendererTestModel(models.Model):
|
||||
decimal = models.DecimalField(decimal_places=5, max_digits=10)
|
||||
|
||||
|
||||
class UtilsTestModel(models.Model):
|
||||
|
||||
field1 = models.CharField(max_length=23)
|
||||
field2 = models.CharField('second field', max_length=42)
|
||||
|
||||
def simple_method(self):
|
||||
return 42
|
||||
|
||||
def was_published_recently(self):
|
||||
return True
|
||||
was_published_recently.boolean = True
|
||||
was_published_recently.short_description = 'Published recently?'
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Utils Test Model"
|
||||
verbose_name_plural = "Utils Test Models"
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n static admin2_tags %}
|
||||
|
||||
{% block navbar %}{% endblock navbar %}
|
||||
{% block breacrumbs %}{% endblock breacrumbs %}
|
||||
|
||||
{% block page_header %}{% endblock page_header %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Custom login view</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form method="post" class="">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="hidden" name="this_is_the_login_form" value="1"/>
|
||||
<input type="hidden" name="next" value="{{ next }}"/>
|
||||
<button class="btn btn-lg btn-success btn-block" type="submit">
|
||||
{% trans "Log in" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
45
djadmin2/tests/test_actions.py
Normal file
45
djadmin2/tests/test_actions.py
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from ..core import Admin2
|
||||
from ..actions import get_description
|
||||
from .models import Thing
|
||||
|
||||
|
||||
class TestAction:
|
||||
description = "Test Action Class"
|
||||
|
||||
|
||||
def test_function():
|
||||
pass
|
||||
|
||||
|
||||
class ActionTest(TestCase):
|
||||
def setUp(self):
|
||||
self.admin2 = Admin2()
|
||||
|
||||
def test_action_description(self):
|
||||
self.admin2.register(Thing)
|
||||
self.admin2.registry[Thing].list_actions.extend([
|
||||
TestAction,
|
||||
test_function,
|
||||
])
|
||||
self.assertEqual(
|
||||
get_description(
|
||||
self.admin2.registry[Thing].list_actions[0]
|
||||
),
|
||||
'Delete selected items'
|
||||
)
|
||||
self.assertEqual(
|
||||
get_description(
|
||||
self.admin2.registry[Thing].list_actions[1]
|
||||
),
|
||||
'Test Action Class'
|
||||
)
|
||||
self.assertEqual(
|
||||
get_description(
|
||||
self.admin2.registry[Thing].list_actions[2]
|
||||
),
|
||||
'Test function'
|
||||
)
|
||||
self.admin2.registry[Thing].list_actions.remove(TestAction)
|
||||
self.admin2.registry[Thing].list_actions.remove(test_function)
|
||||
|
|
@ -1,17 +1,10 @@
|
|||
from django.db import models
|
||||
from django import forms
|
||||
from django.forms.formsets import formset_factory
|
||||
from django.test import TestCase
|
||||
|
||||
from ..templatetags import admin2_tags
|
||||
from ..views import IndexView
|
||||
|
||||
|
||||
class TagsTestsModel(models.Model):
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Tags Test Model"
|
||||
verbose_name_plural = "Tags Test Models"
|
||||
from .models import TagsTestsModel
|
||||
|
||||
|
||||
class TagsTestForm(forms.Form):
|
||||
|
|
@ -29,38 +22,65 @@ class TagsTests(TestCase):
|
|||
self.instance = TagsTestsModel()
|
||||
|
||||
def test_admin2_urlname(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
"admin2:None_None_index",
|
||||
admin2_tags.admin2_urlname(IndexView, "index")
|
||||
)
|
||||
|
||||
def test_model_verbose_name_as_model_class(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
TagsTestsModel._meta.verbose_name,
|
||||
admin2_tags.model_verbose_name(TagsTestsModel)
|
||||
)
|
||||
|
||||
def test_model_verbose_name_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
self.instance._meta.verbose_name,
|
||||
admin2_tags.model_verbose_name(self.instance)
|
||||
)
|
||||
|
||||
def test_model_verbose_name_plural_as_model_class(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
TagsTestsModel._meta.verbose_name_plural,
|
||||
admin2_tags.model_verbose_name_plural(TagsTestsModel)
|
||||
)
|
||||
|
||||
def test_model_verbose_name_plural_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
self.instance._meta.verbose_name_plural,
|
||||
admin2_tags.model_verbose_name_plural(self.instance)
|
||||
)
|
||||
|
||||
def test_model_field_verbose_name_autogenerated(self):
|
||||
self.assertEqual(
|
||||
'field1',
|
||||
admin2_tags.model_attr_verbose_name(self.instance, 'field1')
|
||||
)
|
||||
|
||||
def test_model_field_verbose_name_overridden(self):
|
||||
self.assertEqual(
|
||||
'second field',
|
||||
admin2_tags.model_attr_verbose_name(self.instance, 'field2')
|
||||
)
|
||||
|
||||
def test_model_method_verbose_name(self):
|
||||
self.assertEqual(
|
||||
'Published recently?',
|
||||
admin2_tags.model_attr_verbose_name(self.instance, 'was_published_recently')
|
||||
)
|
||||
|
||||
def test_formset_visible_fieldlist(self):
|
||||
formset = TagsTestFormSet()
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
admin2_tags.formset_visible_fieldlist(formset),
|
||||
[u'Visible 1', u'Visible 2']
|
||||
)
|
||||
['Visible 1', 'Visible 2']
|
||||
)
|
||||
|
||||
def test_verbose_name_for(self):
|
||||
app_verbose_names = {
|
||||
'app_one_label': 'App One Verbose Name',
|
||||
}
|
||||
self.assertEqual(
|
||||
"App One Verbose Name",
|
||||
admin2_tags.verbose_name_for(app_verbose_names, 'app_one_label')
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
from django import forms
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.test import TestCase
|
||||
from django.test.client import RequestFactory
|
||||
from django.urls import reverse
|
||||
|
||||
import floppyforms
|
||||
|
||||
import djadmin2
|
||||
from blog.admin2 import UserAdmin2
|
||||
from djadmin2.site import djadmin2_site
|
||||
from ..admin2 import UserAdmin2
|
||||
|
||||
|
||||
class UserAdminTest(TestCase):
|
||||
|
|
@ -23,39 +23,39 @@ class UserAdminTest(TestCase):
|
|||
form = UserAdmin2.create_form_class()
|
||||
self.assertTrue(
|
||||
isinstance(form.fields['username'].widget,
|
||||
floppyforms.TextInput))
|
||||
forms.TextInput))
|
||||
|
||||
request = self.factory.get(reverse('admin2:auth_user_create'))
|
||||
request.user = self.user
|
||||
model_admin = UserAdmin2(User, djadmin2.default)
|
||||
view = model_admin.create_view.as_view(
|
||||
model_admin = UserAdmin2(User, djadmin2_site)
|
||||
view = model_admin.create_view.view.as_view(
|
||||
**model_admin.get_create_kwargs())
|
||||
response = view(request)
|
||||
form = response.context_data['form']
|
||||
self.assertTrue(
|
||||
isinstance(form.fields['username'].widget,
|
||||
floppyforms.TextInput))
|
||||
forms.TextInput))
|
||||
|
||||
def test_update_form_uses_floppyform_widgets(self):
|
||||
form = UserAdmin2.update_form_class()
|
||||
self.assertTrue(
|
||||
isinstance(form.fields['username'].widget,
|
||||
floppyforms.TextInput))
|
||||
forms.TextInput))
|
||||
self.assertTrue(
|
||||
isinstance(form.fields['date_joined'].widget,
|
||||
floppyforms.DateTimeInput))
|
||||
forms.DateTimeInput))
|
||||
|
||||
request = self.factory.get(
|
||||
reverse('admin2:auth_user_update', args=(self.user.pk,)))
|
||||
request.user = self.user
|
||||
model_admin = UserAdmin2(User, djadmin2.default)
|
||||
view = model_admin.update_view.as_view(
|
||||
model_admin = UserAdmin2(User, djadmin2_site)
|
||||
view = model_admin.update_view.view.as_view(
|
||||
**model_admin.get_update_kwargs())
|
||||
response = view(request, pk=self.user.pk)
|
||||
form = response.context_data['form']
|
||||
self.assertTrue(
|
||||
isinstance(form.fields['username'].widget,
|
||||
floppyforms.TextInput))
|
||||
forms.TextInput))
|
||||
self.assertTrue(
|
||||
isinstance(form.fields['date_joined'].widget,
|
||||
floppyforms.DateTimeInput))
|
||||
forms.DateTimeInput))
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
from django.db import models
|
||||
from django.contrib.auth.models import Group, User
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.test import TestCase
|
||||
|
||||
from ..types import ModelAdmin2
|
||||
from djadmin2.site import djadmin2_site
|
||||
from .models import SmallThing
|
||||
from ..core import Admin2
|
||||
from ..types import ModelAdmin2
|
||||
|
||||
|
||||
class Thing(models.Model):
|
||||
pass
|
||||
APP_LABEL, APP_VERBOSE_NAME = 'app_one_label', 'App One Verbose Name'
|
||||
|
||||
|
||||
class Admin2Test(TestCase):
|
||||
|
|
@ -15,21 +16,54 @@ class Admin2Test(TestCase):
|
|||
self.admin2 = Admin2()
|
||||
|
||||
def test_register(self):
|
||||
self.admin2.register(Thing)
|
||||
self.assertTrue(isinstance(self.admin2.registry[Thing], ModelAdmin2))
|
||||
self.admin2.register(SmallThing)
|
||||
self.assertTrue(isinstance(self.admin2.registry[SmallThing], ModelAdmin2))
|
||||
|
||||
def test_register_error(self):
|
||||
self.admin2.register(Thing)
|
||||
self.assertRaises(ImproperlyConfigured, self.admin2.register, Thing)
|
||||
self.admin2.register(SmallThing)
|
||||
self.assertRaises(ImproperlyConfigured, self.admin2.register, SmallThing)
|
||||
|
||||
def test_deregister(self):
|
||||
self.admin2.register(Thing)
|
||||
self.admin2.deregister(Thing)
|
||||
self.assertTrue(Thing not in self.admin2.registry)
|
||||
self.admin2.register(SmallThing)
|
||||
self.admin2.deregister(SmallThing)
|
||||
self.assertTrue(SmallThing not in self.admin2.registry)
|
||||
|
||||
def test_deregister_error(self):
|
||||
self.assertRaises(ImproperlyConfigured, self.admin2.deregister, Thing)
|
||||
self.assertRaises(ImproperlyConfigured, self.admin2.deregister, SmallThing)
|
||||
|
||||
def test_register_app_verbose_name(self):
|
||||
self.admin2.register_app_verbose_name(APP_LABEL, APP_VERBOSE_NAME)
|
||||
self.assertEqual(
|
||||
self.admin2.app_verbose_names[APP_LABEL],
|
||||
APP_VERBOSE_NAME
|
||||
)
|
||||
|
||||
def test_register_app_verbose_name_error(self):
|
||||
self.admin2.register_app_verbose_name(APP_LABEL, APP_VERBOSE_NAME)
|
||||
self.assertRaises(
|
||||
ImproperlyConfigured,
|
||||
self.admin2.register_app_verbose_name,
|
||||
APP_LABEL,
|
||||
APP_VERBOSE_NAME
|
||||
)
|
||||
|
||||
def test_deregister_app_verbose_name(self):
|
||||
self.admin2.register_app_verbose_name(APP_LABEL, APP_VERBOSE_NAME)
|
||||
self.admin2.deregister_app_verbose_name(APP_LABEL)
|
||||
self.assertTrue(APP_LABEL not in self.admin2.app_verbose_names)
|
||||
|
||||
def test_deregister_app_verbose_name_error(self):
|
||||
self.assertRaises(
|
||||
ImproperlyConfigured,
|
||||
self.admin2.deregister_app_verbose_name,
|
||||
APP_LABEL
|
||||
)
|
||||
|
||||
def test_get_urls(self):
|
||||
self.admin2.register(Thing)
|
||||
self.assertEquals(8, len(self.admin2.get_urls()))
|
||||
self.admin2.register(SmallThing)
|
||||
self.assertEqual(8, len(self.admin2.get_urls()))
|
||||
|
||||
def test_default_entries(self):
|
||||
expected_default_models = (User, Group, Site)
|
||||
for model in expected_default_models:
|
||||
self.assertTrue(isinstance(djadmin2_site.registry[model], ModelAdmin2))
|
||||
|
|
|
|||
115
djadmin2/tests/test_renderers.py
Normal file
115
djadmin2/tests/test_renderers.py
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
import datetime as dt
|
||||
from decimal import Decimal
|
||||
|
||||
from django.test import TestCase
|
||||
from django.utils.translation import activate
|
||||
|
||||
from .. import renderers
|
||||
from .models import RendererTestModel
|
||||
|
||||
|
||||
class BooleanRendererTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.renderer = renderers.boolean_renderer
|
||||
|
||||
def test_boolean(self):
|
||||
out1 = self.renderer(True, None)
|
||||
self.assertIn('fa fa-check', out1)
|
||||
out2 = self.renderer(False, None)
|
||||
self.assertIn('fa fa-minus', out2)
|
||||
|
||||
def test_string(self):
|
||||
out1 = self.renderer('yeah', None)
|
||||
self.assertIn('fa fa-check', out1)
|
||||
out2 = self.renderer('', None)
|
||||
self.assertIn('fa fa-minus', out2)
|
||||
|
||||
|
||||
class DatetimeRendererTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.renderer = renderers.datetime_renderer
|
||||
|
||||
def tearDown(self):
|
||||
activate('en_US')
|
||||
|
||||
def test_date_german(self):
|
||||
activate('de')
|
||||
out = self.renderer(dt.date(2013, 7, 6), None)
|
||||
self.assertEqual('6. Juli 2013', out)
|
||||
|
||||
def test_date_spanish(self):
|
||||
activate('es')
|
||||
out = self.renderer(dt.date(2013, 7, 6), None)
|
||||
self.assertEqual('6 de Julio de 2013', out)
|
||||
|
||||
def test_date_default(self):
|
||||
out = self.renderer(dt.date(2013, 7, 6), None)
|
||||
self.assertEqual('July 6, 2013', out)
|
||||
|
||||
def test_time_german(self):
|
||||
activate('de')
|
||||
out = self.renderer(dt.time(13, 37, 1), None)
|
||||
self.assertEqual('13:37', out)
|
||||
|
||||
def test_time_chinese(self):
|
||||
activate('zh')
|
||||
out = self.renderer(dt.time(13, 37, 1), None)
|
||||
self.assertEqual('1:37 p.m.', out)
|
||||
|
||||
def test_datetime(self):
|
||||
out = self.renderer(dt.datetime(2013, 7, 6, 13, 37, 1), None)
|
||||
self.assertEqual('July 6, 2013, 1:37 p.m.', out)
|
||||
|
||||
def test_date_as_string(self):
|
||||
out = self.renderer('13:37:01', None)
|
||||
self.assertEqual('13:37', out)
|
||||
|
||||
# TODO test timezone localization
|
||||
|
||||
|
||||
class TitleRendererTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.renderer = renderers.title_renderer
|
||||
|
||||
def testLowercase(self):
|
||||
out = self.renderer('oh hello there!', None)
|
||||
self.assertEqual('Oh Hello There!', out)
|
||||
|
||||
def testTitlecase(self):
|
||||
out = self.renderer('Oh Hello There!', None)
|
||||
self.assertEqual('Oh Hello There!', out)
|
||||
|
||||
def testUppercase(self):
|
||||
out = self.renderer('OH HELLO THERE!', None)
|
||||
self.assertEqual('Oh Hello There!', out)
|
||||
|
||||
|
||||
class NumberRendererTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.renderer = renderers.number_renderer
|
||||
|
||||
def testInteger(self):
|
||||
out = self.renderer(42, None)
|
||||
self.assertEqual('42', out)
|
||||
|
||||
def testFloat(self):
|
||||
out = self.renderer(42.5, None)
|
||||
self.assertEqual('42.5', out)
|
||||
|
||||
def testEndlessFloat(self):
|
||||
out = self.renderer(1.0 / 3, None)
|
||||
self.assertEqual('0.3333333333333333', out)
|
||||
|
||||
def testPlainDecimal(self):
|
||||
number = '0.123456789123456789123456789'
|
||||
out = self.renderer(Decimal(number), None)
|
||||
self.assertEqual(number, out)
|
||||
|
||||
def testFieldDecimal(self):
|
||||
field = RendererTestModel._meta.get_field('decimal')
|
||||
out = self.renderer(Decimal('0.123456789'), field)
|
||||
self.assertEqual('0.12345', out)
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from ..types import immutable_admin_factory
|
||||
from .. import views
|
||||
from ..types import ModelAdmin2, immutable_admin_factory
|
||||
from ..core import Admin2
|
||||
from .models import BigThing
|
||||
|
||||
|
||||
class ModelAdmin(object):
|
||||
class ModelAdmin:
|
||||
model_admin_attributes = ['a', 'b', 'c']
|
||||
a = 1 # covered
|
||||
b = 2 # covered
|
||||
|
|
@ -28,9 +31,50 @@ class ImmutableAdminFactoryTests(TestCase):
|
|||
del self.immutable_admin.a
|
||||
|
||||
def test_attributes(self):
|
||||
self.assertEquals(self.immutable_admin.a, 1)
|
||||
self.assertEquals(self.immutable_admin.b, 2)
|
||||
self.assertEquals(self.immutable_admin.c, 3)
|
||||
self.assertEqual(self.immutable_admin.a, 1)
|
||||
self.assertEqual(self.immutable_admin.b, 2)
|
||||
self.assertEqual(self.immutable_admin.c, 3)
|
||||
with self.assertRaises(AttributeError):
|
||||
# 'ImmutableAdmin' object has no attribute 'd'
|
||||
self.immutable_admin.d
|
||||
|
||||
|
||||
class ModelAdminTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
class MyModelAdmin(ModelAdmin2):
|
||||
my_view = views.AdminView(r'^$', views.ModelListView)
|
||||
|
||||
self.model_admin = MyModelAdmin
|
||||
|
||||
def test_views(self):
|
||||
views = [self.model_admin.my_view] + ModelAdmin2.views
|
||||
self.assertListEqual(self.model_admin.views, views)
|
||||
|
||||
def test_views_not_same(self):
|
||||
self.assertIsNot(self.model_admin.views, ModelAdmin2.views)
|
||||
|
||||
def test_get_index_kwargs(self):
|
||||
admin_instance = ModelAdmin2(BigThing, Admin2)
|
||||
self.assertIn(
|
||||
'paginate_by',
|
||||
admin_instance.get_index_kwargs().keys()
|
||||
)
|
||||
|
||||
def test_get_urls(self):
|
||||
admin_instance = ModelAdmin2(BigThing, Admin2)
|
||||
self.assertEqual(6, len(admin_instance.get_urls()))
|
||||
|
||||
def test_get_urls_throws_type_error(self):
|
||||
with self.assertRaises(TypeError):
|
||||
try:
|
||||
admin_instance = ModelAdmin2(BigThing, Admin2)
|
||||
admin_instance.views = [views.AdminView(None, None, None)]
|
||||
admin_instance.get_urls()
|
||||
|
||||
except TypeError as e:
|
||||
message = "Cannot instantiate admin view " \
|
||||
'"ModelAdmin2.None". The error that got raised was: ' \
|
||||
"'NoneType' object has no attribute 'as_view'"
|
||||
self.assertEqual(e.args[0], message)
|
||||
raise
|
||||
|
|
|
|||
|
|
@ -1,15 +1,8 @@
|
|||
from django.db import models
|
||||
from django.test import TestCase
|
||||
|
||||
from .. import utils
|
||||
from ..views import IndexView
|
||||
|
||||
|
||||
class UtilsTestModel(models.Model):
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Utils Test Model"
|
||||
verbose_name_plural = "Utils Test Models"
|
||||
from .models import UtilsTestModel
|
||||
|
||||
|
||||
class UtilsTest(TestCase):
|
||||
|
|
@ -18,67 +11,141 @@ class UtilsTest(TestCase):
|
|||
self.instance = UtilsTestModel()
|
||||
|
||||
def test_as_model_class(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
UtilsTestModel._meta,
|
||||
utils.model_options(UtilsTestModel)
|
||||
)
|
||||
UtilsTestModel._meta.verbose_name = "Utils Test Model is singular"
|
||||
UtilsTestModel._meta.verbose_name_plural = "Utils Test Model are " +\
|
||||
" plural"
|
||||
self.assertEqual(
|
||||
UtilsTestModel._meta,
|
||||
utils.model_options(UtilsTestModel)
|
||||
)
|
||||
UtilsTestModel._meta.verbose_name = "Utils Test Model"
|
||||
UtilsTestModel._meta.verbose_name_plural = "Utils Test Models"
|
||||
|
||||
def test_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
self.instance._meta,
|
||||
utils.model_options(self.instance)
|
||||
)
|
||||
self.instance._meta.verbose_name = "Utils Test Model is singular"
|
||||
self.instance._meta.verbose_name_plural = "Utils Test Model are " +\
|
||||
" plural"
|
||||
self.assertEqual(
|
||||
self.instance._meta,
|
||||
utils.model_options(self.instance)
|
||||
)
|
||||
self.instance._meta.verbose_name = "Utils Test Model"
|
||||
self.instance._meta.verbose_name_plural = "Utils Test Models"
|
||||
|
||||
def test_admin2_urlname(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
"admin2:None_None_index",
|
||||
utils.admin2_urlname(IndexView, "index")
|
||||
)
|
||||
|
||||
def test_model_app_label_as_model_class(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
UtilsTestModel._meta.app_label,
|
||||
utils.model_app_label(UtilsTestModel)
|
||||
)
|
||||
|
||||
def test_model_app_label_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
self.instance._meta.app_label,
|
||||
utils.model_app_label(UtilsTestModel)
|
||||
)
|
||||
|
||||
def test_model_verbose_name_as_model_class(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
UtilsTestModel._meta.verbose_name,
|
||||
utils.model_verbose_name(UtilsTestModel)
|
||||
)
|
||||
|
||||
def test_model_verbose_name_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
self.instance._meta.verbose_name,
|
||||
utils.model_verbose_name(self.instance)
|
||||
)
|
||||
|
||||
def test_model_verbose_name_plural_as_model_class(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
UtilsTestModel._meta.verbose_name_plural,
|
||||
utils.model_verbose_name_plural(UtilsTestModel)
|
||||
)
|
||||
|
||||
def test_model_verbose_name_plural_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
self.instance._meta.verbose_name_plural,
|
||||
utils.model_verbose_name_plural(self.instance)
|
||||
)
|
||||
|
||||
def test_model_field_verbose_name_autogenerated(self):
|
||||
self.assertEqual(
|
||||
'field1',
|
||||
utils.model_field_verbose_name(self.instance, 'field1')
|
||||
)
|
||||
|
||||
def test_model_field_verbose_name_overridden(self):
|
||||
self.assertEqual(
|
||||
'second field',
|
||||
utils.model_field_verbose_name(self.instance, 'field2')
|
||||
)
|
||||
|
||||
def test_model_method_verbose_name(self):
|
||||
self.assertEqual(
|
||||
'Published recently?',
|
||||
utils.model_method_verbose_name(self.instance, 'was_published_recently')
|
||||
)
|
||||
|
||||
def test_model_method_verbose_name_fallback(self):
|
||||
self.assertEqual(
|
||||
'simple_method',
|
||||
utils.model_method_verbose_name(self.instance, 'simple_method')
|
||||
)
|
||||
|
||||
def test_app_label_as_model_class(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
UtilsTestModel._meta.app_label,
|
||||
utils.model_app_label(UtilsTestModel)
|
||||
)
|
||||
|
||||
def test_app_label_as_model_instance(self):
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
self.instance._meta.app_label,
|
||||
utils.model_app_label(self.instance)
|
||||
)
|
||||
|
||||
def test_get_attr_callable(self):
|
||||
class Klass:
|
||||
def hello(self):
|
||||
return "hello"
|
||||
|
||||
self.assertEqual(
|
||||
utils.get_attr(Klass(), "hello"),
|
||||
"hello"
|
||||
)
|
||||
|
||||
def test_get_attr_str(self):
|
||||
class Klass:
|
||||
def __str__(self):
|
||||
return "str"
|
||||
|
||||
def __unicode__(self):
|
||||
return "unicode"
|
||||
|
||||
self.assertEqual(
|
||||
utils.get_attr(Klass(), "__str__"),
|
||||
"str"
|
||||
)
|
||||
|
||||
def test_get_attr(self):
|
||||
class Klass:
|
||||
attr = "value"
|
||||
|
||||
self.assertEqual(
|
||||
utils.get_attr(Klass(), "attr"),
|
||||
"value"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1 +1,30 @@
|
|||
# TODO - stub out tests
|
||||
from django.test import TestCase, override_settings
|
||||
from django.urls import reverse
|
||||
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
|
||||
from .. import views
|
||||
|
||||
|
||||
class AdminViewTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.admin_view = views.AdminView(r'^$', views.ModelListView, name='admin-view')
|
||||
|
||||
def test_url(self):
|
||||
self.assertEqual(self.admin_view.url, r'^$')
|
||||
|
||||
def test_view(self):
|
||||
self.assertEqual(self.admin_view.view, views.ModelListView)
|
||||
|
||||
def test_name(self):
|
||||
self.assertEqual(self.admin_view.name, 'admin-view')
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='djadmin2.tests.urls')
|
||||
class CustomLoginViewTest(TestCase):
|
||||
|
||||
def test_view_ok(self):
|
||||
response = self.client.get(reverse("admin2:dashboard"))
|
||||
self.assertInHTML('<h3 class="panel-title">Custom login view</h3>', force_str(response.content))
|
||||
|
|
|
|||
19
djadmin2/tests/urls.py
Normal file
19
djadmin2/tests/urls.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.urls import re_path
|
||||
|
||||
from djadmin2.site import djadmin2_site
|
||||
|
||||
from djadmin2.views import LoginView
|
||||
|
||||
|
||||
class CustomLoginView(LoginView):
|
||||
default_template_name = "custom_login_template.html"
|
||||
|
||||
|
||||
djadmin2_site.login_view = CustomLoginView
|
||||
djadmin2_site.autodiscover()
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^admin2/', djadmin2_site.urls),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
0
djadmin2/themes/__init__.py
Normal file
0
djadmin2/themes/__init__.py
Normal file
0
djadmin2/themes/djadmin2theme_bootstrap3/__init__.py
Normal file
0
djadmin2/themes/djadmin2theme_bootstrap3/__init__.py
Normal file
|
|
@ -0,0 +1,394 @@
|
|||
body {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
padding: 0 15px;
|
||||
min-height: 568px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper {
|
||||
position: inherit;
|
||||
margin: 0 0 0 250px;
|
||||
padding: 0 30px;
|
||||
border-left: 1px solid #e7e7e7;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-top-links {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navbar-top-links li:last-child {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.navbar-top-links li a {
|
||||
padding: 15px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a {
|
||||
padding: 3px 20px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a div {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages, .navbar-top-links .dropdown-tasks, .navbar-top-links .dropdown-alerts {
|
||||
width: 310px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-tasks {
|
||||
margin-left: -59px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: -123px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-user {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.sidebar .sidebar-nav.navbar-collapse {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.sidebar .sidebar-search {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.sidebar ul li {
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.sidebar ul li a.active {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.sidebar .arrow {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sidebar .fa.arrow:before {
|
||||
content: "\f104";
|
||||
}
|
||||
|
||||
.sidebar .active > a > .fa.arrow:before {
|
||||
content: "\f107";
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li, .sidebar .nav-third-level li {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li a {
|
||||
padding-left: 37px;
|
||||
}
|
||||
|
||||
.sidebar .nav-third-level li a {
|
||||
padding-left: 52px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
width: 250px;
|
||||
margin-top: 51px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages, .navbar-top-links .dropdown-tasks, .navbar-top-links .dropdown-alerts {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.btn-outline.btn-primary {
|
||||
color: #428bca;
|
||||
}
|
||||
|
||||
.btn-outline.btn-primary:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-success {
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
.btn-outline.btn-success:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-info {
|
||||
color: #5bc0de;
|
||||
}
|
||||
|
||||
.btn-outline.btn-info:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-warning {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
|
||||
.btn-outline.btn-warning:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-danger {
|
||||
color: #d9534f;
|
||||
}
|
||||
|
||||
.btn-outline.btn-danger:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.chat {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.chat li {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted #999999;
|
||||
}
|
||||
|
||||
.chat li.left .chat-body {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.chat li.right .chat-body {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.chat li .chat-body p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel .slidedown .glyphicon, .chat .glyphicon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.chat-panel .panel-body {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.login-panel {
|
||||
margin-top: 25%;
|
||||
}
|
||||
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.flot-chart-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc, table.dataTable thead .sorting_asc_disabled, table.dataTable thead .sorting_desc_disabled {
|
||||
background: 0 0;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_asc:after {
|
||||
content: "\f0de";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
content: "\f0dd";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting:after {
|
||||
content: "\f0dc";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
color: rgba(50, 50, 50, 0.5);
|
||||
}
|
||||
|
||||
.btn-circle {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding: 6px 0;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 1.428571429;
|
||||
}
|
||||
|
||||
.btn-circle.btn-lg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 25px;
|
||||
font-size: 18px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.btn-circle.btn-xl {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 35px;
|
||||
font-size: 24px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.show-grid {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.show-grid [class^=col-] {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.huge {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.panel-green {
|
||||
border-color: #5cb85c;
|
||||
}
|
||||
|
||||
.panel-green .panel-heading {
|
||||
border-color: #5cb85c;
|
||||
color: white;
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
|
||||
.panel-green a {
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
.panel-green a:hover {
|
||||
color: #3d8b3d;
|
||||
}
|
||||
|
||||
.panel-red {
|
||||
border-color: #d9534f;
|
||||
}
|
||||
|
||||
.panel-red .panel-heading {
|
||||
border-color: #d9534f;
|
||||
color: white;
|
||||
background-color: #d9534f;
|
||||
}
|
||||
|
||||
.panel-red a {
|
||||
color: #d9534f;
|
||||
}
|
||||
|
||||
.panel-red a:hover {
|
||||
color: #b52b27;
|
||||
}
|
||||
|
||||
.panel-yellow {
|
||||
border-color: #f0ad4e;
|
||||
}
|
||||
|
||||
.panel-yellow .panel-heading {
|
||||
border-color: #f0ad4e;
|
||||
color: white;
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
|
||||
.panel-yellow a {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
|
||||
.panel-yellow a:hover {
|
||||
color: #df8a13;
|
||||
}
|
||||
|
||||
.model-search {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sort_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sort_link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.previous-link a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.date-drilldown {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#wrapper.no-sidebar #page-wrapper {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#page-wrapper ol.breadcrumb {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#page-wrapper h1.page-header {
|
||||
margin-top: 30px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper ol.breadcrumb {
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
$(function() {
|
||||
var element = $("#model-list");
|
||||
var selectAllCheckbox = element.find('.model-select-all');
|
||||
var selectCheckbox = element.find('.model-select');
|
||||
var selectedCount = element.find('.selected-count');
|
||||
|
||||
var updateSelectedCount = function() {
|
||||
if (selectedCount.length) {
|
||||
var count = 0;
|
||||
for (var ix = 0; ix < selectCheckbox.length; ix++) {
|
||||
if ($(selectCheckbox[ix]).prop('checked')) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
selectAllCheckbox.prop('checked', count == selectCheckbox.length);
|
||||
selectedCount.text(count);
|
||||
}
|
||||
};
|
||||
|
||||
selectAllCheckbox.click(function(e) {
|
||||
selectCheckbox.prop('checked', this.checked);
|
||||
updateSelectedCount();
|
||||
});
|
||||
|
||||
selectCheckbox.click(function(e) {
|
||||
updateSelectedCount();
|
||||
});
|
||||
|
||||
|
||||
var actionDropdownLink = element.find('.dropdown-menu a');
|
||||
actionDropdownLink.click(function (e) {
|
||||
e.preventDefault();
|
||||
var form = $(this).closest('form');
|
||||
form.find('input[name="' + $(this).data('name') + '"]').val(
|
||||
$(this).data('value'));
|
||||
form.submit();
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
$(document).ready(function() {
|
||||
/**
|
||||
* Dynamicaly adds button to each input element
|
||||
* Required by filter section to allow form to be submitted
|
||||
*/
|
||||
$("#filter_form").find('input').each(function(){
|
||||
var input_field = $(this);
|
||||
|
||||
var btn = input_field.after('<button class="btn">Go</button>');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
//Loads the correct sidebar on window load,
|
||||
//collapses the sidebar on window resize.
|
||||
// Sets the min-height of #page-wrapper to window size
|
||||
$(function() {
|
||||
$(window).bind("load resize", function() {
|
||||
topOffset = 50;
|
||||
width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
|
||||
if (width < 768) {
|
||||
$('div.navbar-collapse').addClass('collapse');
|
||||
topOffset = 100; // 2-row-menu
|
||||
} else {
|
||||
$('div.navbar-collapse').removeClass('collapse');
|
||||
}
|
||||
|
||||
height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
|
||||
height = height - topOffset;
|
||||
if (height < 1) height = 1;
|
||||
if (height > topOffset) {
|
||||
$("#page-wrapper").css("min-height", (height) + "px");
|
||||
}
|
||||
});
|
||||
|
||||
var url = window.location;
|
||||
var element = $('ul.nav a').filter(function() {
|
||||
return this.href == url || url.href.indexOf(this.href) == 0;
|
||||
}).addClass('active').parent().parent().addClass('in').parent();
|
||||
if (element.is('li')) {
|
||||
element.addClass('active');
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
@import "sb-admin2/sb-admin-2";
|
||||
|
||||
#wrapper {
|
||||
&.no-sidebar {
|
||||
#page-wrapper {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.model-search {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sort_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sort_link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.previous-link a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.date-drilldown {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
ol.breadcrumb {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
h1.page-header {
|
||||
margin-top: 30px;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper {
|
||||
ol.breadcrumb {
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
// Mixins
|
||||
|
|
@ -0,0 +1,366 @@
|
|||
@import "variables.less";
|
||||
@import "mixins.less";
|
||||
|
||||
// Global Styles
|
||||
|
||||
body {
|
||||
background-color: @gray-lightest;
|
||||
}
|
||||
|
||||
// Wrappers
|
||||
|
||||
#wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
padding: 0 15px;
|
||||
min-height: 568px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
#page-wrapper {
|
||||
position: inherit;
|
||||
margin: 0 0 0 250px;
|
||||
padding: 0 30px;
|
||||
border-left: 1px solid darken(@gray-lightest, 6.5%);
|
||||
}
|
||||
}
|
||||
|
||||
// Navigation
|
||||
|
||||
// --Topbar
|
||||
|
||||
.navbar-top-links {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navbar-top-links li:last-child {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.navbar-top-links li a {
|
||||
padding: 15px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a {
|
||||
padding: 3px 20px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a div {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages,
|
||||
.navbar-top-links .dropdown-tasks,
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
width: 310px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-tasks {
|
||||
margin-left: -59px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: -123px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-user {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
// --Sidebar
|
||||
|
||||
.sidebar {
|
||||
.sidebar-nav.navbar-collapse {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .sidebar-search {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.sidebar ul li {
|
||||
border-bottom: 1px solid darken(@gray-lightest, 6.5%);
|
||||
a {
|
||||
&.active {
|
||||
background-color: @gray-lighter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .arrow {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sidebar .fa.arrow:before {
|
||||
content: "\f104";
|
||||
}
|
||||
|
||||
.sidebar .active > a > .fa.arrow:before {
|
||||
content: "\f107";
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li,
|
||||
.sidebar .nav-third-level li {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li a {
|
||||
padding-left: 37px;
|
||||
}
|
||||
|
||||
.sidebar .nav-third-level li a {
|
||||
padding-left: 52px;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
.sidebar {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
width: 250px;
|
||||
margin-top: 51px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages,
|
||||
.navbar-top-links .dropdown-tasks,
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Buttons
|
||||
|
||||
.btn-outline {
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.btn-primary.btn-outline {
|
||||
color: @brand-primary;
|
||||
}
|
||||
|
||||
.btn-success.btn-outline {
|
||||
color: @brand-success;
|
||||
}
|
||||
|
||||
.btn-info.btn-outline {
|
||||
color: @brand-info;
|
||||
}
|
||||
|
||||
.btn-warning.btn-outline {
|
||||
color: @brand-warning;
|
||||
}
|
||||
|
||||
.btn-danger.btn-outline {
|
||||
color: @brand-danger;
|
||||
}
|
||||
|
||||
.btn-primary.btn-outline:hover,
|
||||
.btn-success.btn-outline:hover,
|
||||
.btn-info.btn-outline:hover,
|
||||
.btn-warning.btn-outline:hover,
|
||||
.btn-danger.btn-outline:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
// Chat Widget
|
||||
|
||||
.chat {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.chat li {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted @gray-light;
|
||||
}
|
||||
|
||||
.chat li.left .chat-body {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.chat li.right .chat-body {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.chat li .chat-body p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel .slidedown .glyphicon,
|
||||
.chat .glyphicon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.chat-panel .panel-body {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
// Login Page
|
||||
|
||||
.login-panel {
|
||||
margin-top: 25%;
|
||||
}
|
||||
|
||||
// Flot Charts Containers
|
||||
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.flot-chart-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
// DataTables Overrides
|
||||
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_asc:after {
|
||||
content: "\f0de";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
content: "\f0dd";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting:after {
|
||||
content: "\f0dc";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
color: rgba(50,50,50,.5);
|
||||
}
|
||||
|
||||
// Circle Buttons
|
||||
|
||||
.btn-circle {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding: 6px 0;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 1.428571429;
|
||||
}
|
||||
|
||||
.btn-circle.btn-lg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 25px;
|
||||
font-size: 18px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.btn-circle.btn-xl {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 35px;
|
||||
font-size: 24px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
// Grid Demo Elements
|
||||
|
||||
.show-grid [class^="col-"] {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.show-grid {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
// Custom Colored Panels
|
||||
|
||||
.huge {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.panel-green {
|
||||
border-color: @brand-success;
|
||||
.panel-heading {
|
||||
border-color: @brand-success;
|
||||
color: white;
|
||||
background-color: @brand-success;
|
||||
}
|
||||
a {
|
||||
color: @brand-success;
|
||||
&:hover {
|
||||
color: darken(@brand-success, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel-red {
|
||||
border-color: @brand-danger;
|
||||
.panel-heading {
|
||||
border-color: @brand-danger;
|
||||
color: white;
|
||||
background-color: @brand-danger;
|
||||
}
|
||||
a {
|
||||
color: @brand-danger;
|
||||
&:hover {
|
||||
color: darken(@brand-danger, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel-yellow {
|
||||
border-color: @brand-warning;
|
||||
.panel-heading {
|
||||
border-color: @brand-warning;
|
||||
color: white;
|
||||
background-color: @brand-warning;
|
||||
}
|
||||
a {
|
||||
color: @brand-warning;
|
||||
&:hover {
|
||||
color: darken(@brand-warning, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
// Variables
|
||||
|
||||
@gray-darker: lighten(#000, 13.5%);
|
||||
@gray-dark: lighten(#000, 20%);
|
||||
@gray: lighten(#000, 33.5%);
|
||||
@gray-light: lighten(#000, 60%);
|
||||
@gray-lighter: lighten(#000, 93.5%);
|
||||
@gray-lightest: lighten(#000, 97.25%);
|
||||
@brand-primary: #428bca;
|
||||
@brand-success: #5cb85c;
|
||||
@brand-info: #5bc0de;
|
||||
@brand-warning: #f0ad4e;
|
||||
@brand-danger: #d9534f;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue