Skip to content

Commit

Permalink
packaged Django Fiber for PyPI
Browse files Browse the repository at this point in the history
- expanded setup.py
- added __version__ to __init__.py
- updated README.rst
  - easier installation (automatic installation of dependencies)
  - removed unneeded PIL dependency
- textile is now an optional dependency
  - split editor_definitions into separate files (needed to make textile optional)
  • Loading branch information
dbunskoek committed May 4, 2011
1 parent a3d28df commit 044d17c
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 46 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
@@ -1,2 +1,4 @@
include LICENSE.rst
include README.rst
recursive-include fiber/templates *
recursive-include fiber/static *
44 changes: 18 additions & 26 deletions README.rst
Expand Up @@ -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:
Expand Down Expand Up @@ -77,6 +70,11 @@ settings.py
STATICFILES_MEDIA_DIRNAMES = (
'static',
)
STATICFILES_FINDERS = (
'staticfiles.finders.FileSystemFinder',
'staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
)

COMPRESS_JS_FILTERS = ()

Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions fiber/__init__.py
@@ -0,0 +1 @@
__version__ = '0.9'
4 changes: 2 additions & 2 deletions fiber/admin_views.py
Expand Up @@ -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


Expand Down Expand Up @@ -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'])
)
2 changes: 1 addition & 1 deletion fiber/app_settings.py
Expand Up @@ -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')
13 changes: 0 additions & 13 deletions fiber/editor_definitions.py

This file was deleted.

Empty file.
3 changes: 3 additions & 0 deletions fiber/editor_definitions/ckeditor.py
@@ -0,0 +1,3 @@
EDITOR = {
'template_js': 'fiber/ckeditor_js.html'
}
9 changes: 9 additions & 0 deletions 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')
}
39 changes: 35 additions & 4 deletions 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',
]
)

0 comments on commit 044d17c

Please sign in to comment.