1
0
mirror of https://github.com/Yubico/yubiadmin.git synced 2025-02-20 14:54:30 +01:00

Moved static resources into module.

This commit is contained in:
Dain Nilsson 2013-04-29 14:09:30 +02:00
parent 75e32939be
commit 95c75959fa
24 changed files with 14 additions and 12 deletions

View File

@ -1,5 +1,5 @@
include COPYING
include NEWS
include ChangeLog
recursive-include static *
recursive-include templates *
recursive-include yubiadmin/static *
recursive-include yubiadmin/templates *

2
NEWS
View File

@ -1,3 +1,3 @@
* Version 0.0.2 (released 2013-04-29)
* Version 0.0.3 (released 2013-04-29)
* Initial (internal) release.

View File

@ -16,7 +16,7 @@ STATIC_ASSETS = ['js', 'css', 'img', 'favicon.ico']
if __name__ == '__main__':
# TODO: Take command line args to set port.
mod_dir = os.path.dirname(server.__file__)
base_dir = os.path.abspath(os.path.join(mod_dir, os.pardir))
base_dir = os.path.abspath(os.path.join(mod_dir))
static_dir = os.path.join(base_dir, 'static')
static_app = DirectoryApp(static_dir)

View File

@ -32,7 +32,7 @@ from setuptools import setup
setup(
name='yubiadmin',
version='0.0.2',
version='0.0.3',
author='Dain Nilsson',
author_email='dain@yubico.com',
maintainer='Yubico Open Source Maintainers',
@ -40,6 +40,7 @@ setup(
url='https://github.com/Yubico/yubiadmin',
license='BSD 2 clause',
packages=['yubiadmin', 'yubiadmin.apps', 'yubiadmin.util'],
include_package_data=True,
scripts=['bin/yubiadmin-server'],
setup_requires=['nose>=1.0'],
install_requires=['webob', 'Jinja2', 'WTForms'],

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -8,7 +8,7 @@ __all__ = [
]
cwd = os.path.dirname(__file__)
base_dir = os.path.abspath(os.path.join(cwd, os.pardir, os.pardir))
base_dir = os.path.abspath(os.path.join(cwd, os.pardir))
template_dir = os.path.join(base_dir, 'templates')
env = Environment(loader=FileSystemLoader(template_dir))

View File

@ -1,5 +1,6 @@
from wtforms import (
Form, StringField, IntegerField, PasswordField, HiddenField, Field)
form wtforms import Form
from wtforms.fields import (
TextField, IntegerField, PasswordField, HiddenField, Field)
from wtforms.widgets import PasswordInput, TextArea
from wtforms.validators import Optional, NumberRange
from yubiadmin.util.config import ValueHandler, FileConfig, php_inserter
@ -63,11 +64,11 @@ class DBConfigForm(ConfigForm):
"""
legend = 'Database'
description = 'Settings for connecting to the database.'
dbtype = StringField('Database type')
dbserver = StringField('Host')
dbtype = TextField('Database type')
dbserver = TextField('Host')
dbport = IntegerField('Port', [Optional(), NumberRange(1, 65535)])
dbname = StringField('Database name')
dbuser = StringField('Username')
dbname = TextField('Database name')
dbuser = TextField('Username')
dbpass = PasswordField('Password',
widget=PasswordInput(hide_value=False))