From 2408feb4b10c745795854edc4d457a1d1f661884 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sat, 17 Jan 2015 23:46:31 +0100 Subject: [PATCH] restructure generated code documentation --- LICENSE.txt | 2 +- README.rst | 54 --------- docs/code.rst | 235 ++---------------------------------- docs/code/dashboard.rst | 22 ++++ docs/code/domains.rst | 16 +++ docs/code/gnuviechadmin.rst | 55 +++++++++ docs/code/gvacommon.rst | 15 +++ docs/code/managemails.rst | 18 +++ docs/code/mysqltasks.rst | 17 +++ docs/code/osusers.rst | 45 +++++++ docs/code/pgsqltasks.rst | 17 +++ docs/code/taskresults.rst | 24 ++++ docs/code/userdbs.rst | 30 +++++ docs/index.rst | 10 ++ docs/install.rst | 47 +++++++- 15 files changed, 326 insertions(+), 281 deletions(-) create mode 100644 docs/code/dashboard.rst create mode 100644 docs/code/domains.rst create mode 100644 docs/code/gnuviechadmin.rst create mode 100644 docs/code/gvacommon.rst create mode 100644 docs/code/managemails.rst create mode 100644 docs/code/mysqltasks.rst create mode 100644 docs/code/osusers.rst create mode 100644 docs/code/pgsqltasks.rst create mode 100644 docs/code/taskresults.rst create mode 100644 docs/code/userdbs.rst diff --git a/LICENSE.txt b/LICENSE.txt index 9db1259..268230d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2014 Jan Dittberner. +Copyright (c) 2014, 2015 Jan Dittberner. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/README.rst b/README.rst index 5667ad8..3d0de85 100644 --- a/README.rst +++ b/README.rst @@ -3,57 +3,3 @@ gnuviechadmin ============= Customer center for gnuviech servers. - -To use this project follow these steps: - -#. Create your working environment -#. Install Django -#. Create the new project using the django-two-scoops template -#. Install additional dependencies -#. Use the Django admin to create the project - -Working Environment -=================== - -You have several options in setting up your working environment. We recommend -using virtualenv to separate the dependencies of your project from your -system's python environment. If on Linux or Mac OS X, you can also use -virtualenvwrapper to help manage multiple virtualenvs across different -projects. - -Virtualenv Only ---------------- - -First, make sure you are using virtualenv (http://www.virtualenv.org). Once -that's installed, create your virtualenv:: - - $ virtualenv --distribute gnuviechadmin - -You will also need to ensure that the virtualenv has the project directory -added to the path. Adding the project directory will allow `django-admin.py` to -be able to change settings using the `--settings` flag. - -Virtualenv with virtualenvwrapper ------------------------------------- - -In Linux and Mac OSX, you can install virtualenvwrapper -(http://virtualenvwrapper.readthedocs.org/en/latest/), which will take care of -managing your virtual environments and adding the project path to the -`site-directory` for you:: - - $ mkdir gnuviechadmin - $ mkvirtualenv -a gnuviechadmin gnuviechadmin-dev - $ cd gnuviechadmin && add2virtualenv `pwd` - -Installation of Dependencies -============================= - -Depending on where you are installing dependencies: - -In development:: - - $ pip install -r requirements/local.txt - -For production:: - - $ pip install -r requirements.txt diff --git a/docs/code.rst b/docs/code.rst index 8cc0a03..22944fe 100644 --- a/docs/code.rst +++ b/docs/code.rst @@ -10,226 +10,15 @@ administrators and customers. .. _Django: https://www.djangoproject.com/ -The project module :py:mod:`gnuviechadmin` -========================================== - -.. automodule:: gnuviechadmin - - -:py:mod:`celery ` ---------------------------------------- - -.. automodule:: gnuviechadmin.celery - :members: - - -:py:mod:`urls ` ------------------------------------ - -.. automodule:: gnuviechadmin.urls - - -:py:mod:`wsgi ` ------------------------------------ - -.. automodule:: gnuviechadmin.wsgi - :members: - - -:py:mod:`settings ` -------------------------------------------- - -.. automodule:: gnuviechadmin.settings - - -:py:mod:`base ` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: gnuviechadmin.settings.base - :members: - - -:py:mod:`local ` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: gnuviechadmin.settings.local - - -:py:mod:`production ` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: gnuviechadmin.settings.production - - -:py:mod:`test ` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: gnuviechadmin.settings.test - - -:py:mod:`gvacommon` -=================== - -This module is imported from a separate git project via git subtree and -provides some functionality that is common to all gnuviechadmin subprojects. - -.. automodule:: gvacommon - - -:py:mod:`celeryrouters ` -------------------------------------------------- - -.. automodule:: gvacommon.celeryrouters - :members: - :undoc-members: - - -:py:mod:`managemails` app -========================= - -.. automodule:: managemails - - -:py:mod:`admin ` ------------------------------------ - -.. automodule:: managemails.admin - :members: - - -:py:mod:`models ` -------------------------------------- - -.. automodule:: managemails.models - :members: - - -:py:mod:`mysqltasks` app -======================== - -.. automodule:: mysqltasks - - -:py:mod:`tasks ` ----------------------------------- - -.. automodule:: mysqltasks.tasks - :members: - -.. autotask:: mysqltasks.tasks.create_mysql_database -.. autotask:: mysqltasks.tasks.create_mysql_user -.. autotask:: mysqltasks.tasks.delete_mysql_database -.. autotask:: mysqltasks.tasks.delete_mysql_user -.. autotask:: mysqltasks.tasks.set_mysql_userpassword - - -:py:mod:`osusers` app -===================== - -.. automodule:: osusers - - -:py:mod:`admin ` -------------------------------- - -.. automodule:: osusers.admin - :members: - - -:py:mod:`apps ` ------------------------------ - -.. automodule:: osusers.apps - :members: - - -:py:mod:`models ` ---------------------------------- - -.. automodule:: osusers.models - :members: - - -:py:mod:`tasks ` -------------------------------- - -.. automodule:: osusers.tasks - -.. autotask:: osusers.tasks.add_ldap_user_to_group -.. autotask:: osusers.tasks.create_file_mailbox -.. autotask:: osusers.tasks.create_ldap_group -.. autotask:: osusers.tasks.create_ldap_user -.. autotask:: osusers.tasks.delete_file_mail_userdir -.. autotask:: osusers.tasks.delete_file_mailbox -.. autotask:: osusers.tasks.delete_file_sftp_userdir -.. autotask:: osusers.tasks.delete_ldap_group -.. autotask:: osusers.tasks.delete_ldap_group_if_empty -.. autotask:: osusers.tasks.delete_ldap_user -.. autotask:: osusers.tasks.remove_ldap_user_from_group -.. autotask:: osusers.tasks.setup_file_mail_userdir -.. autotask:: osusers.tasks.setup_file_sftp_userdir - - -:py:mod:`pgsqltasks` app -======================== - -.. automodule:: pgsqltasks - :members: - - -:py:mod:`tasks ` ----------------------------------- - -.. automodule:: pgsqltasks.tasks - -.. autotask:: pgsqltasks.tasks.create_pgsql_database -.. autotask:: pgsqltasks.tasks.create_pgsql_user -.. autotask:: pgsqltasks.tasks.delete_pgsql_database -.. autotask:: pgsqltasks.tasks.delete_pgsql_user -.. autotask:: pgsqltasks.tasks.set_pgsql_userpassword - - -:py:mod:`taskresults` app -========================= - -.. automodule:: taskresults - -:py:mod:`admin ` ------------------------------------ - -.. automodule:: taskresults.admin - -:py:mod:`management.commands ` ---------------------------------------------------------------- - -.. automodule:: taskresults.management.commands - -:py:mod:`fetch_taskresults ` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: taskresults.management.commands.fetch_taskresults - -:py:mod:`models ` -------------------------------------- - -.. automodule:: taskresults.models - - -:py:mod:`userdbs` app -===================== - -.. automodule:: userdbs - - -:py:mod:`admin ` -------------------------------- - -.. automodule:: userdbs.admin - :members: - - -:py:mod:`models ` ---------------------------------- - -.. automodule:: userdbs.models - :members: +.. toctree:: + + code/gnuviechadmin + code/gvacommon + code/dashboard + code/domains + code/managemails + code/mysqltasks + code/osusers + code/pgsqltasks + code/taskresults + code/userdbs diff --git a/docs/code/dashboard.rst b/docs/code/dashboard.rst new file mode 100644 index 0000000..2f4666e --- /dev/null +++ b/docs/code/dashboard.rst @@ -0,0 +1,22 @@ +:py:mod:`dashboard` app +======================= + +.. automodule:: dashboard + + +:py:mod:`models ` +----------------------------------- + +.. automodule:: dashboard.models + + +:py:mod:`urls ` +------------------------------- + +.. automodule:: dashboard.urls + + +:py:mod:`views ` +--------------------------------- + +.. automodule:: dashboard.views diff --git a/docs/code/domains.rst b/docs/code/domains.rst new file mode 100644 index 0000000..dcba5f5 --- /dev/null +++ b/docs/code/domains.rst @@ -0,0 +1,16 @@ +:py:mod:`domains` app +===================== + +.. automodule:: domains + + +:py:mod:`admin ` +------------------------------- + +.. automodule:: domains.admin + + +:py:mod:`models ` +--------------------------------- + +.. automodule:: domains.models diff --git a/docs/code/gnuviechadmin.rst b/docs/code/gnuviechadmin.rst new file mode 100644 index 0000000..8d72812 --- /dev/null +++ b/docs/code/gnuviechadmin.rst @@ -0,0 +1,55 @@ +The project module :py:mod:`gnuviechadmin` +========================================== + +.. automodule:: gnuviechadmin + + +:py:mod:`celery ` +--------------------------------------- + +.. automodule:: gnuviechadmin.celery + :members: + + +:py:mod:`urls ` +----------------------------------- + +.. automodule:: gnuviechadmin.urls + + +:py:mod:`wsgi ` +----------------------------------- + +.. automodule:: gnuviechadmin.wsgi + :members: + + +:py:mod:`settings ` +------------------------------------------- + +.. automodule:: gnuviechadmin.settings + + +:py:mod:`base ` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: gnuviechadmin.settings.base + :members: + + +:py:mod:`local ` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: gnuviechadmin.settings.local + + +:py:mod:`production ` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: gnuviechadmin.settings.production + + +:py:mod:`test ` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: gnuviechadmin.settings.test diff --git a/docs/code/gvacommon.rst b/docs/code/gvacommon.rst new file mode 100644 index 0000000..4dbc502 --- /dev/null +++ b/docs/code/gvacommon.rst @@ -0,0 +1,15 @@ +:py:mod:`gvacommon` +=================== + +This module is imported from a separate git project via git subtree and +provides some functionality that is common to all gnuviechadmin subprojects. + +.. automodule:: gvacommon + + +:py:mod:`celeryrouters ` +------------------------------------------------- + +.. automodule:: gvacommon.celeryrouters + :members: + :undoc-members: diff --git a/docs/code/managemails.rst b/docs/code/managemails.rst new file mode 100644 index 0000000..fef6faf --- /dev/null +++ b/docs/code/managemails.rst @@ -0,0 +1,18 @@ +:py:mod:`managemails` app +========================= + +.. automodule:: managemails + + +:py:mod:`admin ` +----------------------------------- + +.. automodule:: managemails.admin + :members: + + +:py:mod:`models ` +------------------------------------- + +.. automodule:: managemails.models + :members: diff --git a/docs/code/mysqltasks.rst b/docs/code/mysqltasks.rst new file mode 100644 index 0000000..80e31ed --- /dev/null +++ b/docs/code/mysqltasks.rst @@ -0,0 +1,17 @@ +:py:mod:`mysqltasks` app +======================== + +.. automodule:: mysqltasks + + +:py:mod:`tasks ` +---------------------------------- + +.. automodule:: mysqltasks.tasks + :members: + +.. autotask:: mysqltasks.tasks.create_mysql_database +.. autotask:: mysqltasks.tasks.create_mysql_user +.. autotask:: mysqltasks.tasks.delete_mysql_database +.. autotask:: mysqltasks.tasks.delete_mysql_user +.. autotask:: mysqltasks.tasks.set_mysql_userpassword diff --git a/docs/code/osusers.rst b/docs/code/osusers.rst new file mode 100644 index 0000000..caa8d05 --- /dev/null +++ b/docs/code/osusers.rst @@ -0,0 +1,45 @@ +:py:mod:`osusers` app +===================== + +.. automodule:: osusers + + +:py:mod:`admin ` +------------------------------- + +.. automodule:: osusers.admin + :members: + + +:py:mod:`apps ` +----------------------------- + +.. automodule:: osusers.apps + :members: + + +:py:mod:`models ` +--------------------------------- + +.. automodule:: osusers.models + :members: + + +:py:mod:`tasks ` +------------------------------- + +.. automodule:: osusers.tasks + +.. autotask:: osusers.tasks.add_ldap_user_to_group +.. autotask:: osusers.tasks.create_file_mailbox +.. autotask:: osusers.tasks.create_ldap_group +.. autotask:: osusers.tasks.create_ldap_user +.. autotask:: osusers.tasks.delete_file_mail_userdir +.. autotask:: osusers.tasks.delete_file_mailbox +.. autotask:: osusers.tasks.delete_file_sftp_userdir +.. autotask:: osusers.tasks.delete_ldap_group +.. autotask:: osusers.tasks.delete_ldap_group_if_empty +.. autotask:: osusers.tasks.delete_ldap_user +.. autotask:: osusers.tasks.remove_ldap_user_from_group +.. autotask:: osusers.tasks.setup_file_mail_userdir +.. autotask:: osusers.tasks.setup_file_sftp_userdir diff --git a/docs/code/pgsqltasks.rst b/docs/code/pgsqltasks.rst new file mode 100644 index 0000000..3003498 --- /dev/null +++ b/docs/code/pgsqltasks.rst @@ -0,0 +1,17 @@ +:py:mod:`pgsqltasks` app +======================== + +.. automodule:: pgsqltasks + :members: + + +:py:mod:`tasks ` +---------------------------------- + +.. automodule:: pgsqltasks.tasks + +.. autotask:: pgsqltasks.tasks.create_pgsql_database +.. autotask:: pgsqltasks.tasks.create_pgsql_user +.. autotask:: pgsqltasks.tasks.delete_pgsql_database +.. autotask:: pgsqltasks.tasks.delete_pgsql_user +.. autotask:: pgsqltasks.tasks.set_pgsql_userpassword diff --git a/docs/code/taskresults.rst b/docs/code/taskresults.rst new file mode 100644 index 0000000..9fb6c82 --- /dev/null +++ b/docs/code/taskresults.rst @@ -0,0 +1,24 @@ +:py:mod:`taskresults` app +========================= + +.. automodule:: taskresults + +:py:mod:`admin ` +----------------------------------- + +.. automodule:: taskresults.admin + +:py:mod:`management.commands ` +--------------------------------------------------------------- + +.. automodule:: taskresults.management.commands + +:py:mod:`fetch_taskresults ` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: taskresults.management.commands.fetch_taskresults + +:py:mod:`models ` +------------------------------------- + +.. automodule:: taskresults.models diff --git a/docs/code/userdbs.rst b/docs/code/userdbs.rst new file mode 100644 index 0000000..7856a9d --- /dev/null +++ b/docs/code/userdbs.rst @@ -0,0 +1,30 @@ +:py:mod:`userdbs` app +===================== + +.. automodule:: userdbs + + +:py:mod:`admin ` +------------------------------- + +.. automodule:: userdbs.admin + :members: + + +:py:mod:`apps ` +----------------------------- + +.. automodule:: userdbs.apps + + +:py:mod:`models ` +--------------------------------- + +.. automodule:: userdbs.models + :members: + + +:py:mod:`views ` +------------------------------- + +.. automodule:: userdbs.views diff --git a/docs/index.rst b/docs/index.rst index 3f1d47e..d2cd6fd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,6 +3,16 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. +.. include:: ../README.rst + +License +======= + +gnuviechadmin is licensed under the terms of the MIT license: + +.. include:: ../LICENSE.txt + :literal: + Welcome to gnuviechadmin's documentation! ========================================= diff --git a/docs/install.rst b/docs/install.rst index 1bc0333..9e08482 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -1,4 +1,45 @@ -Install -========= +Installation +============ -This is where you write how to get a new laptop to run this project. +You have several options in setting up your working environment. We recommend +using virtualenv to separate the dependencies of your project from your +system's python environment. If on Linux or Mac OS X, you can also use +virtualenvwrapper to help manage multiple virtualenvs across different +projects. + +Virtualenv Only +--------------- + +First, make sure you are using virtualenv (http://www.virtualenv.org). Once +that's installed, create your virtualenv:: + + $ virtualenv --distribute gnuviechadmin + +You will also need to ensure that the virtualenv has the project directory +added to the path. Adding the project directory will allow `django-admin.py` to +be able to change settings using the `--settings` flag. + +Virtualenv with virtualenvwrapper +------------------------------------ + +In Linux and Mac OSX, you can install virtualenvwrapper +(http://virtualenvwrapper.readthedocs.org/en/latest/), which will take care of +managing your virtual environments and adding the project path to the +`site-directory` for you:: + + $ mkdir gnuviechadmin + $ mkvirtualenv -a gnuviechadmin gnuviechadmin-dev + $ cd gnuviechadmin && add2virtualenv `pwd` + +Installation of Dependencies +============================= + +Depending on where you are installing dependencies: + +In development:: + + $ pip install -r requirements/local.txt + +For production:: + + $ pip install -r requirements.txt