diff --git a/MANIFEST.in b/MANIFEST.in index ac6260b6..feb3cff3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ +include LICENSE.rst +include README.rst recursive-include fiber/templates * recursive-include fiber/static * diff --git a/README.rst b/README.rst index 87731452..a9f0fc54 100644 --- a/README.rst +++ b/README.rst @@ -7,35 +7,28 @@ Installation: :: - $ pip install git+git://github.com/ridethepony/django-fiber.git#egg=fiber + $ pip install django-fiber Requirements: ============= +These dependencies are automatically installed: + :: - $ pip install django-mptt==0.4.2 - $ pip install hg+http://bitbucket.org/jespern/django-piston/#egg=django-piston - $ pip install django-staticfiles==0.3.4 - $ pip install beautifulsoup==3.2.0 - $ pip install django_compressor==0.5.3 - $ pip install textile==2.1.4 - $ pip install PIL==1.1.7 - $ pip install South==0.7.3 # optional + django-mptt>=0.4.2 + django-piston==0.2.3rc1 # from hg+http://bitbucket.org/jespern/django-piston@c4b2d21db51a#egg=django-piston-0.2.3rc1 + django-staticfiles>=1.0.1 + beautifulsoup>=3.2.0 + django-compressor>=0.7.1 -Or you could add the following lines to your project's requirements.txt +Optionally, you may need: :: - django-mptt==0.4.2 - hg+http://bitbucket.org/jespern/django-piston/#egg=django-piston - django-staticfiles==0.3.4 - beautifulsoup==3.2.0 - django_compressor==0.5.3 - textile==2.1.4 - PIL==1.1.7 - South==0.7.3 # optional + textile>=2.1.5 + South>=0.7.3 Settings: @@ -77,6 +70,11 @@ settings.py STATICFILES_MEDIA_DIRNAMES = ( 'static', ) + STATICFILES_FINDERS = ( + 'staticfiles.finders.FileSystemFinder', + 'staticfiles.finders.AppDirectoriesFinder', + 'compressor.finders.CompressorFinder', + ) COMPRESS_JS_FILTERS = () @@ -112,16 +110,10 @@ Post-installation: Create database tables:: $ python manage.py syncdb - $ python manage.py migrate fiber - -All static Fiber files need to be symlinked in (or copied to) your media folder. -For Django < 1.3, execute the following admin command:: - - $ python manage.py build_static --link -When Django 1.3 hits the stage, this will be handled by django.contrib.staticfiles:: +All static Fiber files need to be symlinked in (or copied to) your media folder:: - $ python manage.py collectstatic + $ python manage.py collectstatic --link Usage: diff --git a/fiber/__init__.py b/fiber/__init__.py index e69de29b..31c70ebb 100644 --- a/fiber/__init__.py +++ b/fiber/__init__.py @@ -0,0 +1 @@ +__version__ = '0.9' \ No newline at end of file diff --git a/fiber/admin_views.py b/fiber/admin_views.py index f5a47887..18a7582a 100644 --- a/fiber/admin_views.py +++ b/fiber/admin_views.py @@ -5,8 +5,6 @@ from django.utils.translation import ugettext as _ from django.views.decorators.csrf import csrf_exempt -from textile import textile - from models import Page @@ -62,6 +60,8 @@ def page_move_down(request, id): @csrf_exempt def render_textile(request): + from textile import textile + return HttpResponse( textile(request.POST['data']) ) diff --git a/fiber/app_settings.py b/fiber/app_settings.py index dd887878..216a2486 100644 --- a/fiber/app_settings.py +++ b/fiber/app_settings.py @@ -11,4 +11,4 @@ if not hasattr(settings, 'MPTT_ADMIN_LEVEL_INDENT'): settings.MPTT_ADMIN_LEVEL_INDENT = 30 -EDITOR = getattr(settings, 'FIBER_EDITOR', 'fiber.editor_definitions.CKEditor') +EDITOR = getattr(settings, 'FIBER_EDITOR', 'fiber.editor_definitions.ckeditor.EDITOR') diff --git a/fiber/editor_definitions.py b/fiber/editor_definitions.py deleted file mode 100644 index 7515f7c9..00000000 --- a/fiber/editor_definitions.py +++ /dev/null @@ -1,13 +0,0 @@ -from textile import textile - - -CKEditor = { - 'template_js': 'fiber/ckeditor_js.html' -} - -Markitup = { - 'template_js': 'fiber/markitup_js.html', - 'template_css': 'fiber/markitup_css.html', - 'renderer': textile, - 'rename_url_expressions': (r':%s', r':%s') -} diff --git a/fiber/editor_definitions/__init__.py b/fiber/editor_definitions/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/fiber/editor_definitions/ckeditor.py b/fiber/editor_definitions/ckeditor.py new file mode 100644 index 00000000..c8149961 --- /dev/null +++ b/fiber/editor_definitions/ckeditor.py @@ -0,0 +1,3 @@ +EDITOR = { + 'template_js': 'fiber/ckeditor_js.html' +} diff --git a/fiber/editor_definitions/markitup.py b/fiber/editor_definitions/markitup.py new file mode 100644 index 00000000..992c0a58 --- /dev/null +++ b/fiber/editor_definitions/markitup.py @@ -0,0 +1,9 @@ +from textile import textile + + +EDITOR = { + 'template_js': 'fiber/markitup_js.html', + 'template_css': 'fiber/markitup_css.html', + 'renderer': textile, + 'rename_url_expressions': (r':%s', r':%s') +} diff --git a/setup.py b/setup.py index a1aa900a..2dec92ec 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,39 @@ from setuptools import setup, find_packages setup( - name = 'fiber', - version = '0.9', - packages = find_packages(), - include_package_data = True, + name='django-fiber', + version=__import__('fiber').__version__, + license='Apache License, Version 2.0', + + install_requires=[ + 'django-mptt>=0.4.2', + 'django-piston==0.2.3rc1', + 'django-staticfiles>=1.0.1', + 'beautifulsoup>=3.2.0', + 'django-compressor>=0.7.1', + ], + dependency_links = ["hg+http://bitbucket.org/jespern/django-piston@c4b2d21db51a#egg=django-piston-0.2.3rc1"], + + description='Django Fiber - a simple, user-friendly CMS for all your Django projects', + long_description=open('README.rst').read(), + + author='Dennis Bunskoek', + author_email='dbunskoek@leukeleu.nl', + + url='https://github.com/ridethepony/django-fiber', + download_url='https://github.com/ridethepony/django-fiber/zipball/master', + + packages=find_packages(), + include_package_data=True, + + zip_safe=False, + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Framework :: Django', + ] )