Updated docs to reflect github move and 0.6.0 changes.
This commit is contained in:
parent
5e33375042
commit
2ecc133f03
3
INSTALL
3
INSTALL
|
@ -1,6 +1,7 @@
|
||||||
Thanks for downloading django-admin-tools.
|
Thanks for downloading django-admin-tools.
|
||||||
|
|
||||||
This application requires Python 2.4 or later and Django 1.1.0 or newer.
|
This application requires Python 2.7 or later and Django 1.7 or newer.
|
||||||
|
django-admin-tools is fully compatible with Python 3.
|
||||||
It is also recommended that you install the FeedParser module
|
It is also recommended that you install the FeedParser module
|
||||||
(http://www.feedparser.org/) if you want to use the feed dashboard module.
|
(http://www.feedparser.org/) if you want to use the feed dashboard module.
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,12 @@ Required settings
|
||||||
First make sure you have the ``django.core.context_processors.request``
|
First make sure you have the ``django.core.context_processors.request``
|
||||||
template context processor in your ``TEMPLATE_CONTEXT_PROCESSORS``.
|
template context processor in your ``TEMPLATE_CONTEXT_PROCESSORS``.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Starting from django 1.8, ``TEMPLATE_CONTEXT_PROCESSORS`` is deprecated,
|
||||||
|
you must add the request context processor in your ``TEMPLATES`` variable
|
||||||
|
instead, please refer to the
|
||||||
|
`relevant django documentation <https://docs.djangoproject.com/en/1.8/ref/templates/upgrading/>`_.
|
||||||
|
|
||||||
Then, add the django-admin-tools modules to the ``INSTALLED_APPS`` like
|
Then, add the django-admin-tools modules to the ``INSTALLED_APPS`` like
|
||||||
this::
|
this::
|
||||||
|
|
||||||
|
@ -69,13 +75,7 @@ Setting up the database
|
||||||
|
|
||||||
To set up the tables that django-admin-tools uses you'll need to type::
|
To set up the tables that django-admin-tools uses you'll need to type::
|
||||||
|
|
||||||
python manage.py syncdb
|
python manage.py migrate
|
||||||
|
|
||||||
django-admin-tools supports `South <http://south.aeracode.org>`_, so if you
|
|
||||||
have South installed, make sure you run the following commands::
|
|
||||||
|
|
||||||
python manage.py migrate admin_tools.dashboard
|
|
||||||
python manage.py migrate admin_tools.menu
|
|
||||||
|
|
||||||
Adding django-admin-tools to your urls.py file
|
Adding django-admin-tools to your urls.py file
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -4,19 +4,17 @@ Contributing to django-admin-tools
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
You are very welcome to contribute to the project! django-admin-tools is
|
You are very welcome to contribute to the project! django-admin-tools is
|
||||||
hosted at `Bitbucket <http://www.bitbucket.org/izi/django-admin-tools/>`_,
|
on `Github <https://github.com/django-admin-tools/django-admin-tools>`_,
|
||||||
which makes collaborating very easy.
|
which makes collaborating very easy.
|
||||||
|
|
||||||
There are various possibilities to get involved, for example you can:
|
There are various possibilities to get involved, for example you can:
|
||||||
|
|
||||||
* `Report bugs <http://www.bitbucket.org/izi/django-admin-tools/issues/new/>`_,
|
* `Report bugs <https://github.com/django-admin-tools/django-admin-tools/issues/new>`_,
|
||||||
preferably with patches if you can
|
preferably with patches if you can
|
||||||
* `Discuss new features ideas
|
* `Discuss new features ideas
|
||||||
<http://groups.google.fr/group/django-admin-tools>`_
|
<http://groups.google.fr/group/django-admin-tools>`_
|
||||||
* `fork the project <http://www.bitbucket.org/izi/django-admin-tools/fork/>`_,
|
* Fork the project, implement those features and send a pull request
|
||||||
implement those features and send a pull request
|
* Enhance the `documentation <http://django-admin-tools.readthedocs.org/en/latest/>`_
|
||||||
* Enhance the `documentation
|
|
||||||
<http://www.bitbucket.org/izi/django-admin-tools/src/tip/docs/>`_
|
|
||||||
* `Translate django-admin-tools
|
* `Translate django-admin-tools
|
||||||
<https://www.transifex.net/projects/p/django-admin-tools/c/admin_tools/>`_
|
<https://www.transifex.net/projects/p/django-admin-tools/c/admin_tools/>`_
|
||||||
in your language
|
in your language
|
||||||
|
|
|
@ -8,7 +8,13 @@ Requirements
|
||||||
|
|
||||||
Before installing django-admin-tools, you'll need to have a copy of
|
Before installing django-admin-tools, you'll need to have a copy of
|
||||||
`Django <http://www.djangoproject.com>`_ already installed. For the
|
`Django <http://www.djangoproject.com>`_ already installed. For the
|
||||||
|version| release, Django 1.3 or newer is required.
|
|version| release, Django 1.7 or newer is required.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
*Important note to users of django 1.6 or below:*
|
||||||
|
starting from 0.6.0, django-admin-tools is *NOT* compatible with
|
||||||
|
django <= 1.6. If you want, you can still use the 0.5.2 version
|
||||||
|
that will always be available on Pypi.
|
||||||
|
|
||||||
For further information, consult the `Django download page
|
For further information, consult the `Django download page
|
||||||
<http://www.djangoproject.com/download/>`_, which offers convenient
|
<http://www.djangoproject.com/download/>`_, which offers convenient
|
||||||
|
@ -95,19 +101,17 @@ installation script. From a command line in that directory, type::
|
||||||
privileges (e.g., ``sudo python setup.py install``).
|
privileges (e.g., ``sudo python setup.py install``).
|
||||||
|
|
||||||
|
|
||||||
Manual installation from a Mercurial checkout
|
Manual installation from a git checkout
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
If you'd like to try out the latest in-development code, you can
|
If you'd like to try out the latest in-development code, you can
|
||||||
obtain it from the django-admin-tools repository, which is hosted at
|
obtain it from the django-admin-tools repository, which is hosted on
|
||||||
`Bitbucket <http://bitbucket.org/>`_ and uses `Mercurial
|
`Github <https://github.com/django-admin-tools/django-admin-tools>`_.
|
||||||
<http://www.selenic.com/mercurial/wiki/>`_ for version control. To
|
To obtain the latest code and documentation, you'll need to have
|
||||||
obtain the latest code and documentation, you'll need to have
|
Git installed, at which point you can type::
|
||||||
Mercurial installed, at which point you can type::
|
|
||||||
|
|
||||||
hg clone http://bitbucket.org/izi/django-admin-tools/
|
git clone https://github.com/django-admin-tools/django-admin-tools.git
|
||||||
|
|
||||||
This will create a copy of the django-admin-tools Mercurial repository
|
This will create a copy of the django-admin-tools Git repository on your
|
||||||
on your computer; you can then add the ``django-admin-tools`` directory
|
computer; you can then add the ``django-admin-tools`` directory to your
|
||||||
to your Python import path, or use the ``setup.py`` script to install
|
Python import path, or use the ``setup.py`` script to install as a package.
|
||||||
as a package.
|
|
||||||
|
|
|
@ -8,17 +8,10 @@ Introduction
|
||||||
|
|
||||||
Django supports custom admin sites, and of course you can have as many
|
Django supports custom admin sites, and of course you can have as many
|
||||||
admin sites as you want, django-admin-tools provides basic support for
|
admin sites as you want, django-admin-tools provides basic support for
|
||||||
this, you can setup a custom dashboard for each admin site.
|
this, you can setup a custom dashboard or menu for each admin site.
|
||||||
|
|
||||||
.. note::
|
Setting up a different dashboard and menu for each admin site instance
|
||||||
Multiple admin site support in django-admin-tools is, at the moment,
|
----------------------------------------------------------------------
|
||||||
limited to dashboards. This means you cannot have different menus or
|
|
||||||
theming for each instance of admin sites. This will change in the near
|
|
||||||
near future though.
|
|
||||||
|
|
||||||
|
|
||||||
Setting up a different dashboard for each admin site instance
|
|
||||||
-------------------------------------------------------------
|
|
||||||
|
|
||||||
In the following example we will assume that you have two admin site
|
In the following example we will assume that you have two admin site
|
||||||
instances: the default django admin site and a custom admin site of your
|
instances: the default django admin site and a custom admin site of your
|
||||||
|
@ -51,3 +44,16 @@ settings file::
|
||||||
|
|
||||||
Note that the same applies for the ``ADMIN_TOOLS_APP_INDEX_DASHBOARD``
|
Note that the same applies for the ``ADMIN_TOOLS_APP_INDEX_DASHBOARD``
|
||||||
settings variable.
|
settings variable.
|
||||||
|
|
||||||
|
Finally do the same thing for menu::
|
||||||
|
|
||||||
|
python manage.py custommenu django_admin_menu.py
|
||||||
|
python manage.py custommenu my_admin_menu.py
|
||||||
|
|
||||||
|
And to tell django-admin-tools to use your custom menu depending on
|
||||||
|
the admin site being used::
|
||||||
|
|
||||||
|
ADMIN_TOOLS_MENU = {
|
||||||
|
'django.contrib.admin.site': 'yourproject.django_admin_menu.CustomMenu',
|
||||||
|
'yourproject.admin.admin_site': 'yourproject.my_admin_menu.CustomMenu',
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,13 @@ Quick start guide
|
||||||
|
|
||||||
Before installing django-admin-tools, you'll need to have a copy of
|
Before installing django-admin-tools, you'll need to have a copy of
|
||||||
`Django <http://www.djangoproject.com>`_ already installed. For the
|
`Django <http://www.djangoproject.com>`_ already installed. For the
|
||||||
|version| release, Django 1.3 or newer is required.
|
|version| release, Django 1.7 or newer is required.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
*Important note to users of django 1.6 or below:*
|
||||||
|
starting from 0.6.0, django-admin-tools is *NOT* compatible with
|
||||||
|
django <= 1.6. If you want, you can still use the 0.5.2 version
|
||||||
|
that will always be available on Pypi.
|
||||||
|
|
||||||
|
|
||||||
Installing django-admin-tools
|
Installing django-admin-tools
|
||||||
|
@ -54,6 +60,12 @@ Configuration
|
||||||
First make sure you have the ``django.core.context_processors.request``
|
First make sure you have the ``django.core.context_processors.request``
|
||||||
template context processor in your ``TEMPLATE_CONTEXT_PROCESSORS``.
|
template context processor in your ``TEMPLATE_CONTEXT_PROCESSORS``.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Starting from django 1.8, ``TEMPLATE_CONTEXT_PROCESSORS`` is deprecated,
|
||||||
|
you must add the request context processor in your ``TEMPLATES`` variable
|
||||||
|
instead, please refer to the
|
||||||
|
`relevant django documentation <https://docs.djangoproject.com/en/1.8/ref/templates/upgrading/>`_.
|
||||||
|
|
||||||
Then, add admin_tools and its modules to the ``INSTALLED_APPS`` like this::
|
Then, add admin_tools and its modules to the ``INSTALLED_APPS`` like this::
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
|
@ -82,12 +94,7 @@ Then, just add django-admin-tools to your urls.py file::
|
||||||
|
|
||||||
Finally simply run::
|
Finally simply run::
|
||||||
|
|
||||||
python manage.py syncdb
|
python manage.py migrate
|
||||||
|
|
||||||
If you have South installed, make sure you run the following commands::
|
|
||||||
|
|
||||||
python manage.py migrate admin_tools.dashboard
|
|
||||||
python manage.py migrate admin_tools.menu
|
|
||||||
|
|
||||||
Testing your new shiny admin interface
|
Testing your new shiny admin interface
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -99,4 +106,3 @@ changed.
|
||||||
django-admin-tools is fully customizable, but this is out of the scope of
|
django-admin-tools is fully customizable, but this is out of the scope of
|
||||||
this quickstart. To learn how to customize django-admin-tools modules
|
this quickstart. To learn how to customize django-admin-tools modules
|
||||||
please read :ref:`the customization section<customization>`.
|
please read :ref:`the customization section<customization>`.
|
||||||
|
|
||||||
|
|
|
@ -7,28 +7,14 @@ This is information for developers of django-admin-tools itself.
|
||||||
|
|
||||||
Running tests
|
Running tests
|
||||||
-------------
|
-------------
|
||||||
Run the `runtests.sh` script which is situated at the root dir of
|
|
||||||
django-admin-tools project.
|
|
||||||
|
|
||||||
Run all tests::
|
First, cd the test_proj directory::
|
||||||
|
|
||||||
$ ./runtests.sh
|
$ cd test_proj
|
||||||
|
|
||||||
Run only unit tests::
|
And to run the tests, just type::
|
||||||
|
|
||||||
$ ./runtests.sh unit
|
$ python manage.py test
|
||||||
|
|
||||||
Run only tests for specified app::
|
|
||||||
|
|
||||||
$ ./runtests.sh dashboard
|
|
||||||
|
|
||||||
Run only one test case::
|
|
||||||
|
|
||||||
$ ./runtests.sh dashboard.ManagementCommandTest
|
|
||||||
|
|
||||||
Run only one test::
|
|
||||||
|
|
||||||
$ ./runtests.sh dashboard.ManagementCommandTest.test_customdashboard
|
|
||||||
|
|
||||||
|
|
||||||
Code coverage report
|
Code coverage report
|
||||||
|
|
Loading…
Reference in New Issue