Andy Mikhailenko avatar Andy Mikhailenko committed f699322

Updated list of authors; updated documentation (a bit more readability); updated year in file headers; bumped version.

Comments (0)

Files changed (9)

 Django AutoSlug was originally created by:
 
-* Andy Mikhailenko <andy@neithere.net>.
+* Andy Mikhailenko <neithere@gmail.com>.
 
 And here is a probably incomplete list of contributors -- people
 who have submitted patches, reported bugs, added translations and
 * Johan Charpentier
 * Nicolás Echániz
 * Aaron VanDerlip
+* Jannis Leidel
 * Your Name Here ;)

autoslug/__init__.py

 # -*- coding: utf-8 -*-
 #
-#  Copyright (c) 2008—2009 Andy Mikhailenko
+#  Copyright (c) 2008—2012 Andy Mikhailenko
 #
 #  This file is part of django-autoslug.
 #
 
 from fields import AutoSlugField
 
-__all__     = ['AutoSlugField']
+__all__ = ['AutoSlugField']

autoslug/fields.py

 # -*- coding: utf-8 -*-
 #
-#  Copyright (c) 2008—2009 Andy Mikhailenko
+#  Copyright (c) 2008—2012 Andy Mikhailenko
 #
 #  This file is part of django-autoslug.
 #

autoslug/settings.py

 # -*- coding: utf-8 -*-
 #
-#  Copyright (c) 2008—2009 Andy Mikhailenko
+#  Copyright (c) 2008—2012 Andy Mikhailenko
 #
 #  This file is part of django-autoslug.
 #
 #  General Public License version 3 (LGPLv3) as published by the Free
 #  Software Foundation. See the file README for copying conditions.
 #
+"""
+Django settings that affect django-autoslug:
 
-from django.conf import settings
-
-__doc__ = """Available settings for django-autoslug:
-
-* `AUTOSLUG_SLUGIFY_FUNCTION` allows to define a custom slugifying function.
+`AUTOSLUG_SLUGIFY_FUNCTION`
+  Allows to define a custom slugifying function.
 
   The function can be repsesented as string or callable, e.g.::
 
       # custom function, defined inline:
       AUTOSLUG_SLUGIFY_FUNCTION = lambda slug: 'can i haz %s?' % slug
 
-  Default value is 'django.template.defaultfilters.slugify', unidecode's
-  unidecode function or pytils.translit's slugify function if installed.
+  If no value is given, default value is used.
+
+  Default value is one of these depending on availability in given order:
+
+  * `unidecode.unidecode()` if Unidecode_ is available;
+  * `pytils.translit.slugify` if pytils_ is available;
+  * `django.template.defaultfilters.slugify` bundled with Django.
 
   django-autoslug also ships a couple of slugify functions that use
   the translitcodec_ Python library, e.g.::
      # only performing single character replacements
      AUTOSLUG_SLUGIFY_FUNCTION = 'autoslug.utils.translit_one'
 
+.. _Unidecode: http://pypi.python.org/pypi/Unidecode
+.. _pytils: http://pypi.python.org/pypi/pytils
 .. _translitcodec: http://pypi.python.org/pypi/translitcodec
 
 """
+from django.conf import settings
 
 # use custom slugifying function if any
 slugify = getattr(settings, 'AUTOSLUG_SLUGIFY_FUNCTION', None)

autoslug/tests.py

 # -*- coding: utf-8 -*-
 #
-#  Copyright (c) 2008—2009 Andy Mikhailenko
+#  Copyright (c) 2008—2012 Andy Mikhailenko
 #
 #  This file is part of django-autoslug.
 #

autoslug/utils.py

 # -*- coding: utf-8 -*-
+#
+#  Copyright (c) 2008—2012 Andy Mikhailenko
+#
+#  This file is part of django-autoslug.
+#
+#  django-autoslug is free software under terms of the GNU Lesser
+#  General Public License version 3 (LGPLv3) as published by the Free
+#  Software Foundation. See the file README for copying conditions.
+#
 
 # django
 from django.core.exceptions import ImproperlyConfigured
         attr = getattr(instance, field.populate_from)
         return callable(attr) and attr() or attr
 
+
 def generate_unique_slug(field, instance, slug, manager):
     """
     Generates unique slug by adding a number to given value until no model
 
         # ...next iteration...
 
+
 def get_uniqueness_lookups(field, instance, unique_with):
     """
     Returns a dict'able tuple of lookups to ensure uniqueness of a slug.
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-VERSION = '1.3.4'
+VERSION = '1.6.0'
 
 import sys, os
 
 
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default'
+html_theme = 'agogo'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Welcome to Django Autoslug's documentation!
-===========================================
+:class:`~autoslug.fields.AutoSlugField` is an extended SlugField designed
+to automatically avoid duplicate values and apply custom "slugification"
+functions (including advanced transliteration).  It is possible to fine-tune
+the method for resolving clashes.
 
-Contents:
+See detailed documentation with real-world examples:
 
 .. toctree::
    :maxdepth: 2
-   
+
    fields
    settings
 
 
 setup(
     name     = 'django-autoslug',
-    version  = '1.5.0',
+    version  = '1.6.0',  # also update doc/conf.py:version
     packages = ['autoslug'],
 
     requires = ['python (>= 2.4)', 'django (>= 1.0)'],
     description  = 'An automated slug field for Django.',
     long_description = readme,
     author       = 'Andy Mikhailenko',
-    author_email = 'andy@neithere.net',
+    author_email = 'neithere@gmail.com',
     url          = 'http://bitbucket.org/neithere/django-autoslug/',
     download_url = 'http://bitbucket.org/neithere/django-autoslug/get/tip.zip',
     license      = 'GNU Lesser General Public License (LGPL), Version 3',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.