Compare commits

..

731 commits
0.3.0 ... main

Author SHA1 Message Date
Jannis Leidel
7770da8a49
Merge pull request #479 from jazzband/jazzband/sync/default
Jazzband: Synced file(s) with jazzband/.github
2021-10-22 17:46:32 +02:00
jazzband-bot
bbfa3daa0c Jazzband: Created local 'CODE_OF_CONDUCT.md' from remote 'CODE_OF_CONDUCT.md' 2021-10-21 14:33:45 +00:00
Asif Saif Uddin
933489a491 remove python 2 style codes 2021-10-17 17:09:23 +06:00
Asif Saif Uddin
2a5156005b remove python 2 style codes 2021-10-17 17:09:23 +06:00
Asif Saif Uddin
ca28d88c88 remove python 2 style super call from utils 2021-10-17 17:09:23 +06:00
Asif Saif Uddin
9227439625 remove python 2 style super call and explicit object inheritance from viewmixins 2021-10-17 17:09:23 +06:00
Asif Saif Uddin
78112a85bd remove python 2 style super call and explicit object inheritance 2021-10-17 17:09:23 +06:00
Asif Saif Uddin
951c7e5bcf
update python 3 (#477)
* update python 3

* modify django-filter to 2.4.0
2021-10-17 14:21:02 +06:00
Asif Saif Uddin
5608ae91ea add django 3.2 on the matrix and remove 3.0 as EOL 2021-10-17 13:24:17 +06:00
Jannis Leidel
8cee4de75d
Merge pull request #475 from jazzband/master-to-main
Rename Django's dev branch to main.
2021-03-09 18:36:51 +01:00
Jannis Leidel
f5ee0d12c3
Fix for recent Django. 2021-03-09 13:14:40 +01:00
Jannis Leidel
245b5911e6
More Django fixes. 2021-03-09 12:44:05 +01:00
Jannis Leidel
39c6d80b7b
Don't run tests against Django main on 3.7. 2021-03-09 12:38:08 +01:00
Jannis Leidel
2c6e5f004a
Fix compat issue. 2021-03-09 12:33:11 +01:00
Jannis Leidel
f893867652
Rename own develop branch to main. 2021-03-09 12:29:02 +01:00
Jannis Leidel
9025d59308
Rename Django's dev branch to main.
More information: https://groups.google.com/g/django-developers/c/tctDuKUGosc/
Refs: https://github.com/django/django/pull/14048
2021-03-09 12:25:05 +01:00
Jannis Leidel
5fa2670643
Fix badges. 2020-11-25 21:12:03 +01:00
Jannis Leidel
acc36d9e3e
Merge pull request #474 from jazzband/gha
Migrate to GitHub Actions.
2020-11-25 20:40:15 +01:00
Jannis Leidel
d76590de4c
Enable Jazzband releases. 2020-11-25 20:32:29 +01:00
Jannis Leidel
eba98f9cae
Add coverage tracking. 2020-11-25 20:25:26 +01:00
Jannis Leidel
65c7f21730
Initial GitHub Actions test workflow. 2020-11-25 20:20:05 +01:00
Kamil Gałuszka
c59a19f336 feat: upgrade Django and Python to supported versions 2020-11-21 22:16:43 +06:00
Tim Gates
49f569cc6c
docs: Fix simple typo, taht -> that (#471)
There is a small typo in djadmin2/filters.py.

Should read `that` rather than `taht`.
2020-03-04 16:06:19 +01:00
Asif Saif Uddin
08867d7e13
updated django rest framework 2019-03-18 01:21:42 +06:00
Asif Saif Uddin
c724c332c6 django-filter rest backend global 2018-11-02 21:27:04 +06:00
Asif Saif Uddin
fbd1ab5931 static tag 2018-11-02 21:27:04 +06:00
Asif Saif Uddin
74788d96ff inlineformset deprecation warning fixed 2018-11-02 21:27:04 +06:00
Asif Saif Uddin
09ed44fe56 regex depr 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
5425e37524 static 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
ccdbfdd013 settings changes 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
93a7a213df settings changes 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
673b0f8eb6 change setenv 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
fbd3caf0e3 admin tests only 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
77ed1eb117 disable example apps testing 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
58f38b55cd static 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
bfe2a8b207 pinned django-filter to 1.1.0 for now 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
26727eb2a5 update required packages 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
ddc1e39cea stop flake8 check on travis 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
7ea3d7fc28 updated requirements version 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
439f250423 updated travis matrix 2018-11-02 15:44:25 +06:00
Asif Saif Uddin
69d0387b6d repalce staticfiles with static 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
32f5c93c84 added paginate_by attr to example blogListView 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
6473fbea4d fixed typo 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
c056ad816e django-filters to installed apps 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
769bd37a9a django-filters widget changes revert 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
9d7286b5aa django-filters widget 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
a7be23c4d9 django-filters 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
3c20e75a0d django-filters 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
bdfcc5a65b revert 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
18c8c95443 class based Login and logout views 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
563a330db1 fixed deprecation warning in core 2018-10-23 18:27:41 +06:00
Asif Saif Uddin
78e18161dc
Merge pull request #464 from jazzband/master
fixed static
2018-10-23 15:00:53 +06:00
Asif Saif Uddin
85a5d3b291 fixed deprecation warning in example blog filters test 2018-10-23 14:48:35 +06:00
Asif Saif Uddin
e8bde774cf fixed deprecation warning in views tests 2018-10-23 14:43:45 +06:00
Asif Saif Uddin
f60fb8530c fixed deprecation warning in utils tests 2018-10-23 14:42:16 +06:00
Asif Saif Uddin
18d0d18edd fixed deprecation warning in types tests 2018-10-23 14:41:54 +06:00
Asif Saif Uddin
c4462f79d2 fixed deprecation warning in core tests 2018-10-23 14:37:39 +06:00
Asif Saif Uddin
ffb7f2d595 fixed deprecation warning in admin2tags tests 2018-10-23 14:35:06 +06:00
Asif Saif Uddin
09545a663e fixed pep8 errors 2018-10-23 14:33:21 +06:00
Asif Saif Uddin
0cbaf7f089 fixed deprecation warning it test_actions 2018-10-23 14:32:57 +06:00
Asif Saif Uddin
b285164379 fixed pep8 errors 2018-10-23 13:42:09 +06:00
Asif Saif Uddin
7a754a3469 fixed missing imports 2018-10-23 13:38:37 +06:00
Asif Saif Uddin
2f1959b43e fixed static 2018-10-23 13:05:17 +06:00
Asif Saif Uddin (Auvi)
2473fa3069
fix deprecation warnings (#463)
* fix deprecation warning

* fix deprecation warning

* fix deprecation warning of django filter

* fix deprecation warning of django filter widget

* undo widget

* fixed field_name deprecation warning

* fixed pagination error

* fixed pagination error
2018-09-17 13:58:30 +06:00
Asif Saif Uddin (Auvi)
f212393331
Merge pull request #462 from auvipy/up
Update
2018-09-03 16:12:45 +06:00
Asif Saif Uddin
8636f6ce98 template dir settings 2018-09-03 14:54:37 +06:00
Asif Saif Uddin
6ae2354d2a removed SessionAuthenticationMiddleware 2018-09-03 14:42:29 +06:00
Asif Saif Uddin
8169c11e31 fixed url erros 2018-09-03 14:25:27 +06:00
Asif Saif Uddin
2091f9649d fixed is_authenticated error 2018-09-03 14:13:10 +06:00
Asif Saif Uddin
6263f2a340 fixed lint error 2018-09-03 13:45:27 +06:00
Asif Saif Uddin
647260dfb7 fixed migrations on_delete argument warning 2018-09-03 13:38:39 +06:00
Asif Saif Uddin
5f0c3c323d fixed url includes deprecation warning 2018-09-03 13:37:47 +06:00
Asif Saif Uddin
75c7d4180a updated tox with newer versions 2018-09-03 11:38:31 +06:00
Asif Saif Uddin
68eb9c7c59 updated urls reverse import 2018-09-03 11:31:48 +06:00
Asif Saif Uddin
394b04c2f9 updated authors 2018-09-03 11:20:28 +06:00
Asif Saif Uddin
5d4ba598d7 updated travis matrix 2018-09-03 11:15:12 +06:00
Asif Saif Uddin
d44f64f3fd update django-fillter to 1.1 2018-09-03 11:11:41 +06:00
Asif Saif Uddin
26fc9ff235 update readme 2018-09-03 11:11:14 +06:00
Asif Saif Uddin
cfe9c1ffa2 update setup.py 2018-09-03 11:07:32 +06:00
Asif Saifuddin Auvi
606118cb04
Merge pull request #458 from auvipy/up
start work to support 1.11 and 2.0
2018-05-11 02:02:17 +06:00
Asif Saifuddin Auvi
27421081d4 fixed reverse reverse_lazy import errors 2018-05-11 01:23:23 +06:00
Asif Saifuddin Auvi
90713245bc added .pytest_cache to gitignore 2018-05-11 01:21:51 +06:00
Asif Saifuddin Auvi
b01ff0b2f6 style fix 2018-05-11 01:17:37 +06:00
Asif Saifuddin Auvi
f86f5a1ee2 add on_delete positional arg to related fields 2018-05-11 00:49:17 +06:00
Asif Saifuddin Auvi
be3a67b9c5 add on_delete positional arg to related fields 2018-05-11 00:36:28 +06:00
Asif Saifuddin Auvi
4a715d95c0 add on_delete positional arg to related fields 2018-05-11 00:34:03 +06:00
Asif Saifuddin Auvi
33b41fa311 add on_delete positional arg to related fields 2018-05-10 23:58:25 +06:00
Asif Saifuddin Auvi
e3822dee39 fix pep8 errors 2018-05-10 23:23:37 +06:00
Asif Saifuddin Auvi
e7200b7b65 update MIDDLEWARE settings 2018-05-10 23:23:18 +06:00
Asif Saifuddin Auvi
cce430242c fix pep8 errors 2018-05-10 23:15:01 +06:00
Asif Saifuddin Auvi
2c73396391 fix typo in tox 2018-05-10 23:05:17 +06:00
Asif Saifuddin Auvi
c8a4153a4d revert 2018-05-10 22:54:47 +06:00
Asif Saifuddin Auvi
9db0b200ff remove init.py from from tests folder to fix import issues 2018-05-10 22:42:49 +06:00
Asif Saifuddin Auvi
aac3e1062b modify travis 2018-05-10 22:31:01 +06:00
Asif Saifuddin Auvi
c34a0dab19 fixed flake8 errors 2018-05-10 22:22:00 +06:00
Asif Saifuddin Auvi
cf822c745b updated travis 2018-05-10 22:15:00 +06:00
Asif Saifuddin Auvi
28702ef165 dropped dj 1.8 & 1.9 from tox and added 2.0 2018-05-10 22:09:01 +06:00
Asif Saifuddin Auvi
18fae8d5ed update dependencies 2018-05-10 21:58:56 +06:00
Asif Saifuddin Auvi
dcb43cdb02 added dj1.11 in tox 2017-03-20 17:10:42 +06:00
Asif Saifuddin Auvi
4aa18f3a8d added dj1.11 to travis 2017-03-20 16:33:00 +06:00
Asif Saifuddin Auvi
f8bd4be24c added dj1.11 to travis 2017-03-20 16:32:33 +06:00
Asif Saifuddin Auvi
1054fb25fd added dj1.11 to tox 2017-03-20 16:27:50 +06:00
Asif Saifuddin Auvi
2b5c180792 update 0.7.1 tag for release 2017-01-10 23:43:07 +06:00
Andrews Medina
a95e211d65 add compatibility with last version of deps (#454) 2016-11-29 23:16:39 +06:00
Asif Saifuddin Auvi
b20ec951c3 update minor versions (#453)
and check what fails to fix them incrementally for 0.7.1 release
2016-11-27 17:37:29 +06:00
Asif Saifuddin Auvi
047ed08a8a update history for 0.7.0 2016-11-15 22:47:46 +06:00
Asif Saifuddin Auvi
a10ff4637b update version to 0.7.0 2016-11-15 22:10:33 +06:00
Andrews Medina
1d43c71829 Fix tests (#448)
* tox: disable development mode

* fix django-extra-views and djangorestframework versions

* using get_field instead get_field_by_name

to fix compatibility with Django 1.10

* travis: dont test Django 1.10 with Python 3.3
2016-11-13 11:47:08 +06:00
Asif Saifuddin Auvi
4d7b7e6fb0 updated required dependencies (#444) 2016-11-07 21:02:16 +06:00
Asif Saifuddin Auvi
0239a1b96a added django 1.10 to travis 2016-09-03 15:27:40 +06:00
Asif Saifuddin Auvi
d4065666c6 added django 1.10 to tox 2016-09-03 15:25:29 +06:00
arthur-wsw
8d41a222b7 Hardcoded LoginView (#436)
* Add a way to customize LoginView and Document about it

Resolve #416

* Add test for custom login view

* Remove unused code in test_views
2016-09-03 15:17:37 +06:00
Jannis Leidel
fdcdf5a484 Fixed Coveralls badge URLs. 2016-06-24 14:50:52 +02:00
Jannis Leidel
a2a657aa40 Enabled auto PyPI release on git tags. 2016-06-24 14:48:15 +02:00
Kamil Gałuszka
28cefe56c3 Merge pull request #441 from jazzband/jazzband-move
Fix links to new home in the Jazzband.
2016-06-08 20:50:15 +02:00
Jannis Leidel
c771d1a71a Fix links to new home in the Jazzband. 2016-06-08 20:26:19 +02:00
Andrews Medina
b50ede9f6f Merge pull request #440 from adamchainz/readthedocs.io
Convert readthedocs links for their .org -> .io migration for hosted projects
2016-06-08 01:30:45 -03:00
Adam Chainz
1187eb8709 Convert readthedocs links for their .org -> .io migration for hosted projects
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
2016-06-08 04:07:57 +01:00
Andrews Medina
59d95693b7 Merge pull request #439 from arthur-wsw/url_patterns
Remove deprecated django.conf.urls. patterns from docs
2016-06-08 00:04:25 -03:00
Daniel Roy Greenfeld
fe52529ceb Update CONTRIBUTING.rst 2016-06-07 12:12:19 -07:00
Daniel Roy Greenfeld
1e8a6e495b Update CONTRIBUTING.rst 2016-06-07 12:12:06 -07:00
Daniel Roy Greenfeld
9224d937d3 Added code of conduct
Required for potentially moving to @jazzband and is also a good thing to have in any project.
2016-06-07 12:01:12 -07:00
arthur
9f95eb13ef Remove deprecated django.conf.urls. patterns from docs 2016-06-07 13:45:16 +02:00
Andrews Medina
ddd126abfc Merge pull request #437 from arthur-wsw/docs
Fix documentation examples
2016-06-06 21:37:55 -03:00
Andrews Medina
59197a4713 Merge pull request #438 from arthur-wsw/screenshots
Update admin and admin2 screenshots
2016-06-06 21:37:08 -03:00
arthur
74103e2100 Update screenshots 2016-06-06 15:33:19 +02:00
arthur
5261650544 Update admin and admin2 screenshots 2016-06-06 14:20:34 +02:00
arthur
8e8b48a3f2 Fix documentation examples 2016-06-06 11:52:27 +02:00
Andrews Medina
19dac42021 Merge pull request #435 from pydanny/requires-io-develop
[requires.io] dependency update on develop branch
2016-06-05 23:09:55 -03:00
requires.io
2399dad123 [requires.io] dependency update 2016-06-05 16:29:40 -07:00
Kamil Gałuszka
611f44aa85 Merge pull request #434 from arthur-wsw/bootstrap3
New bootstrap3 default theme + Remove django-crispy-forms and django-floppyforms
2016-06-02 14:51:07 +02:00
arthur
da8b7ad73c Fix installation instruction in README and documentation 2016-05-28 02:15:22 +02:00
arthur
24a8be2d1d Revert unwanted tox changes
Update docs to keep both migration from 0.5 and 0.6
2016-05-27 11:32:20 +02:00
arthur
7f2ae25920 Removing django-crispy-forms and django-floppyforms
Resolve #433 #343
2016-05-26 19:14:39 +02:00
arthur
0d401c2b9a Remove CDN import in favor of static one 2016-05-26 14:21:10 +02:00
arthur
bd35ffc676 Update default theme to a bootstrap3 theme based on http://startbootstrap.com/template-overviews/sb-admin-2/
Resolve #360
2016-05-26 11:34:21 +02:00
Kamil Gałuszka
f3dc001f3a Merge pull request #432 from arthur-wsw/no_eggs
No eggs
2016-05-25 22:44:08 +02:00
arthur
36e8889f84 Add .eggs in .gitignore 2016-05-25 22:30:48 +02:00
arthur
b1bf34bdd2 Delete .egs 2016-05-25 22:29:31 +02:00
Kamil Gałuszka
d9b3d2c8a6 Merge pull request #431 from arthur-wsw/django_1_8
Django 1.8 and 1.9 compatibility
2016-05-25 09:55:49 +02:00
arthur
38198c2d9f Update History 2016-05-22 15:15:13 +02:00
arthur
336bb3753d Update flake8 requirements 2016-05-22 15:07:08 +02:00
arthur
73b95eaa70 Add myself in contributors 2016-05-22 15:06:31 +02:00
arthur
fb05f25084 Update docs 2016-05-22 15:06:02 +02:00
arthur
7d2f5b1251 Test travis config to allow failures for django master 2016-05-22 14:52:05 +02:00
arthur
4bcc02f735 Add future in requirements to fix python2 compatibility 2016-05-22 14:43:35 +02:00
arthur
23c256d6a0 Remove import from django.conf.urls.patterns 2016-05-22 14:38:41 +02:00
arthur
3b09d8b02d Fix lasts tests 2016-05-22 14:32:38 +02:00
arthur
e9db0de137 New way to invalidate the users permission cache in test by loading user from database 2016-05-22 14:23:51 +02:00
arthur
49523a3ae8 Update session hach only if user is logged user 2016-05-22 11:45:08 +02:00
arthur
986d7e7fea Replace DATE_FORMAT with %Y-%m-%d in floppyforms tests because it has been hardcoded since 1.3 because it is required by the W3C HTML5 specification.
53d1d8a8d7
2016-05-22 11:28:10 +02:00
arthur
23ea5d6065 Fix update password view 2016-05-22 11:10:33 +02:00
arthur
702b3cd611 Fix flake8 2016-05-22 10:52:43 +02:00
arthur
39d02f4190 Fix no logout on update password for current user 2016-05-22 10:49:09 +02:00
arthur
e74593d4b4 Use DRF PageNumberPagination to finish fixing DRF tests 2016-05-22 10:20:17 +02:00
arthur
829840f411 Fix model migrations 2016-05-20 10:54:42 +02:00
arthur
37be02f1c6 New example settings generated from django 1.9
Serve media for better manual testing
2016-05-20 10:30:07 +02:00
arthur
00522b6c9e Fix test_apiviews (remove a space) 2016-05-20 09:20:01 +02:00
arthur
fdc5563cba Fix permissions error 2016-05-20 09:19:41 +02:00
arthur
fdd938b1ac Flake8 in apiviews 2016-05-19 20:07:45 +02:00
arthur
eafe2ac7c1 Update DRF 3 2016-05-19 20:06:53 +02:00
arthur
f0a5ac67e4 Fix flake8 2016-05-19 19:27:02 +02:00
arthur
a373875c0d Set return of get_update password_url to default value in UserChangeFrom when no instance 2016-05-19 19:21:56 +02:00
arthur
5511b4dc8d Fix password link in user 2016-05-19 18:50:56 +02:00
arthur
d9a6da6e52 Try fix for some blog test 2016-05-19 18:27:41 +02:00
arthur
830bffcf11 Using TextField widget for GenericIPAddressField according to django-floppyforms documentation
http://django-floppyforms.readthedocs.io/en/latest/widgets.html
2016-05-19 18:16:01 +02:00
arthur
0b923103f3 Replace IPAddressField with GenericIPAddressField 2016-05-19 17:05:21 +02:00
arthur
e7df67e150 Update create_view_permission and move signal to AppConfig 2016-05-08 02:22:49 +02:00
arthur
41133b2b9c Fix imports 2016-05-08 01:38:44 +02:00
arthur
babe7a70c7 Optimise imports 2016-05-08 01:31:16 +02:00
arthur
23f7f9479a create a djadmin2_site in djadmin2/site.py to make it work in django 1.9 2016-05-08 01:29:17 +02:00
arthur
754f5dab56 Replace post_sync signal with post_migrate 2016-05-08 00:54:04 +02:00
arthur
f223b85422 Rename AdminModel2Mixin to Admin2ModelMixin 2016-05-08 00:25:12 +02:00
arthur
92e7d52c47 rename ctype to c_type (flake8 on python2.7) 2016-05-08 00:18:16 +02:00
arthur
cb91aabcf4 Update permission.py 2016-05-08 00:12:53 +02:00
arthur
54f710055a Add migrations but not use them in test for now 2016-05-07 23:59:55 +02:00
arthur
e7a40e1806 Update url patterns 2016-05-07 23:57:53 +02:00
arthur
3bf33946c6 Update tox.init 2016-05-07 23:29:25 +02:00
arthur
c532393b97 Fix flake8 errors 2016-05-07 23:28:30 +02:00
arthur
5849d80dcb Update django rest framework 2016-05-07 23:26:48 +02:00
arthur
f3ff443373 Fix flake8 errors 2016-05-07 22:59:15 +02:00
arthur
f5701e5c15 Update tox and travis configuration with flake8 support 2016-05-07 22:58:56 +02:00
arthur
d3d3fbe991 Add django 1.8 setup 2016-05-07 22:51:22 +02:00
arthur
5bd01187d4 Fix nested object test 2016-05-07 21:36:43 +02:00
arthur
77fd9401bb Add field_name attribute for build_date_filter 2016-05-07 21:09:58 +02:00
arthur
9872521f6f Fix collector in BaseListAction who generate bug when trying to delete multiple object from action list 2016-05-07 21:09:22 +02:00
arthur
3fbc396fa2 Fix slice has been taken issue on _format_days, _format_months and _format_years 2016-05-07 21:07:51 +02:00
arthur
8189b9cfaa Update django-floppyforms and django-filter 2016-05-07 20:28:41 +02:00
arthur
5f9707e467 Delete migration for tox to work 2016-05-07 20:28:04 +02:00
arthur
4bdaba8932 Add .cache in gitignore 2016-05-07 20:24:21 +02:00
arthur
599ec2d236 Add migrations 2016-05-07 19:44:00 +02:00
arthur
c7ddb60c3b Add .idea in PyCharm 2016-05-07 19:43:42 +02:00
Kamil Gałuszka
ac531c3941 Merge pull request #428 from andrewsmedina/fix_django_filter
pin django-filter version to < 0.12.0
2016-03-15 20:39:43 +01:00
Andrews Medina
cb9d43e86f pin django-filter version to < 0.12.0 2016-01-17 21:17:49 -02:00
Kamil Gałuszka
b2077ba4b8 Merge pull request #427 from andrewsmedina/allow_failures
travis: enabling Django 1.8 and 1.9 tests with allow_failures enabled
2016-01-16 23:49:49 +01:00
Andrews Medina
6b1f819770 travis: removing pypy3 for django 1.7 2016-01-02 14:17:20 -02:00
Andrews Medina
3632af362d travis: enabling Django 1.8 and 1.9 tests with allow_failures enabled 2016-01-02 14:01:42 -02:00
Andrews Medina
718b0b7524 fix rst format 2015-12-13 18:37:03 -02:00
Andrews Medina
03f4df0121 update Two Scoops of Django version 2015-12-13 18:35:18 -02:00
Andrews Medina
cbf1263593 remove crate.io badges 2015-12-13 18:33:33 -02:00
Andrews Medina
17641045e8 use new travis infrastructure 2015-12-13 18:28:33 -02:00
Andrews Medina
20b5b2ab72 Merge pull request #424 from hnakamur/use_static_template_tag
Use static template tag instead of STATIC_URL
2015-08-21 01:09:36 -03:00
Hiroaki Nakamura
25679c7fa3 Use static template tag instead of STATIC_URL 2015-08-21 10:27:35 +09:00
Kamil Gałuszka
d69729e52f Merge pull request #417 from montiniz/py3-fix
Raise syntax no longer accepts comma-separated arguments in python3
2015-03-30 22:53:44 +02:00
Kamil Gałuszka
eb3ba7e98a Merge pull request #419 from montiniz/django1.8-fixes
Django1.8 fixes
2015-03-30 20:40:55 +02:00
montiniz
afa944e5ff Updated tox for django1.8 testing 2015-03-30 13:09:33 -05:00
montiniz
03dea3c00b Fixed datetime_renderer to be compatible with django 1.8. Django ticket #23466 2015-03-30 12:50:08 -05:00
montiniz
8a51b321f3 django 1.8 fixes 2015-03-30 12:40:13 -05:00
Kamil Gałuszka
664aeb24ec Merge pull request #418 from shulcsm/develop
Fix some Django 1.8 compatibility issues.
2015-03-24 21:06:10 +01:00
montiniz
1802fce73d Added tests for ModelAdmin.get_urls 2015-03-21 12:55:06 -05:00
montiniz
de3905cd4b Raise syntax no longer accepts comma-separated arguments in python3 2015-03-21 12:48:10 -05:00
Koding
a51eb82f6b Fix some Django 1.8 compatibility issues. 2015-03-21 16:26:12 +00:00
Andrews Medina
a67db4c46a authors: added Germano Gabbianelli. 2015-01-11 17:33:44 -02:00
Andrews Medina
0649044717 Merge pull request #391 from douglasmiranda/fix-empty-form-message
Fix: "there are no" instead "there isn't" on the empty form message.
2015-01-10 18:43:13 -02:00
Andrews Medina
ff3cbd413a Merge pull request #386 from tyrion/patch-2
Fixed ModelAdminBase2 to allow overriding existent views.
2015-01-10 18:35:31 -02:00
Andrews Medina
b089a4027c Merge pull request #384 from tyrion/patch-1
"djadmin2theme_default" should not be hard-coded in templatetags.
2015-01-10 18:30:46 -02:00
Andrews Medina
59990bbef5 Merge pull request #403 from galuszkak/tox_tests
Many fixes to py3 support and django 1.7 compatybility
2015-01-08 15:54:53 -02:00
Kamil Gałuszka
7d86cfc000 Update AUTHORS.rst 2015-01-08 13:56:35 +01:00
Kamil Gałuszka
cde4de20c8 fixes to review by @andrewsmedina #403 2015-01-08 08:41:41 +01:00
Kamil Gałuszka
84ae23b903 fix problems with permissions 2015-01-06 18:29:29 +01:00
Kamil Gałuszka
d61b9922ce getting back to versions that tests are passing 2015-01-05 22:40:54 +01:00
montiniz
a6e7755a55 Fixes for compatibility with python3. 2014-11-26 09:42:17 -06:00
Andrews Medina
8809ae2089 Add gitter badget. 2014-11-10 00:45:54 -02:00
Kamil Gałuszka
dda1211f43 small fix compatybility for test and dj1.7 2014-10-10 22:19:05 -05:00
Kamil Gałuszka
836d85668e only 28 failing test on py3 :) 2014-10-10 22:19:05 -05:00
Kamil Gałuszka
a20c98d6d4 fixing next py3 problems... only 57 failing tests left. 2014-10-10 22:19:04 -05:00
Kamil Gałuszka
e74c603bda fix for type in filters.py 2014-10-10 22:19:04 -05:00
Kamil Gałuszka
6144278a9e fix for py3 basestring problem with six 2014-10-10 22:19:04 -05:00
Kamil Gałuszka
03ebd91f78 fixing django 1.7 errors 2014-10-10 22:19:04 -05:00
Kamil Gałuszka
2f43a66055 fixing possible errors on pypy2 2014-10-10 22:19:03 -05:00
Kamil Gałuszka
7e7542ef2b support django >=1.6 2014-10-10 22:19:03 -05:00
Kamil Gałuszka
84bf9f2073 fixing test with modelforms 2014-10-10 22:19:03 -05:00
Kamil Gałuszka
b341d763f0 many fixes to django-admin2 with py3
and django 1.7 compatybility
2014-10-10 22:19:02 -05:00
Kamil Gałuszka
d12f82d241 update to travis (removed comma typo) 2014-10-10 22:19:02 -05:00
Daniel Greenfeld
7032e19e2e Merge pull request #402 from galuszkak/tox_tests
added tox_tests
2014-09-17 11:38:38 -07:00
Kamil Gałuszka
3d79503b58 fix to TOX_ENV fail ;) 2014-09-17 20:31:19 +02:00
Kamil Gałuszka
d51069ade8 added tox_tests 2014-09-17 20:26:46 +02:00
Daniel Greenfeld
bd8cf8c686 Add @marangonico to authors. 2014-06-25 09:21:27 -07:00
Daniel Greenfeld
5ab2bad9a0 Merge pull request #399 from marangonico/patch-1
fix typo
2014-06-25 09:20:42 -07:00
Daniel Greenfeld
42808d5bb5 Add @amosson to contributors 2014-06-25 09:17:56 -07:00
Daniel Greenfeld
50df9addc2 Merge pull request #400 from amosson/develop
fix for django-braces>=1.4.0
2014-06-25 09:16:43 -07:00
Mosson, Andrew
5ff619979f fix for django-braces>=1.4.0
braces 1.3 views exported AccessMixin
in braces 1.4 this was moved views._access and not exported in views
not sure if this was the intent of braces or an oversight
if intent - should look at AccessMixin vs. using a more specific mixin

tested against django-braces 1.3.1 and django-braces 1.4.0
2014-06-19 10:12:13 -07:00
marangonico
f0e9db3ee5 fix typo 2014-06-19 08:59:56 +02:00
Daniel Greenfeld
92e58112eb Add two scoops icon 2014-03-04 17:59:55 -08:00
Daniel Greenfeld
c64aeee0ef Fix the tests 2014-02-26 12:55:42 -08:00
Daniel Greenfeld
2079a7be9b bump to 0.6.1 2014-02-26 10:21:56 -08:00
Daniel Greenfeld
b30f91e5b8 prep history for new release 2014-02-26 10:21:04 -08:00
Daniel Greenfeld
0b7c7dba8b Merge pull request #393 from BertrandBordage/patch-1
Adds png glyphicons to MANIFEST.
2014-02-08 23:04:02 -08:00
Bertrand Bordage
20e86a7a28 Adds png glyphicons to MANIFEST. 2014-02-08 16:33:58 +01:00
Douglas Miranda
af82d2b9b1 Fix: "there are no" instead "there isn't" on the empty form message. 2013-12-17 23:43:49 -03:00
Germano Gabbianelli
606db2fe7a Added tests for pull-request #386
1. Custom views should be prepended to the 'views' list, otherwise they
   could be shadowed by views of the superclass.
2. Custom views should not be added to the superclass 'views' list.
   Instead a new list should be created and assigned to the class.
2013-12-05 12:48:55 +01:00
Germano Gabbianelli
4c35c506a7 Fixed ModelAdminBase2 to allow overriding existent views. 2013-12-03 11:34:05 +01:00
Germano Gabbianelli
4a4b11176e "djadmin2theme_default" should not be hard-coded in templatetags. 2013-12-03 11:33:39 +01:00
Daniel Greenfeld
09fcceef13 Merge pull request #388 from gregmuellegger/django1.6fixes
Fixes for Django 1.6
2013-12-01 15:30:24 -08:00
Gregor Müllegger
4072d4c009 Fixing failing tests, that only occured on Travis. You cannot use a plane, generic View in the Admin since it always needs to be a model based one. At least unless you overwrite the get_*_kwargs method. 2013-11-28 18:11:12 +01:00
Gregor Müllegger
34b98fb8ac Better error messages for admin views that fail to instantiate. 2013-11-28 18:11:04 +01:00
Gregor Müllegger
930375e3b2 Remove deprecated setup_environ call from the docs configuration script. That made the documentation building fail for Django 1.6. Part of a Fix for #387. 2013-11-28 13:12:50 +01:00
Gregor Müllegger
ca86c60499 Django 1.6 changed the MultiWidget.needs_multipart_form attribute into a property. We didn't plan for that in floppify code yet. We check now for properties which makes it compatible with Django 1.6 and more futureproof. Part of a Fix for #387. 2013-11-28 13:12:50 +01:00
Gregor Müllegger
d9530074e4 Django 1.6 changed the widgets its using for IntegerFields, this needed adjustment in the floppifying rule for those fields. Part of a Fix for #387. 2013-11-28 13:12:50 +01:00
Gregor Müllegger
b8ab2e4408 Make sure that the urls.py is loaded before the tests are run. Django 1.6 doesn't guarantee this anymore. Part of a Fix for #387. 2013-11-28 12:03:08 +01:00
Daniel Greenfeld
d1f5e060f8 Add empty form fix to history. 2013-11-05 22:16:19 -08:00
Daniel Greenfeld
f66ac09bdf Merge pull request #378 from douglasmiranda/fix-empty-form
Fix empty form.
2013-11-05 22:12:41 -08:00
Douglas Miranda
2f8f890ce0 A nice margin for a nice message. :) 2013-09-27 00:52:51 -04:00
Douglas Miranda
b169d28653 Show a nice message if the have no visible fields. 2013-09-27 00:52:18 -04:00
Daniel Greenfeld
ee445acadf Merge pull request #377 from douglasmiranda/right-place-for-actions
Moving the unpublish_* actions to the right place.
2013-09-26 20:51:29 -07:00
Douglas Miranda
cd65542d03 moving the unpublish_* actions to the right place ( issue #277 ) 2013-09-26 23:42:42 -04:00
Daniel Greenfeld
a32fdb1f30 Merge pull request #375 from douglasmiranda/view-descriptions
Adding View Descriptions for "registry" and "app_verbose_names".
2013-09-25 16:06:44 -07:00
Douglas Miranda
ff721a2ef6 Adding View Descriptions for "registry" and "app_verbose_names". 2013-09-24 03:27:38 -04:00
Daniel Greenfeld
e694d23ec8 Adding migration 2013-09-18 11:53:32 +02:00
Daniel Greenfeld
5fa2f53e13 More explicit installation instructions 2013-09-16 13:00:22 +02:00
Daniel Greenfeld
a7feb05ca4 bump to 0.6.0rc1 2013-09-12 16:44:33 +02:00
Daniel Greenfeld
cfce0f4afb Add @yarbelk to authors and update the history file 2013-09-11 22:13:00 +02:00
Daniel Greenfeld
2b044712b6 Merge pull request #372 from yarbelk/fix_multipart
Fix missing enctype="multipart/form-data" when needed
2013-09-11 12:47:46 -07:00
yarbelk
690401d604 Fix missing enctype="multipart/form-data" when needed
- add app example.files with tests, based on example2.
- add check in base update template which checks if
  form.is_multitype and adds the encoding for it
- update gitignore to ignore the uploaded media folder
- add test to blog to ensure that the create form is not
  multipart encoded
2013-09-11 22:20:38 +08:00
Daniel Greenfeld
eb768817f3 Merge pull request #370 from douglasmiranda/fix-typeerror
fix TypeError - the right way
2013-08-26 23:42:52 -07:00
Douglas Miranda
087a918542 fix TypeError - the right way () 2013-08-26 20:20:09 -04:00
Daniel Greenfeld
33b83ead5f Merge pull request #366 from douglasmiranda/implementing-app-verbose-name
Implementing "app verbose name"
2013-08-13 16:51:09 -07:00
Daniel Greenfeld
b492f0a166 Merge pull request #364 from powersurge360/all-model-action
All model action
2013-08-13 16:50:33 -07:00
Douglas Miranda
cfba14384e Tests for the "app verbose name". 2013-08-05 03:39:17 -04:00
Douglas Miranda
7806053516 Using on the blog app the new "app verbose name feature". 2013-08-05 03:37:51 -04:00
Douglas Miranda
08f38c26c2 Showing the app verbose names on the templates. 2013-08-05 03:36:37 -04:00
Douglas Miranda
7f830c8aeb Registering and making the app verbose names accessible into the views. 2013-08-05 03:35:03 -04:00
Kevin Diale
bf21d8dac4 Adding tests for unselected actions. 2013-08-02 15:13:07 -04:00
Kevin Diale
35cb0bcc75 "only_selected" flag exists to specify whether it should affect the
whole queryset or just those that are selected.
2013-08-02 13:58:57 -04:00
Daniel Greenfeld
fa86f85afc Remove accidental dependency on django.contrib.admin 2013-08-02 12:52:38 +02:00
Daniel Greenfeld
3ddaaefba4 Merge pull request #362 from powersurge360/modeladmin-ordering
Modeladmin ordering
2013-08-02 03:39:10 -07:00
Kevin Diale
9e29500f5c Pretty simple tests for this one. 2013-08-01 18:16:59 -04:00
Kevin Diale
1aa4ee36d6 Implemented ordering, tests in the next commit. 2013-08-01 12:00:03 -04:00
Daniel Greenfeld
361aeda9da Fix the theme rules page 2013-08-01 12:54:17 +02:00
Daniel Greenfeld
f0f9074ca2 Describe theming better 2013-08-01 12:46:38 +02:00
Daniel Greenfeld
7c3bc1e0b0 merge 2013-08-01 12:39:21 +02:00
Daniel Greenfeld
68cc955fce Merge branch 'admin-date-hierarchy' of git://github.com/powersurge360/django-admin2 into powersurge360-admin-date-hierarchy 2013-08-01 12:31:38 +02:00
Daniel Greenfeld
3b0526b335 Merge branch 'develop' of github.com:pydanny/django-admin2 into develop 2013-08-01 12:28:39 +02:00
Kevin Diale
03261fa461 Should be ready to go! 2013-07-31 17:43:05 -04:00
Kevin Diale
bb127c9483 Added unit tests. 2013-07-31 17:31:23 -04:00
Kevin Diale
bab18c97c1 Interface is most of the way there. 2013-07-31 14:58:08 -04:00
Kevin Diale
966e549ace Basic interface done. 2013-07-31 12:57:48 -04:00
the5fire
6f531ea09f Test for the ModelAdmin2 get_index_kwargs 2013-07-31 07:17:07 +08:00
Kevin Diale
8dc0821539 Left in a wee bit of debugging code. 2013-07-30 17:20:27 -04:00
Kevin Diale
29eaa661d5 Drilling down works on a functional level. Gotta set up interface and
tests.

On a related note, TAKE THAT DJANGO FILTERS.
2013-07-30 16:28:24 -04:00
Daniel Greenfeld
555b022fb2 Adding Kevin Diale to authors. 2013-07-30 17:05:41 +02:00
Daniel Greenfeld
b44fe10e22 Update AUTHORS.rst 2013-07-30 17:04:37 +02:00
Daniel Greenfeld
466ae1d5b7 Merge pull request #358 from powersurge360/actions-selection-counter
Actions selection counter
2013-07-30 08:04:05 -07:00
Kevin Diale
eb204104bd Added some tests. 2013-07-30 10:05:57 -04:00
Kevin Diale
6ff47746df Added in actions_selection_counter, will add tests/polish next commit. 2013-07-29 14:48:05 -04:00
the5fire
e8c5e9ec52 add admin model list pagination template 2013-07-28 11:19:05 +08:00
the5fire
ee0c1b0031 fix list_per_page can't enable in model list view 2013-07-28 10:26:08 +08:00
Andrews Medina
b7b0d9ba8c added docs about AdminView. 2013-07-27 01:59:48 -03:00
Andrews Medina
3c7fc0fc0e Merge branch 'develop' into admin_view
Conflicts:
	djadmin2/types.py
2013-07-26 17:55:55 -03:00
Andrews Medina
26ba68115f Using six to set the ModelAdminBase2 metaclass. 2013-07-26 17:41:58 -03:00
Daniel Greenfeld
1b7b803b1b Update README.rst 2013-07-25 22:36:02 +02:00
Daniel Greenfeld
0210ea8f07 Adding Kenneth Love to authors. 2013-07-22 00:44:15 +02:00
Daniel Greenfeld
45b7aea7f6 Merge pull request #351 from douglasmiranda/fix-issue-348
fix: issue #348
2013-07-21 15:42:50 -07:00
Daniel Greenfeld
5f76d84e72 Merge pull request #349 from brack3t/feature/history
Feature/history - Merging anyway. I'll pull out the auth link tomorrow.
2013-07-21 15:42:30 -07:00
Douglas Miranda
ac0f5da4f6 fix: issue #348
Adding djadmin2.themes.djadmin2theme_default on INSTALLED_APPS.
2013-07-21 17:31:11 -04:00
Daniel Greenfeld
be1080c43d Work on contributing and the FAQ 2013-07-21 13:26:03 +02:00
Chris Jones
4959a095c4 fix merge error. 2013-07-18 17:44:19 -07:00
Kenneth Love
3844a952c0 merge 2013-07-18 17:41:33 -07:00
Kenneth Love
738e3a9dd8 template changes 2013-07-18 17:40:54 -07:00
Chris Jones
e7f8170237 Ooooooooo pretty. 2013-07-18 17:33:19 -07:00
Kenneth Love
af11cb012e Merge branch 'fix-history' of github.com:brack3t/django-admin2 into fix-history 2013-07-18 17:31:11 -07:00
Kenneth Love
e5f1940f3e action_type property 2013-07-18 17:31:08 -07:00
Chris Jones
57ef2a428c Nicer to look at. 2013-07-18 17:30:41 -07:00
Chris Jones
69f2a357f8 Why don't you PEP your 8! Add in change messages. 2013-07-18 17:23:48 -07:00
Kenneth Love
52c337a72c force_text for object_repr and condition on history link 2013-07-18 17:16:07 -07:00
Kenneth Love
acae0a2620 icons 2013-07-18 17:02:40 -07:00
Kenneth Love
99ae00a0ae show user that performed action 2013-07-18 16:56:08 -07:00
Kenneth Love
802265b60f Merge branch 'fix-history' of github.com:brack3t/django-admin2 into fix-history 2013-07-18 16:54:26 -07:00
Kenneth Love
ee2ca9feff template updates 2013-07-18 16:54:22 -07:00
Chris Jones
ee1c90cd9f Working model history view. 2013-07-18 16:51:16 -07:00
Kenneth Love
a7951353a8 Merge branch 'fix-history' of github.com:brack3t/django-admin2 into fix-history 2013-07-18 16:38:20 -07:00
Kenneth Love
7dbf50426f model_history template 2013-07-18 16:38:13 -07:00
Chris Jones
d62b612583 nevermind. 2013-07-18 16:38:00 -07:00
Chris Jones
f7ef575709 Should be a detail view. 2013-07-18 16:37:18 -07:00
Chris Jones
82d9e7ae65 PEP8 love. 2013-07-18 16:36:31 -07:00
Chris Jones
4089ad4aab PEP8 all the things. Add in new history url. 2013-07-18 16:30:40 -07:00
Chris Jones
555588f13c PEP8 2013-07-18 16:08:38 -07:00
Chris Jones
ae39a26e13 Use model properties for action ints. 2013-07-18 15:58:31 -07:00
Kenneth Love
598b0a704f basics for recording history 2013-07-18 13:59:08 -07:00
Chris Jones
14d2a20431 Merge branch 'fix-history' of github.com:brack3t/django-admin2 into fix-history 2013-07-18 13:46:17 -07:00
Chris Jones
6273e68dde Stealing the logger from the old admin. 2013-07-18 13:46:00 -07:00
Kenneth Love
76ab676530 more html 2013-07-18 13:40:50 -07:00
Kenneth Love
ef77c8242d Merge branch 'fix-history' of github.com:brack3t/django-admin2 into fix-history 2013-07-18 13:06:04 -07:00
Kenneth Love
4cfe10e645 actual data in history template 2013-07-18 13:05:56 -07:00
Chris Jones
fb0e73a37e PEP8 2013-07-18 13:04:47 -07:00
Kenneth Love
5ed5123836 started on history 2013-07-18 13:00:14 -07:00
Daniel Greenfeld
9e4d2ec039 Move default theme to it's own app. This way we are following the same pattern that other themes will have to use fix #333 2013-07-18 17:55:08 +02:00
Daniel Greenfeld
82e56bdae5 prep for #273 2013-07-18 16:32:50 +02:00
Daniel Greenfeld
f1f9f6e83e update the contributing instructions to match what's current 2013-07-18 16:17:20 +02:00
Ludvig Wadenstein
3cc592a906 Inlines separated into stacked and tabular 2013-07-18 15:02:07 +02:00
Daniel Greenfeld
2004df71bb Pointing coveralls at the develop branch 2013-07-16 23:52:09 +02:00
Daniel Greenfeld
0f7c880907 Merge pull request #338 from z4r/patch-1
Excluding tests from coverage
2013-07-16 14:51:17 -07:00
Andrea de Marco
7090d00265 Excluding tests from coverage 2013-07-16 23:45:15 +02:00
Daniel Greenfeld
ab8770fb16 Add coveralls badge to README. Touches #325, #285 and powered by #337 2013-07-16 22:09:25 +02:00
Daniel Greenfeld
62ec7771d2 Update AUTHORS.rst 2013-07-16 21:56:42 +02:00
Daniel Greenfeld
cded4c4027 Merge pull request #337 from z4r/develop
It should fix #285 and #325
2013-07-16 12:55:46 -07:00
z4r
a9a9d4574e It should fix #285 2013-07-16 20:50:44 +02:00
z4r
da632d2841 It should fix #325 2013-07-16 20:36:03 +02:00
Daniel Greenfeld
29425ea5e4 per #240, this adds indexing to the design document 2013-07-16 20:32:46 +02:00
Daniel Greenfeld
d1a4b849ab per #240, this adds indexing to the contributing document 2013-07-16 20:28:58 +02:00
Daniel Greenfeld
9957e782c3 This should help with migration efforts and related documentation like #284 2013-07-16 20:13:11 +02:00
Daniel Greenfeld
82934d4445 Merge pull request #335 from ludw/savebuttons
Removed some duplication of savebutton markup in templates
2013-07-16 10:36:26 -07:00
Daniel Greenfeld
58b0eb5df7 Contributing tweak 2013-07-16 09:18:38 +02:00
Ludvig Wadenstein
116ae29dab Removed some duplication of savebutton markup in templates 2013-07-15 22:47:10 +02:00
Daniel Greenfeld
854832accd Fix setup.py issue 2013-07-14 15:29:20 +02:00
Daniel Greenfeld
944baf62db Cleanup of example templates 2013-07-14 12:36:56 +02:00
Daniel Greenfeld
ff8a0a5c27 remove broken, stupid coveralls 2013-07-14 11:56:38 +02:00
Daniel Greenfeld
b0a18a13a1 finish of final README update 2013-07-14 11:54:57 +02:00
Daniel Greenfeld
54c4bcf933 prep for release of 0.5.1. 2013-07-14 11:50:13 +02:00
Daniel Greenfeld
e8c68f5c0c removing SCREENSHOTS include because Github doesn't do RST includes 2013-07-14 11:23:44 +02:00
Daniel Greenfeld
8853a0423d README cleanup 2013-07-14 11:21:30 +02:00
Daniel Greenfeld
d2741ced7b fix 320 2013-07-14 11:05:22 +02:00
Daniel Greenfeld
99b9285f80 Merge branch 'better_examples2' of git://github.com/bootandy/django-admin2 into bootandy-better_examples2 2013-07-14 10:55:47 +02:00
Daniel Greenfeld
d528ccc095 fix #332 which removes absolute versions from requirements 2013-07-14 10:11:53 +02:00
Daniel Greenfeld
aeaa45e31a Theme bump 2013-07-13 12:37:44 +02:00
Daniel Greenfeld
0ac9181197 Theme work 2013-07-13 12:34:47 +02:00
Daniel Greenfeld
ca8f057b5e FAQ bump 2013-07-13 11:53:17 +02:00
Daniel Greenfeld
e8b9dcb109 FAQ bump 2013-07-13 11:53:04 +02:00
Daniel Greenfeld
f8b5372adf FAQ bump 2013-07-13 11:10:00 +02:00
Daniel Greenfeld
3e9c7f13ec FAQ bump 2013-07-13 11:06:01 +02:00
Daniel Greenfeld
3daa553898 Adding FAQ 2013-07-13 11:04:24 +02:00
d1ffuz0r
ae0ab23b12 unused attribute was removed 2013-07-10 10:59:39 +07:00
bootandy
5477b7ad36 fix tests. now require different params on post 2013-07-09 19:36:13 +01:00
bootandy
a287898c59 merge 2013-07-09 17:58:52 +02:00
Daniel Greenfeld
c545912561 Merge pull request #322 from douglasmiranda/fix-fixed-height
fixing the fixed height of .change_form
2013-07-09 05:55:56 -07:00
Daniel Greenfeld
31941ca309 Final prep for 0.5.0 release 2013-07-09 14:18:23 +02:00
Daniel Greenfeld
fc4f6a5741 Update README.rst 2013-07-09 14:13:16 +02:00
Daniel Greenfeld
c0f8839faf Merge pull request #324 from dbrgn/i18n-automation
i18n automation / updated and compiled all files from Transifex
2013-07-09 05:09:10 -07:00
Danilo Bargen
dba0b1b51c PEP8 2013-07-09 13:52:07 +02:00
Danilo Bargen
fd98d91614 Replaced shell script with fabfile 2013-07-09 13:51:24 +02:00
Danilo Bargen
bed88973d7 Compiled all messages. Ready for release. Fixes #314, refs #317 2013-07-09 12:22:36 +02:00
Danilo Bargen
783401415d Added updated translation files from transifex 2013-07-09 12:21:07 +02:00
Danilo Bargen
daa2623430 Push translations too when using pushtx 2013-07-09 12:20:56 +02:00
Danilo Bargen
4f70167f49 Added checkmessages command to i18n.sh 2013-07-09 12:08:26 +02:00
Danilo Bargen
d5a33da0a3 Added pulltx / pushtx to i18n.sh 2013-07-09 11:57:09 +02:00
Daniel Greenfeld
15c90a3388 Update AUTHORS.rst 2013-07-09 11:53:16 +02:00
Daniel Greenfeld
4b4b693ecb Merge pull request #323 from marekzelinka/develop
Fixed typo in themes docs
2013-07-09 02:52:31 -07:00
Danilo Bargen
4506613482 Fixed bug in .tx/config 2013-07-09 11:43:44 +02:00
Marek Zelinka
da4c86fd87 Fixed typo themes docs 2013-07-09 11:43:35 +02:00
Danilo Bargen
15f2d6a89e Remove .mo from .gitignore 2013-07-09 11:42:22 +02:00
Danilo Bargen
aeb8a84726 Pulled new translations 2013-07-09 11:34:40 +02:00
Danilo Bargen
bb33879e3b Added transifex-client configfile 2013-07-09 11:27:14 +02:00
Danilo Bargen
60f26b7748 Added i18n.sh script (refs #314) 2013-07-09 11:15:47 +02:00
Douglas Miranda
90342afba2 fixing the fixed height of .change_form in order to provide an "auto height" 2013-07-09 03:04:28 -04:00
d1ffuz0r
8def10b2da Fixed #292 added missing default columns and filters 2013-07-09 13:10:48 +07:00
Daniel Greenfeld
9b7560e720 Merge pull request #319 from dasm/develop
Updated AUTHORS
2013-07-08 11:26:39 -07:00
Dariusz Smigiel
df8334dfa4 Updated AUTHORS 2013-07-08 20:22:23 +02:00
Daniel Greenfeld
c6e077250e update release to 0.5.0 for #317 2013-07-08 19:28:04 +02:00
Daniel Greenfeld
da6ff9f3ce Tweaks to make #308 work 2013-07-08 19:14:19 +02:00
Daniel Greenfeld
a909ab1517 Merge of #308 2013-07-08 19:08:18 +02:00
Daniel Greenfeld
91117a8e58 Updated readme 2013-07-08 19:02:36 +02:00
Daniel Greenfeld
2ec6441de3 Merge pull request #309 from dbrgn/actions_on_top_bottom
Implemented actions_on_top and actions_on_bottom
2013-07-08 09:58:12 -07:00
Daniel Greenfeld
f2d1fbd24f Merge pull request #315 from dbrgn/iss314
Compiled messages for German and Slovak
2013-07-08 09:57:32 -07:00
Danilo Bargen
f178f2fccd Compiled messages for German and Slovak 2013-07-08 16:16:02 +02:00
Daniel Greenfeld
e68794def7 Merge pull request #313 from dbrgn/i18n-de-sk
Translations for German and Slovak
2013-07-08 04:33:54 -07:00
Danilo Bargen
8ef601e84d Fixed order of locale middleware 2013-07-08 11:02:47 +02:00
Danilo Bargen
5d736580a9 Updated AUTHORS 2013-07-08 10:58:07 +02:00
Danilo Bargen
ec0300fa32 Added translated locales for Slovak 2013-07-08 10:57:39 +02:00
Danilo Bargen
18fda874b0 Added translated locales for German 2013-07-08 10:54:32 +02:00
Danilo Bargen
84d8d424d0 Fixed tests 2013-07-07 23:06:57 +02:00
Eleonore9
3ca4fa394f for #308 this styles the save_on_top 2013-07-07 18:19:33 +02:00
Daniel Greenfeld
58dac69ee7 Merge pull request #310 from bootandy/ordering2
allow ordering by field by click in admin
2013-07-07 07:59:53 -07:00
Daniel Greenfeld
0b2efdb5f8 Fix the README 2013-07-07 16:53:07 +02:00
bootandy
06c2e81392 allow sort by field 2013-07-07 16:48:21 +02:00
Danilo Bargen
4977f269b5 Implemented actions_on_top and actions_on_bottom (fixes #267, #268) 2013-07-07 16:46:59 +02:00
Daniel Greenfeld
153137d4eb Fixed the installation documentation 2013-07-07 16:45:12 +02:00
Daniel Greenfeld
fff84a6bfe Update README.rst 2013-07-07 16:23:50 +02:00
Daniel Greenfeld
47df410c07 merge 2013-07-07 16:13:48 +02:00
Daniel Greenfeld
e2f6bb859e Add page_title link 2013-07-07 15:50:55 +02:00
Daniel Greenfeld
0052cd3a9a Change the save_on_bottom on the top of the update form to be save_on_top 2013-07-07 15:45:27 +02:00
Daniel Greenfeld
96cde5cc94 example admin2 file cleanup 2013-07-07 15:43:43 +02:00
Daniel Greenfeld
61ae3ec149 Repair the things that I just broke 2013-07-07 15:42:54 +02:00
Daniel Greenfeld
7b8b9afa96 merge 2013-07-07 15:39:59 +02:00
Daniel Greenfeld
152059528a Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-07 15:29:13 +02:00
Daniel Greenfeld
db63852846 Adding the latest 2013-07-07 15:24:57 +02:00
Daniel Greenfeld
d6d1fabf24 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-07 15:23:58 +02:00
Daniel Greenfeld
ec1c1f669a Release notes 2013-07-07 15:23:39 +02:00
Daniel Greenfeld
89e6cd8db0 Merge pull request #299 from dbrgn/iss287
Implemented custom value renderers
2013-07-07 06:21:14 -07:00
Daniel Greenfeld
c2b122fdac Merge pull request #301 from dbrgn/translators
Added translators to AUTHORS
2013-07-07 06:13:22 -07:00
Danilo Bargen
043787ea45 Fixed bug caused by rebase 2013-07-07 15:10:57 +02:00
Danilo Bargen
b2f4290bf2 Documentation 2013-07-07 15:08:42 +02:00
Danilo Bargen
6e42b9459d Blog example app tests 2013-07-07 15:08:41 +02:00
Danilo Bargen
2a8bab0170 Added renderer tests 2013-07-07 15:08:41 +02:00
Danilo Bargen
1b7382526f Automatically choose best renderer by default 2013-07-07 15:08:07 +02:00
Danilo Bargen
835992b8d0 Added number renderer 2013-07-07 15:08:07 +02:00
Danilo Bargen
5cd153736d Moved get_attr filter to utils 2013-07-07 15:08:07 +02:00
Danilo Bargen
78b063a586 Added sample configuration to example app 2013-07-07 15:08:07 +02:00
Danilo Bargen
121f5b8564 First renderer implementation 2013-07-07 15:07:06 +02:00
Danilo Bargen
2f22eecc1b Converted get_attr tag to filter 2013-07-07 15:07:06 +02:00
Danilo Bargen
77d4e00158 Added translators to AUTHORS 2013-07-07 15:05:42 +02:00
Daniel Greenfeld
506f58f705 This is DJANGO-ADMIN! fix #300 2013-07-07 14:19:23 +02:00
Daniel Greenfeld
35b1125429 fix #293 2013-07-07 12:10:50 +02:00
Daniel Greenfeld
a9c2d1d198 improved filter form styling 2013-07-07 11:59:45 +02:00
Daniel Greenfeld
4d5b170e10 merge 2013-07-07 11:48:56 +02:00
bootandy
e57f821ce1 fix string filters 2013-07-07 11:34:06 +02:00
Daniel Greenfeld
3dcb24e8e4 Merge pull request #294 from NotSqrt/i18n
I18n : improved internationalization 😁
2013-07-07 02:28:33 -07:00
NotSqrt
322a7793ed add locale source files for English 2013-07-07 11:14:13 +02:00
NotSqrt
40052d671d regenerate locales after change on buttons 2013-07-07 11:02:54 +02:00
NotSqrt
c132a7cdd0 more details on i18n 2013-07-07 11:00:49 +02:00
NotSqrt
8935395534 work on i18n : add comments for translators, french translation to check the result 2013-07-07 11:00:49 +02:00
Daniel Greenfeld
876cc2c723 for #268, this adds actions_on_bottom for the default view 2013-07-07 10:58:35 +02:00
Daniel Greenfeld
e66175ed21 Remove django-admin2 from the dashboard if it's not been activated 2013-07-07 10:42:55 +02:00
Daniel Greenfeld
ed23fbf09e adding coveralls install for #285 2013-07-07 10:11:19 +02:00
Daniel Greenfeld
ba2eb5b22d Update README.rst 2013-07-07 08:44:59 +02:00
Daniel Greenfeld
d4ca6ec59a Update AUTHORS.rst 2013-07-06 18:32:36 +02:00
Daniel Greenfeld
038313c81c merge 2013-07-06 18:33:44 +02:00
Daniel Greenfeld
4908a9675e Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 18:30:19 +02:00
Daniel Greenfeld
c007924df0 PEP-8 of filters 2013-07-06 18:28:05 +02:00
Daniel Greenfeld
9a8a836141 PEP-8 of filters 2013-07-06 18:26:29 +02:00
Daniel Greenfeld
12d19fc0ee Merge pull request #278 from ifosch/utils-tests-improvements
djadmin2.utils.model_options tested to adapt to model._meta changes
2013-07-06 09:26:00 -07:00
Daniel Greenfeld
1337c5fd49 Merge pull request #265 from dbrgn/translation-docs
Better translation docs
2013-07-06 09:25:29 -07:00
Daniel Greenfeld
b26766deeb Add Michal Kuffa to authors. 2013-07-06 18:24:10 +02:00
Daniel Greenfeld
115c7f9a09 Merge branch 'list_filter' of git://github.com/beezz/django-admin2 into beezz-list_filter 2013-07-06 17:59:21 +02:00
Michal Kuffa
261322e9a6 Added django-filters to requirements 2013-07-06 17:45:47 +02:00
Michal Kuffa
075f887837 Added basic test for list_filter feature 2013-07-06 17:39:36 +02:00
Michal Kuffa
229db4ff86 minor bugfix 2013-07-06 17:38:49 +02:00
Daniel Greenfeld
ac2ce6e647 fix indentation issues 2013-07-06 17:35:58 +02:00
Daniel Greenfeld
5b33fcde51 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 17:34:54 +02:00
Ignasi Fosch
07789f566f djadmin2.utils.model_options tested to adapt to model._meta changes 2013-07-06 17:34:01 +02:00
Daniel Greenfeld
16842e8e33 Merge pull request #275 from Eleonore9/for-pull-requests
code style changes
2013-07-06 08:14:43 -07:00
Eleonore9
2a462e6846 code style changes 2013-07-06 17:08:03 +02:00
Michal Kuffa
aefd7d8df0 Added simple test for presence of list_filter container 2013-07-06 16:48:42 +02:00
Michal Kuffa
04bb629a42 Removed unused imports 2013-07-06 16:47:52 +02:00
Michal Kuffa
0862210d4d Added id to list_filters container 2013-07-06 16:47:11 +02:00
Daniel Greenfeld
596af4a085 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 16:40:10 +02:00
Daniel Greenfeld
847d0ee78f Add an action_name context variable to model form views 2013-07-06 16:39:42 +02:00
Danilo Bargen
8ec6157215 Reference to gettext docs 2013-07-06 16:38:24 +02:00
Danilo Bargen
7f4b799b1b Added RTD link to README 2013-07-06 16:33:59 +02:00
Michal Kuffa
6bd314631b add docs to our custom widgets and default mapping, just to not formatting 2013-07-06 16:27:55 +02:00
Daniel Greenfeld
8c399fadf8 merge in stuff 2013-07-06 16:27:08 +02:00
Daniel Greenfeld
a1a94676a4 Update AUTHORS.rst 2013-07-06 16:26:45 +02:00
Daniel Greenfeld
2dcc816e29 Merge branch 'for-pull-requests' of git://github.com/Eleonore9/django-admin2 into Eleonore9-for-pull-requests 2013-07-06 16:22:23 +02:00
Michal Kuffa
d433013fcc Merge remote-tracking branch 'upstream/develop' into list_filter
Conflicts:
	djadmin2/views.py
2013-07-06 16:22:14 +02:00
Danilo Bargen
c5737331f0 Better translation docs 2013-07-06 16:21:44 +02:00
Daniel Greenfeld
3435331d60 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 16:21:10 +02:00
Daniel Greenfeld
03acbe0486 Merge branch 'template_rename2' of git://github.com/bootandy/django-admin2 into bootandy-template_rename2 2013-07-06 16:19:12 +02:00
Michal Kuffa
473ea98f98 Added list_filter attribute to contrib's admin, admin2 definition of Post, Comment model admin. 2013-07-06 16:09:03 +02:00
Michal Kuffa
4522e65ce6 Added list_filter block 2013-07-06 16:07:43 +02:00
Michal Kuffa
21e18f9adc Added djadmin2.filters module.
This module is handling list filter creation by inspecting the model of
supplied queryset. Contains default mapping for field type filters to
our custom form widgets that are rendering links instead of inputs.
2013-07-06 15:59:55 +02:00
bootandy
a8cf4554ad more example template admin2 reference to djadmin2 2013-07-06 15:56:46 +02:00
Daniel Greenfeld
b94143ca9d Merge pull request #262 from NotSqrt/i18n-doc
doc on internationalization 😳
2013-07-06 06:52:52 -07:00
Eleonore9
5b4dba559a Tests for example2/models.py 2013-07-06 15:48:42 +02:00
Michal Kuffa
d41a70143e build_list_filter method added to ModelListView. This method take care of ModelAdmin2.Meta.list_filter option 2013-07-06 15:47:09 +02:00
NotSqrt
61ce055e70 doc on internationalization 2013-07-06 15:43:56 +02:00
Daniel Greenfeld
819f8cd677 merge 2013-07-06 15:42:25 +02:00
Daniel Greenfeld
c141efbb45 Merge pull request #259 from dbrgn/translators
Added translators to AUTHORS 🔨
2013-07-06 06:40:40 -07:00
Danilo Bargen
09201f8fba Added translators to AUTHORS 2013-07-06 15:39:27 +02:00
Daniel Greenfeld
e7d4ef4fbc Merge pull request #258 from dbrgn/i18n
Translation Stuff
2013-07-06 06:34:11 -07:00
Danilo Bargen
673a3027dd Added Italian translation file 2013-07-06 15:27:19 +02:00
bootandy
9f449a6b66 moving templates to djadmin 2013-07-06 15:23:08 +02:00
Daniel Greenfeld
6af02f4489 Update AUTHORS.rst 2013-07-06 15:20:49 +02:00
Danilo Bargen
ee4dfb4ac6 Added Català translation 2013-07-06 15:19:22 +02:00
bootandy
1ef08cc20f first itteration 2013-07-06 15:18:01 +02:00
Daniel Greenfeld
4288b2568d Adding Andy Boot to authors
POW! 😉
2013-07-06 15:06:18 +02:00
Daniel Greenfeld
483386635d Slight tweak to the built-in-views 2013-07-06 15:06:27 +02:00
Daniel Greenfeld
f128b23643 Merge branch 'docs' of git://github.com/bootandy/django-admin2 into bootandy-docs 2013-07-06 15:02:35 +02:00
Danilo Bargen
3c44a8b930 Changed inconsistent use of "login/logout" 2013-07-06 15:02:33 +02:00
Daniel Greenfeld
32bcce562e Merge pull request #254 from ifosch/test-improvements
Actions test isolated
2013-07-06 05:56:50 -07:00
Danilo Bargen
2842699b71 Added German and Spanish translation files 2013-07-06 14:54:21 +02:00
Danilo Bargen
a6d407b887 Fixes in language files 2013-07-06 14:46:15 +02:00
bootandy
679a997f80 update docs - context variables 2013-07-06 14:40:49 +02:00
Ignasi Fosch
260cabcddf Actions tests included in runtest.py execution 2013-07-06 14:22:38 +02:00
Ignasi Fosch
550c6b684b Moving action tests to another file 2013-07-06 14:17:54 +02:00
Daniel Greenfeld
f61c6648ea Merge pull request #253 from dbrgn/rtd
Read the docs
2013-07-06 05:09:16 -07:00
Daniel Greenfeld
882da13585 Adding Henri Colas to the authors file 2013-07-06 14:07:30 +02:00
Danilo Bargen
a6276c6141 Fixed intersphinx objects reference for Django 2013-07-06 13:59:16 +02:00
Danilo Bargen
2282f9681d Get rid of all Sphinx warnings 2013-07-06 13:54:48 +02:00
Danilo Bargen
771af88877 Make django docs intersphinx work 2013-07-06 13:50:21 +02:00
NotSqrt
5889c5d849 i18n : fixes for tests -> use string interpolation, not positional interpolation 2013-07-06 13:33:52 +02:00
NotSqrt
187773979b add default english translation, add french translation 2013-07-06 13:33:52 +02:00
NotSqrt
5de843313b make the examples use i18n 2013-07-06 13:33:52 +02:00
NotSqrt
5ab4f33b6a check i18n completeness 2013-07-06 13:33:52 +02:00
Danilo Bargen
3feabdf938 Typo: :docs: should be :doc 2013-07-06 12:23:36 +02:00
Daniel Greenfeld
74573faf7a Update README.rst 2013-07-06 12:18:58 +02:00
Daniel Greenfeld
ecb5ea2bf9 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 12:21:21 +02:00
Daniel Greenfeld
7db738d469 friendlier way of handling django_extensions 2013-07-06 12:21:02 +02:00
Daniel Greenfeld
0f3cfed915 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 12:09:28 +02:00
Daniel Greenfeld
d407d804b0 Add coverage badge per #222 2013-07-06 12:09:13 +02:00
Daniel Greenfeld
dab5e36c10 Merge branch 'dbrgn-iss236' into develop 2013-07-06 12:09:13 +02:00
Daniel Greenfeld
cf77eb0ec5 Merge branch 'iss236' of git://github.com/dbrgn/django-admin2 into develop 2013-07-06 12:07:54 +02:00
Daniel Greenfeld
aa6d246fac Merge pull request #249 from dbrgn/coverage
Coverage
2013-07-06 03:07:21 -07:00
Danilo Bargen
8217789e11 Prepared travis.yml for coveralls 2013-07-06 11:57:57 +02:00
Danilo Bargen
142f33f2f6 Added .coveragerc 2013-07-06 11:56:29 +02:00
Daniel Greenfeld
fd6eec2a54 Adding Ignasi Fosch Alonso to Authors 2013-07-06 11:56:18 +02:00
Danilo Bargen
ce5566be82 Show verbose column name in list view (fixes #236) 2013-07-06 11:53:46 +02:00
Daniel Greenfeld
653dac411d Merge branch 'iss236' of git://github.com/dbrgn/django-admin2 into dbrgn-iss236 2013-07-06 11:52:48 +02:00
Daniel Greenfeld
4205660251 Merge pull request #246 from ifosch/test-improvements
djadmin2.actions.get_description test implemented
2013-07-06 02:43:54 -07:00
Daniel Greenfeld
fa94f81e7f Merge 2013-07-06 11:36:42 +02:00
Danilo Bargen
3e31974b39 Added model_attr_verbose_name template filter.
Renamed the model_field_verbose_name to model_attr_verbose_name in
order to handle both fields and methods.
2013-07-06 11:32:57 +02:00
Danilo Bargen
973996cfe0 Show verbose column name in list view (fixes #236) 2013-07-06 11:32:57 +02:00
Danilo Bargen
6331b94a81 Added model_method_verbose_name util function 2013-07-06 11:32:57 +02:00
Danilo Bargen
56b26fb190 Added new template filter: model_field_verbose_name 2013-07-06 11:32:57 +02:00
Daniel Greenfeld
3796d312e3 Add index links for permissions 2013-07-06 11:18:38 +02:00
Ignasi Fosch
7c6f6a7b4a djadmins.actions lines cut out to 80 characters long 2013-07-06 11:17:12 +02:00
Ignasi Fosch
793cec7828 djadmins.actions lines cut out to 80 characters long 2013-07-06 11:16:13 +02:00
Daniel Greenfeld
745f2750fa Add django-debug-toolbar to example2 2013-07-06 11:15:41 +02:00
Audrey Roy
1a860031ee Better example project home. Close #241. 2013-07-06 11:15:41 +02:00
Daniel Greenfeld
80aa636e82 Indexing actions 2013-07-06 11:15:41 +02:00
Daniel Greenfeld
7e96b27c5f Index test 2013-07-06 11:15:41 +02:00
Daniel Greenfeld
7e0a676ad9 fix #234, this adds formal install instructions to the docs and includes reorganization of the docs 2013-07-06 11:15:40 +02:00
Audrey Roy
f65d7e3722 Simpler way to pull upstream changes, with optional rebase for advanced git users. 2013-07-06 11:15:40 +02:00
Daniel Greenfeld
9fad9ff9d1 Add Danilo Bargen to authors 2013-07-06 11:15:40 +02:00
Danilo Bargen
4f904e73fd PEP8 2013-07-06 11:15:40 +02:00
Daniel Greenfeld
19e2bac445 Update AUTHORS.rst 2013-07-06 11:14:34 +02:00
Daniel Greenfeld
0fe07d4002 Merge branch 'better-example' of git://github.com/audreyr/django-admin2 into audreyr-better-example 2013-07-06 11:08:46 +02:00
Daniel Greenfeld
6589fef693 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 11:08:23 +02:00
Daniel Greenfeld
9e8efcd218 Add django-debug-toolbar to example2 2013-07-06 11:08:11 +02:00
Ignasi Fosch
1bea34ac1a djadmin2.actions.get_description test implemented 2013-07-06 11:00:03 +02:00
Audrey Roy
807b3776fb Better example project home. Close #241. 2013-07-06 10:57:00 +02:00
Audrey Roy
a5d03899a9 Merge pull request #239 from audreyr/fix-contributor-instructions
Simpler way to pull upstream changes, with optional rebase for advanced ...
2013-07-06 01:04:36 -07:00
Daniel Greenfeld
9492c8372a Indexing actions 2013-07-06 10:03:54 +02:00
Daniel Greenfeld
0de830abf9 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 09:59:01 +02:00
Daniel Greenfeld
2ef846a8fa Index test 2013-07-06 09:58:47 +02:00
Daniel Greenfeld
1d254c8cae Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-07-06 09:55:35 +02:00
Daniel Greenfeld
12579fdd0e fix #234, this adds formal install instructions to the docs and includes reorganization of the docs 2013-07-06 09:55:29 +02:00
Audrey Roy
c4120fa22a Simpler way to pull upstream changes, with optional rebase for advanced git users. 2013-07-06 09:55:06 +02:00
Daniel Greenfeld
da4cf6deb9 Add Danilo Bargen to authors 2013-07-06 09:53:24 +02:00
Daniel Greenfeld
a826c5e186 Merge pull request #238 from dbrgn/pep8
PEP8
2013-07-06 00:51:11 -07:00
Danilo Bargen
39aaacccb6 PEP8 2013-07-06 09:37:25 +02:00
Daniel Greenfeld
4aec1a3836 Update AUTHORS.rst 2013-07-06 08:13:51 +02:00
Daniel Greenfeld
033e0124cf Merge pull request #233 from chrisjones-brack3t/develop
Quick and dirty install/setup docs.
2013-07-05 22:59:27 -07:00
Chris Jones
433fb51b6a Add one more thing for rest framework 2013-07-05 17:06:07 -07:00
Chris Jones
1d037f27a2 Quick and dirty install/setup docs. 2013-07-05 13:59:46 -07:00
Daniel Greenfeld
ca93b5ea97 Update README.rst 2013-07-05 16:53:41 +02:00
Daniel Greenfeld
26a63473be Update README.rst 2013-07-05 16:53:04 +02:00
Daniel Greenfeld
1b798b66bb Update README.rst 2013-07-05 16:48:46 +02:00
Daniel Greenfeld
6de616daa5 Update README.rst 2013-07-05 16:48:35 +02:00
Daniel Greenfeld
136cac7cf7 comment 2013-07-05 12:06:09 +02:00
Daniel Greenfeld
b580ba7f41 work on prep for #220 2013-07-04 14:07:32 +02:00
Daniel Greenfeld
9d54ed1650 clean up TODO 2013-07-04 12:37:28 +02:00
Daniel Greenfeld
f469e8f25e Getting the built-in-views to load in autodoc 2013-07-04 12:35:39 +02:00
Daniel Greenfeld
24f67b9c07 improved line commands 2013-07-02 10:32:15 +02:00
Daniel Greenfeld
5037d0e2c9 Changing fancy to dandy 2013-07-02 10:26:21 +02:00
Daniel Greenfeld
e819e7df02 More for #20 2013-07-02 10:08:46 +02:00
Daniel Greenfeld
5cfae7a0bc TOC fixes 2013-07-02 10:06:29 +02:00
Daniel Greenfeld
2c2214415f Change static path for #220 per @jezdez's suggestion 2013-07-02 10:03:09 +02:00
Daniel Greenfeld
2f4c1aaf66 Theming instructions second draft 2013-07-01 11:48:28 +02:00
Daniel Greenfeld
8ce2c7eeab Work on the theming instructions 2013-07-01 11:39:43 +02:00
Daniel Greenfeld
00af2cfbac prep for release 0.4.0 2013-06-30 11:38:39 +02:00
Daniel Greenfeld
c036fd723f Update AUTHORS.rst 2013-06-28 19:30:49 +02:00
Daniel Greenfeld
670a3ece72 Merge pull request #219 from tomchristie/patch-1
Moar hyperlinking in the README
2013-06-28 10:30:05 -07:00
Daniel Greenfeld
2fc9a006a2 Fix setup.py to point at the correct URL. 2013-06-27 13:09:03 +02:00
Andrews Medina
1f0856b5d3 Merge branch 'develop' of https://github.com/twoscoops/django-admin2 into admin_view 2013-06-26 23:23:48 -03:00
Andrews Medina
bacf9b66cb implemented AdminView.get_view_kwargs method. 2013-06-26 23:22:52 -03:00
Daniel Greenfeld
761651e61a Merge pull request #217 from douglasmiranda/add-basic-login-style
add a basic style for login form
2013-06-25 05:26:38 -07:00
Douglas Miranda
1aa9a02957 add a basic style for login form 2013-06-24 23:49:55 -04:00
Daniel Greenfeld
ecaa2ebef0 Merge pull request #215 from esoergel/standardize_html
Standardize html
2013-06-24 10:15:28 -07:00
Ethan Soergel
b0ff9abf5f converted indentation to two spaces in templates 2013-06-24 11:25:42 -04:00
Ethan Soergel
8644fb02f9 added template best practices to contributing.rst 2013-06-24 11:24:23 -04:00
Daniel Greenfeld
0f56bde069 Adding a contributing document 2013-06-24 16:05:44 +02:00
Daniel Greenfeld
e458766d36 Adding a contributing document 2013-06-24 16:05:10 +02:00
Daniel Greenfeld
ead8ccdc26 Add @ryanbalfanz to the list of authors. 2013-06-24 10:50:02 +03:00
Daniel Greenfeld
f19b5dc0a0 Merge pull request #212 from RyanBalfanz/develop
#205; Added index, select user, and change user page screenshots
2013-06-24 00:48:21 -07:00
Ryan Balfanz
e7f0611eea #205; Added change user screenshot 2013-06-23 21:36:19 -07:00
Ryan Balfanz
2a0e08243f #205; Added select user screenshot 2013-06-23 21:36:03 -07:00
Ryan Balfanz
4dd9d61e2f #205; Added admin index screenshot 2013-06-23 21:35:39 -07:00
Andrews Medina
9ee3275fd0 setting attrname for AdminView default name. 2013-06-23 15:36:01 -03:00
Andrews Medina
4bf06dd6c2 migrating the views to be admin views.
generating the get_urls dynamically and
support permissions.
2013-06-23 02:52:58 -03:00
Andrews Medina
330cafa309 added name argument in AdminView. 2013-06-22 01:30:09 -03:00
Andrews Medina
39bf48ca20 refactored ModelAdminBase2. 2013-06-21 10:16:08 -03:00
Andrews Medina
b44c66e301 implemented ModelAdminBase2 metaclass. 2013-06-21 02:41:28 -03:00
Andrews Medina
7a0f29f2c6 added AdminView. 2013-06-21 00:05:23 -03:00
Daniel Greenfeld
6a6b3d5f79 Removing bad screen capture 2013-06-20 16:46:47 +02:00
Daniel Greenfeld
b166874c10 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-06-20 16:40:57 +02:00
Daniel Greenfeld
b22dc3407a Adding simple screen capture 2013-06-20 16:40:42 +02:00
Daniel Greenfeld
273a950500 Merge pull request #210 from douglasmiranda/add-info-on-authors
add info on AUTHORS
2013-06-19 03:17:02 -07:00
Daniel Greenfeld
6f12cb5e15 Merge pull request #209 from d1ffuz0r/fix_actions_doc
actions docs
2013-06-18 23:04:10 -07:00
Daniel Greenfeld
fb284542f9 Merge pull request #208 from douglasmiranda/fix-jquery-version
fix: issue #199 static jQuery version and add jQuery fallback
2013-06-18 23:02:25 -07:00
d1ffuz0r
b586bd007a fixed actions doc 2013-06-19 12:44:52 +07:00
Douglas Miranda
3b0d8f6910 add info on AUTHORS 2013-06-18 21:36:30 -04:00
Douglas Miranda
d008b3e842 fix: issue #199 static jQuery version and add jQuery fallback 2013-06-18 21:30:16 -04:00
Daniel Greenfeld
dedaadae5f Merge pull request #206 from esoergel/get_example_proj_to_work
minor: fix formatting in contributing.rst and added links to virtualenv and virtualenvwrapper
2013-06-18 10:36:17 -07:00
Ethan Soergel
7e86c1172e Merge branch 'develop' of https://github.com/twoscoops/django-admin2 into get_example_proj_to_work 2013-06-18 13:18:26 -04:00
Ethan Soergel
04ab4a1f4c fixed formatting in contributing.rst and added links to virtualenv and virtualenvwrapper 2013-06-18 13:18:04 -04:00
Daniel Greenfeld
381361b648 Add Ethan Soergel to authors 2013-06-18 18:19:37 +03:00
Daniel Greenfeld
bb3988b7b8 Merge pull request #204 from esoergel/get_example_proj_to_work
added instructions for getting the example projects running to the 'SETUP' section of contributing.rst
2013-06-18 08:18:07 -07:00
Ethan Soergel
d0bfca08af added instructions to run setup.py to contributing.rst 2013-06-18 11:02:14 -04:00
Tom Christie
90c62a33df Add hyperlinks for requirements 2013-06-18 13:46:17 +02:00
Ethan Soergel
5595b68fb5 extended 'SETUP' section of contributing.rst to include instructions for getting the example projects running 2013-06-18 02:16:54 -04:00
d1ffuz0r
256efa679e #154 changed fbc action views behavior to cbv. added breadcrumbs to actions with multiple items 2013-06-17 11:56:37 +07:00
Daniel Greenfeld
5c26287100 Merge pull request #201 from andrewsmedina/get_attr_tests
Added more tests for get_attr templatetag.
2013-06-13 00:33:56 -07:00
Andrews Medina
27544d5a51 Added more tests for get_attr templatetag. 2013-06-12 17:08:21 -03:00
Daniel Greenfeld
edcdb00fbd Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-06-11 21:54:58 +02:00
Daniel Greenfeld
48dd204738 Moar on actions 2013-06-11 21:48:52 +02:00
Daniel Greenfeld
ab31053e9d add douglas miranda to authors 2013-06-10 13:11:14 +03:00
Daniel Greenfeld
86d593a577 Merge pull request #197 from douglasmiranda/fix-navbar-breadcrumb
Fix navbar and breadcrumbs on the login page - issue #196
2013-06-10 03:08:39 -07:00
Douglas Miranda
2ccb399c11 fix navbar and breadcrumb on the login page - issue #196 2013-06-10 02:02:10 -04:00
Daniel Greenfeld
eefab2dec4 Add performance goal to docs 2013-06-09 20:21:35 +02:00
Daniel Greenfeld
8f2f9fa280 Merge pull request #193 from andrewsmedina/list_display_callables
Added support for callabels in list_display.
2013-06-07 01:49:08 -07:00
Daniel Greenfeld
edec446e30 Merge pull request #192 from andrewsmedina/ignoring_vim
ignoring vim swap files.
2013-06-07 01:47:54 -07:00
Daniel Greenfeld
5027b0772b Add Wade Austin / @waustin to authors 2013-06-07 11:12:16 +03:00
Daniel Greenfeld
56466a61bd Merge branch 'implement_search_fields' of git://github.com/waustin/django-admin2 into waustin-implement_search_fields 2013-06-07 10:08:49 +02:00
Andrews Medina
5974642840 Added support for callabels in list_display. 2013-06-07 00:07:24 -03:00
Andrews Medina
7d7be0b696 ignoring vim swap files. 2013-06-06 23:35:00 -03:00
Wade Austin
e199b13c3c search_fields test cases 2013-06-06 16:25:36 -05:00
Wade Austin
a5d728df66 Merge branch 'develop' of https://github.com/twoscoops/django-admin2 into implement_search_fields 2013-06-06 16:24:57 -05:00
Wade Austin
095bc1ad5d Override get_queryset in ModelListView to preform a search if needed
Added a get_search_results method to ModelListView based on the logic from django.contrib.admin.views.main.ChangeList
Added search_fields and search_term to the extra context data
2013-06-06 13:00:03 -05:00
Wade Austin
858d39e5f4 Added search_fields to admin and admin2 class for the example project 2013-06-06 12:51:44 -05:00
Wade Austin
2af4aed976 added lookup_needs_distinct from django.contrib.admin 2013-06-06 12:50:45 -05:00
Wade Austin
9ea725600f Add search form to model list template. Form is only displayed if search_fields is not None 2013-06-06 12:49:34 -05:00
Wade Austin
26eeaf14aa Add search_fields to MODEL_ADMIN_ATTRS 2013-06-06 12:48:36 -05:00
Gregor Müllegger
911dcb442a Moving create_extra_permissions to the more appropriate permissions module. 2013-06-06 10:29:10 +02:00
Gregor Müllegger
b88587f682 Adding test to check if view permissions have been created. 2013-06-06 10:29:10 +02:00
Daniel Greenfeld
5ae57ac541 Adding Andrews Medina to the authors list 2013-06-06 10:25:22 +02:00
Andrews Medina
7e58115e11 Added tests for example2 poll delete action. 2013-06-05 23:53:39 -03:00
Andrews Medina
8e4c155c33 Added tests for example2 poll delete view. 2013-06-05 23:50:53 -03:00
Andrews Medina
5ce79eee08 Added tests for example2 poll create view. 2013-06-05 23:48:04 -03:00
Andrews Medina
fde3814fdf Added tests for example2 poll detail view. 2013-06-05 22:58:50 -03:00
Andrews Medina
39df8267c4 Added tests for example2 poll list view. 2013-06-05 22:57:14 -03:00
Andrews Medina
25a9d72322 Added tests for example2 admin index. 2013-06-05 22:35:57 -03:00
Andrews Medina
d2d65bdb3f Merge branch 'develop' of git://github.com/twoscoops/django-admin2 into example2 2013-06-05 22:19:39 -03:00
Andrews Medina
af54f424ed Changed the example2 database name. 2013-06-05 22:19:07 -03:00
Andrews Medina
6d12d7d8e6 Added a home for example2. 2013-06-05 22:17:29 -03:00
Daniel Greenfeld
e6cb526df4 Adding @the5fire to authors. 2013-06-05 11:27:02 +02:00
Daniel Greenfeld
e9cfa3545f Merge pull request #187 from the5fire/fix-dist-no-staticfile
fixed MANIFEST.in without static resources configuration
2013-06-05 02:25:59 -07:00
allenhu
caee5ac214 fixed MANIFEST.in without static resources configuration 2013-06-05 14:47:43 +08:00
Daniel Greenfeld
bb32ae8bf2 Merge pull request #182 from gregmuellegger/issues/181
Fixes #181 -- Choices were not copied for Select widgets for floppified forms
2013-06-04 21:43:22 -07:00
Andrews Medina
b1c7089556 Enabling admin for example2. 2013-06-04 23:07:09 -03:00
Andrews Medina
de37dfb1f8 Fixed Poll was_published_recently. 2013-06-04 23:06:33 -03:00
Andrews Medina
320c6b6d4b Improved PollAdmin. 2013-06-04 22:59:15 -03:00
Andrews Medina
0fe407565d Added admin2 for polls. 2013-06-04 22:46:37 -03:00
Andrews Medina
305d9029fb Added Pool and Choice models for example2. 2013-06-04 22:22:21 -03:00
Andrews Medina
af2bd4d546 Added example2. 2013-06-04 22:10:59 -03:00
Gregor Müllegger
1a04f285ff Fixes #181 -- Choices were not copied for Select widgets for floppified forms. 2013-06-04 22:31:59 +02:00
Daniel Greenfeld
01361d214d Modify the contributing docs 2013-06-04 22:02:08 +02:00
Daniel Greenfeld
b9e178347b Modify the contributing docs 2013-06-04 22:00:49 +02:00
Daniel Greenfeld
806e032032 fixes #165 we now can control what gets displayed 2013-06-04 21:22:28 +02:00
Daniel Greenfeld
777e82672d more docs for #161 2013-06-04 20:30:41 +02:00
Daniel Greenfeld
87d38f0619 for #161 we now support both functions and classes for list actions 2013-06-04 20:18:45 +02:00
Daniel Greenfeld
aaad5636fa Got actions where we want them. #161 2013-06-04 19:24:09 +02:00
Daniel Greenfeld
2be7320425 more cleanup for #161, this includes some documentation 2013-06-04 19:16:25 +02:00
Daniel Greenfeld
1c503be2d8 correcting issue with action permissions #161 2013-06-04 19:12:21 +02:00
Daniel Greenfeld
4fb43db3e8 Merge branch 'develop' of github.com:twoscoops/django-admin2 into develop 2013-06-04 19:04:05 +02:00
Daniel Greenfeld
9d6cbe3094 Making permissions easier to manage 2013-06-04 19:03:40 +02:00
Daniel Greenfeld
39a4d01706 Test fixes 2013-06-04 11:35:47 +02:00
Daniel Greenfeld
90c5c20cb5 Update AUTHORS.rst 2013-06-04 11:35:22 +02:00
Daniel Greenfeld
b7feb5f284 Merge branch 'drop_down_fires_nothing_selected' of git://github.com/waustin/django-admin2 into waustin-drop_down_fires_nothing_selected 2013-06-04 11:21:07 +02:00
Wade Austin
4b8b8d8b47 Fix for Issue #178
If an action is selected and no objects are selected the message "Items must be selected in order to perform actions on them. No items have been changed." is displayed instead of the user being sent to Action confirmation screen.
2013-06-03 21:09:41 -05:00
Daniel Greenfeld
45855f9b50 German to English 😉 2013-06-03 23:30:48 +02:00
Daniel Greenfeld
5be8972dac Merge branch 'modellist-170' of git://github.com/ludw/django-admin2 into ludw-modellist-170 2013-06-03 23:26:42 +02:00
Audrey Roy
b3bb9dbf82 Merge pull request #177 from audreyr/develop
Merge in @paurosello's commit
2013-06-03 14:05:39 -07:00
Audrey Roy
938369ef50 Add @paurosello for fixing #173 (ending template blocks). 2013-06-03 22:57:40 +02:00
Audrey Roy
03d5ed03f5 Fix merge conflict. Remove extrajs block. 2013-06-03 22:51:15 +02:00
Daniel Greenfeld
bc3c67f375 Merge pull request #176 from audreyr/constants-to-settings-175
Rename constants module to settings
2013-06-03 13:46:16 -07:00
Audrey Roy
cc6e8467c4 Rename constants module to settings 2013-06-03 22:44:16 +02:00
paurosello
b0a8594990 Trying to fix issue #173.
Every block is finished with it's own name.
2013-06-03 22:28:41 +02:00
Daniel Greenfeld
d140086dd1 fixes #172 2013-06-03 20:46:17 +02:00
Ludvig Wadenstein
9c296ccff5 Updated tests 2013-06-02 21:09:04 +02:00
Ludvig Wadenstein
a802dfe8ae Replaced actions select with button dropdown. 2013-06-02 20:58:27 +02:00
Ludvig Wadenstein
574037acfe Chackbox column has apropriate width 2013-06-02 20:18:47 +02:00
Ludvig Wadenstein
c45a544a1d List row links to update or read page based on permissions 2013-06-02 20:17:04 +02:00
Daniel Greenfeld
4ac722add4 Customize the dashboard 2013-06-01 20:04:06 +02:00
Daniel Greenfeld
d52bc0fe15 Document actions 2013-06-01 19:23:15 +02:00
Daniel Greenfeld
c1bb642747 Enhancing documentation 2013-06-01 19:04:51 +02:00
Daniel Greenfeld
7827bf0003 fixes #159 and lays the ground for more things 2013-06-01 18:02:01 +02:00
Daniel Greenfeld
972968b5b1 Move towards internal consistency of URL name definitions 2013-06-01 13:48:53 +02:00
Daniel Greenfeld
26211ac3d2 Merge pull request #169 from audreyr/develop
Fix error on create from model update form.
2013-06-01 03:55:17 -07:00
Audrey Roy
d72d7e4deb Fix error on create from this form. 2013-06-01 12:54:15 +02:00
Audrey Roy
f2c8480a2f Merge pull request #167 from audreyr/develop
Document custom CSS better.
2013-06-01 03:36:36 -07:00
Audrey Roy
68c5f11b85 Document custom CSS better. 2013-06-01 12:35:49 +02:00
Daniel Greenfeld
4e2a45aab9 Merge pull request #164 from audreyr/edit-form-buttons-72
Add delete button to edit form as per issue #72.
2013-05-31 13:22:58 -07:00
Audrey Roy
b389af9bb9 Add delete button to edit form as per issue #72. 2013-05-31 22:21:04 +02:00
Daniel Greenfeld
4cb6f9fc3f Tweaks to the contributing documentation 2013-05-31 21:48:47 +02:00
Daniel Greenfeld
f822eedae9 merge 2013-05-31 17:41:20 +02:00
Daniel Greenfeld
83689f37d6 merge 2013-05-31 17:40:25 +02:00
Daniel Greenfeld
1195f38b84 More work on admin 2013-05-31 17:38:34 +02:00
Daniel Greenfeld
0da6f453b7 For #161, this removes the FBV and implements an easily extendible BaseListAction class 2013-05-31 16:47:25 +02:00
Daniel Greenfeld
1916f7cba4 Change list actions to be list_actions so their nature is more explicit 2013-05-31 15:37:55 +02:00
Gregor Müllegger
0690385b4c Fixes #160 -- Marking a few missed strings as translatable. 2013-05-31 15:37:43 +02:00
Daniel Greenfeld
6a9eb0b3b3 More accurate documentation for how we test merges 2013-05-31 11:42:00 +02:00
Daniel Greenfeld
3ee0bc5da2 Fix setup.py 2013-05-31 10:26:05 +02:00
287 changed files with 15476 additions and 2251 deletions

22
.coveragerc Normal file
View 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
View 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
View 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
View file

@ -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

View file

@ -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

View file

@ -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
View 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
View 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
View 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.

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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
View 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)

View file

@ -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
View 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"
)

View file

@ -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")

View 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)

View file

@ -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
View 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_

View file

@ -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/'

Binary file not shown.

View 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"

Binary file not shown.

View 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 ""

Binary file not shown.

View 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"

Binary file not shown.

View 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"

Binary file not shown.

View 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 ""

Binary file not shown.

View 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"

Binary file not shown.

View 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 ""

Binary file not shown.

View 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"

Binary file not shown.

View 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"

Binary file not shown.

View 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"

Binary file not shown.

View 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ť"

Binary file not shown.

View 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 "保存"

View 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',
},
),
]

View file

@ -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

View file

@ -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
View 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
View 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
View file

@ -0,0 +1,3 @@
from . import core
djadmin2_site = core.Admin2()

View file

@ -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

View file

@ -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

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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>

View file

@ -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 %}

View file

@ -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>

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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}

View file

@ -1,5 +0,0 @@
from test_admin2tags import *
from test_types import *
from test_utils import *
from test_views import *
from test_core import *

View 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',
},
),
]

View file

50
djadmin2/tests/models.py Normal file
View 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"

View file

@ -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 %}

View 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)

View file

@ -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')
)

View file

@ -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))

View file

@ -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))

View 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)

View file

@ -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

View file

@ -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"
)

View file

@ -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
View 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)

View file

View 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;
}
}

View file

@ -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();
});
});

View file

@ -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>');
});
});

View file

@ -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');
}
});

View file

@ -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;
}
}
}

View file

@ -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%);
}
}
}

View file

@ -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

Some files were not shown because too many files have changed in this diff Show more