mirror of
https://github.com/kennethreitz/flask-common.git
synced 2026-06-05 23:00:19 +00:00
v0.1.0
This commit is contained in:
+4
-4
@@ -98,13 +98,13 @@ class Common(object):
|
||||
"""Initializes the Flask application with Common."""
|
||||
if not hasattr(app, 'extensions'):
|
||||
app.extensions = {}
|
||||
|
||||
|
||||
if 'common' in app.extensions:
|
||||
raise RuntimeError("Flask-common extension already initialized")
|
||||
|
||||
raise RuntimeError("Flask-Common extension already initialized")
|
||||
|
||||
app.extensions['common'] = self
|
||||
self.app = app
|
||||
|
||||
|
||||
if not 'COMMON_FILESERVER_DISABLED' in app.config:
|
||||
with app.test_request_context() as c:
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
"""
|
||||
Flask-Common
|
||||
-------------
|
||||
|
||||
A Flask extension with lots of common time-savers (file-serving, favicons, etc).
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from setuptools import setup
|
||||
|
||||
if sys.argv[-1] == 'publish':
|
||||
os.system('python setup.py sdist upload')
|
||||
sys.exit()
|
||||
|
||||
setup(
|
||||
name='Flask-Common',
|
||||
version='0.1.0',
|
||||
url='https://github.com/kennethreitz/flask-common',
|
||||
license='BSD',
|
||||
author='Kenneth Reitz',
|
||||
author_email='me@kennethreitz.org',
|
||||
description='A Flask extension with lots of common time-savers (file-serving, favicons, etc).',
|
||||
long_description=__doc__,
|
||||
py_modules=['flask_common'],
|
||||
# if you would be using a package instead use packages instead
|
||||
# of py_modules:
|
||||
# packages=['flask_sqlite3'],
|
||||
zip_safe=False,
|
||||
include_package_data=True,
|
||||
platforms='any',
|
||||
install_requires=[
|
||||
'Flask',
|
||||
'Gunicorn',
|
||||
'WhiteNoise',
|
||||
'crayons',
|
||||
'maya',
|
||||
'flask_cache'
|
||||
],
|
||||
classifiers=[
|
||||
'Environment :: Web Environment',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules'
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user