rename manage.py to authentic2-ctl

This commit is contained in:
Benjamin Dauvergne 2013-04-14 12:04:25 +02:00
parent effee8600a
commit 65283edc27
4 changed files with 62 additions and 26 deletions

View File

@ -1,16 +1,17 @@
recursive-include data *
recursive-include tests *.db *.py
recursive-include static *.css *.js *.ico *.gif *.png *.jpg
recursive-include authentic2/idp/static *.css *.js *.ico *.gif *.png *.jpg
recursive-include authentic2/auth2_auth/auth2_openid/static *.css *.js *.ico *.gif *.png *.jpg
recursive-include authentic2 README fixtures/*.json templates/*.html templates/*/*.html js/*.js templates/*/*/*.html locale/*/*/*.po xrds.xml *.txt yadis.xrdf
include doc/*.rst
include doc/pictures/*
include COPYING
include README.rst
include AUTHORS.txt
include COPYING NEWS README.rst AUTHORS.txt
include authentic2/vendor/oath/TODO
include authentic2/vendor/totp_js/README.rst
include diagnose.py
include ez_setup.py
include authentic2/auth2_auth/auth2_ssl/authentic_ssl.vhost
include requirements.txt
include authentic2/vendor/dpam/LICENSE
include authentic2/nonce/README.rst
include doc/conf.py doc/Makefile doc/README.rst.bak
include authentic2-ctl

View File

@ -64,12 +64,12 @@ or easy_install::
On first run you must create the database schema::
python authentic2/manage.py syncdb --all
python authentic2/manage.py migrate --fake
authentic2-ctl syncdb --all
authentic2-ctl migrate --fake
Then you can launch authentic::
python authentic2/manage.py runserver
authentic2-ctl runserver
You should see the following output::
@ -97,8 +97,8 @@ or easy_install::
You can now run Authentic from the installation directory, e.g.::
python /usr/local/lib/python2.6/site-packages/authentic2-x.y.z-py2.6.egg/authentic2/manage.py syncdb --migrate
python /usr/local/lib/python2.6/site-packages/authentic2-x.y.z-py2.6.egg/authentic2/manage.py runserver
authentic2-ctl syncdb --migrate
authentic2-ctl runserver
You should see the following output::
@ -131,12 +131,12 @@ or using the dependencies version requirements::
On first run you must create the database schema::
python authentic2/manage.py syncdb --all
python authentic2/manage.py migrate --fake
./authentic2-ctl syncdb --all
./authentic2-ctl migrate --fake
Then you can launch authentic::
python authentic2/manage.py runserver
./authentic2-ctl runserver
You should see the following output::
@ -166,12 +166,12 @@ or easy_install::
On first run you must create the database schema::
python authentic2/manage.py syncdb --all
python authentic2/manage.py migrate --fake
authentic2-ctl syncdb --all
authentic2-ctl migrate --fake
Then you can launch authentic::
python /usr/local/lib/python2.6/site-packages/authentic2-x.y.z-py2.6.egg/authentic2/manage.py runserver
authentic2-ctl runserver
You should see the following output::
@ -203,8 +203,8 @@ or using the dependencies version requirements::
Then run Authentic::
python authentic2/manage.py syncdb --migrate
python authentic2/manage.py runserver
python authentic2-ctl syncdb --migrate
python authentic2-ctl runserver
You should see the following output::
@ -226,17 +226,13 @@ of authentic you have to update your database schema using the
migration command — you will need to have installed the dependency django-south,
see the beginning of this README file.::
python ./manage.py migrate
Then you will need to create new tables if there are.::
python ./manage.py syncdb
authentic2-ctl syncdb --migrate
Specifying a different database
===============================
This is done by modifying the DATABASES dictionary in your local_settings.py file
(create it in Authentic project directory); for example::
(create it in Authentic project directory); for example to use PostgreSQL::
DATABASES['default'] = {
'ENGINE': 'django.db.backends.postgresql',
@ -334,13 +330,14 @@ CAS
How to use Authentic 2 as a CAS 1.0 or CAS 2.0 identity provider ?
-----------------------------------------------------------------
1. Activate CAS IdP support in settings.py::
1. Activate CAS IdP support in your local_settings.py::
IDP_CAS = True
2. Then create the database table to hold CAS service tickets::
python authentic2/manage.py syncdb --migrate
python authentic2-ctl syncdb --all
python authentic2-ctl migrate --fake
2. Also configure authentic2 to authenticate against your LDAP directory (see
above) if your want your user attributes to be accessible from your service,

View File

@ -9,6 +9,41 @@ from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
from setuptools.command.install_lib import install_lib as _install_lib
from distutils.command.build import build as _build
from distutils.command.sdist import sdist as _sdist
from distutils.cmd import Command
class compile_translations(Command):
description = 'compile message catalogs to MO files via django compilemessages'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import os
import sys
from django.core.management.commands.compilemessages import \
compile_messages
curdir = os.getcwd()
os.chdir(os.path.realpath('authentic2'))
compile_messages(stderr=sys.stderr)
os.chdir(curdir)
class build(_build):
sub_commands = [('compile_translations', None)] + _build.sub_commands
class sdist(_sdist):
sub_commands = [('compile_translations', None)] + _sdist.sub_commands
class install_lib(_install_lib):
def run(self):
self.run_command('compile_translations')
_install_lib.run(self)
setup(name="authentic2",
version=authentic2.VERSION,
@ -46,4 +81,7 @@ setup(name="authentic2",
dependency_links = [
'https://bitbucket.org/bdauvergne/django-registration-1.5/get/tip.tar.gz#egg=django-registration-0.8.1',
],
cmdclass={'build': build, 'install_lib': install_lib,
'compile_translations': compile_translations,
'sdist': sdist},
)