Skip to content
Browse files

Renaming project and files

Renamed README.txt in README.markdown
Added more informations to README
  • Loading branch information...
1 parent f8c9a57 commit b75b259b437865caec850cf0b0b9f270fcfbebd2 nemesisdesign committed Feb 9, 2012
Showing with 89 additions and 70 deletions.
  1. +69 −0 README.markdown
  2. +0 −50 README.txt
  3. +0 −5 tagging_autocomplete/urls.py
  4. 0 {tagging_autocomplete → tagging_autocomplete_tagit}/__init__.py
  5. +7 −7 {tagging_autocomplete → tagging_autocomplete_tagit}/models.py
  6. 0 ...ssed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_flat_0_aaaaaa_40x100.png
  7. 0 ...sed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_flat_75_ffffff_40x100.png
  8. 0 ...sed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_glass_55_fbf9ee_1x400.png
  9. 0 ...sed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_glass_65_ffffff_1x400.png
  10. 0 ...sed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_glass_75_dadada_1x400.png
  11. 0 ...sed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_glass_75_e6e6e6_1x400.png
  12. 0 ...sed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_glass_95_fef1ec_1x400.png
  13. 0 ...ging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  14. 0 ...pressed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-icons_222222_256x240.png
  15. 0 ...pressed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-icons_2e83ff_256x240.png
  16. 0 ...pressed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-icons_454545_256x240.png
  17. 0 ...pressed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-icons_888888_256x240.png
  18. 0 ...pressed → tagging_autocomplete_tagit/static/jquery-tag-it}/css/images/ui-icons_cd0a0a_256x240.png
  19. 0 ...autocomplete.css → tagging_autocomplete_tagit/static/jquery-tag-it/css/ui-autocomplete-tag-it.css
  20. 0 ...autocomplete/tag-it.min.js → tagging_autocomplete_tagit/static/jquery-tag-it/jquery.tag-it.min.js
  21. 0 ...g_autocomplete.js → tagging_autocomplete_tagit/static/jquery-tag-it/tagging_autocomplete_tagit.js
  22. 0 ...plete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_flat_0_aaaaaa_40x100.png
  23. 0 ...lete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_flat_75_ffffff_40x100.png
  24. 0 ...lete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_glass_55_fbf9ee_1x400.png
  25. 0 ...lete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_glass_65_ffffff_1x400.png
  26. 0 ...lete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_glass_75_dadada_1x400.png
  27. 0 ...lete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_glass_75_e6e6e6_1x400.png
  28. 0 ...lete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_glass_95_fef1ec_1x400.png
  29. 0 ...gging_autocomplete_tagit/static/uncompressed}/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  30. 0 ...complete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-icons_222222_256x240.png
  31. 0 ...complete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-icons_2e83ff_256x240.png
  32. 0 ...complete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-icons_454545_256x240.png
  33. 0 ...complete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-icons_888888_256x240.png
  34. 0 ...complete → tagging_autocomplete_tagit/static/uncompressed}/css/images/ui-icons_cd0a0a_256x240.png
  35. 0 {tagging_autocomplete → tagging_autocomplete_tagit}/static/uncompressed/css/jquery-ui.css
  36. 0 {tagging_autocomplete → tagging_autocomplete_tagit}/static/uncompressed/css/jquery.tagit.css
  37. 0 ...e/static/uncompressed/tag-it.js → tagging_autocomplete_tagit/static/uncompressed/jquery.tag-it.js
  38. +5 −0 tagging_autocomplete_tagit/urls.py
  39. 0 {tagging_autocomplete → tagging_autocomplete_tagit}/views.py
  40. +8 −8 {tagging_autocomplete → tagging_autocomplete_tagit}/widgets.py
View
69 README.markdown
@@ -0,0 +1,69 @@
+# django-tagging-autocomplete-tag-it
+
+Fork of *[django-tagging-autocomplete](http://code.google.com/p/django-tagging-autocomplete/)* that works with a modified version (another fork) jQuery UI Tag-it.
+
+**This is not stable**. If you would like to use this widget please share your ideas (and code) on how to improve it.
+
+## Demo:
+
+To see the jQuery UI widget in action its demos: [http://aehlke.github.com/tag-it/](http://aehlke.github.com/tag-it/)
+The forked repository for the javascript is: [https://github.com/nemesisdesign/tag-it](https://github.com/nemesisdesign/tag-it)
+
+## Features:
+* Tag editing
+* Autocompletition
+* Customizable minimum amount of letters before the autocompletition starts
+* Customizable maximum tags number
+* Costomizable max length of each tag
+* Aims to be flexible
+
+## Available settings:
+
+ TAGGING_AUTOCOMPLETE_MIN_LENGTH defaults to 1
+ TAGGING_AUTOCOMPLETE_REMOVE_CONFIRMATION defaults to True
+ TAGGING_AUTOCOMPLETE_ANIMATE defaults to True
+ TAGGING_AUTOCOMPLETE_MAX_TAGS defaults to 20 - this general setting can be overriden in each field if needed
+ TAGGING_AUTOCOMPLETE_JS_BASE_URL defaults to 'STATIC_URL/js/jquery-tag-it/'
+ TAGGING_AUTOCOMPLETE_JQUERY_UI_FILE defaults to 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js'
+ TAGGING_AUTOCOMPLETE_CSS is a list of CSS files and defaults to ['TAGGING_AUTOCOMPLETE_JS_BASE_URL/css/ui-autocomplete-tag-it.css']
+
+## Usage
+
+I wrote these instructions quickly, don't trust this completely.
+
+###Usage in models:
+
+ # models.py
+ from django.db import models
+ from tagging_autocomplete_tagit.models import TagAutocompleteTagItField
+
+ class SomeModel(models.Model):
+ # max_tags defaults to TAGGING_AUTOCOMPLETE_MAX_TAGS
+ # If max_tags is specified it will override the value specified in TAGGING_AUTOCOMPLETE_MAX_TAGS
+ tags = TagAutocompleteTagItField(max_tags=False)
+
+###Using the form widget:
+
+Alternatively you can use the TagAutocomplete form widget while creating your form. For example:
+
+ # forms.py
+ from django import forms
+ from tagging.forms import TagField
+ from tagging_autocomplete_tagit.widgets import TagAutocompleteTagIt
+
+ class SomeForm(forms.Form):
+ # max_tags defaults to TAGGING_AUTOCOMPLETE_MAX_TAGS
+ # If max_tags is specified it will override the value specified in TAGGING_AUTOCOMPLETE_MAX_TAGS
+ tags = TagField(widget=TagAutocompleteTagIt(max_tags=5))
+
+##Instalation
+
+ 1. You need to have django-tagging already installed
+ 2. Download django-tagging-autocomplete-tag-it and use setup.py to install it on your system:
+ python setup.py install
+ (NOT SURE THIS WORKS NOW)
+ 4. Copy "jquery-tag-it" folder of this repository to the 'js' folder specified in your project's STATIC_URL setting. If you want to put it somewhere else add TAGGING_AUTOCOMPLETE_JS_BASE_URL to your project settings.
+ 5. Add "tagging_autocomplete_tagit" to installed apps in your project's settings.
+ 6. Add the following line to your project's urls.py file:
+
+ (r'^tagging_autocomplete_tagit/', include('tagging_autocomplete_tagit.urls')),
View
50 README.txt
@@ -1,50 +0,0 @@
-django-tagging-autocomplete-taggit
-
-fork of django-tagging-autocomplete that works with a modified version jQuery UI Tag-it
-
-for demos see: http://aehlke.github.com/tag-it/
-
-supports max_length of tags and maximum tags
-
-THE README FILE NEEDS TO BE UPDATED.
-DON'T TRUST THIS AT THE MOMENT, WATCH THE CODE DIRECTLY
-
-
-*** django-tagging-autocomplete ***
-
-This Django reusable app extends djang-tagging and provides you with a form widget supporting javascript autocompletion of tags.
-It is forked from http://code.google.com/p/django-tagging-autocomplete/
-
-*** Instalation ***
-
- 1. You need to have django-tagging already installed
- 2. Download django-tagging-autocomplete and use setup.py to install it on your system:
- python setup.py install
- 3. Download jquery-ui and include it in your templates. # TODO: automate this
- 4. Copy "tagging_autocomplete.js" from django-tagging-autocomplete in the folder specified in your project's MEDIA_URL setting. If you want to put it somewhere else add TAGGING_AUTOCOMPLETE_JS_BASE_URL to your project settings.
- 5. Add "tagging_autocomplete" to installed apps in your project's settings.
- 6. Add the following line to your project's urls.py file:
-
- (r'^tagging_autocomplete/', include('tagging_autocomplete.urls')),
-
-*** Usage ***
-** Using the model field **
-
-You can use TagAutocompleteField to enable autocomplition right in your models.py file. In most cases this is the easiest solution. Example:
-
-from django.db import models
-from tagging_autocomplete.models import TagAutocompleteField
-
-class SomeModel(models.Model):
- tags = TagAutocompleteField()
-
-** Using the form widget **
-
-Alternatively you can use the TagAutocomplete form widget while creating your form. For example:
-
-from django import forms
-from tagging.forms import TagField
-from tagging_autocomplete.widgets import TagAutocomplete
-
-class SomeForm(forms.Form):
- tags = TagField(widget=TagAutocomplete(max_tags=5))
View
5 tagging_autocomplete/urls.py
@@ -1,5 +0,0 @@
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('tagging_autocomplete.views',
- url(r'^list$', 'list_tags', name='tagging_autocomplete-list'),
-)
View
0 tagging_autocomplete/__init__.py → tagging_autocomplete_tagit/__init__.py
File renamed without changes.
View
14 tagging_autocomplete/models.py → tagging_autocomplete_tagit/models.py
@@ -1,25 +1,25 @@
from django.db import models
from tagging.fields import TagField
-from tagging_autocomplete.widgets import TagAutocomplete
+from tagging_autocomplete_tagit.widgets import TagAutocompleteTagIt
from django.contrib.admin.widgets import AdminTextInputWidget
# The following code is based on models.py file from django-tinymce by Joost Cassee
-class TagAutocompleteField(TagField):
+class TagAutocompleteTagItField(TagField):
"""
- TagField with autocomplete widget
+ TagField with jQuery UI Tag-it widget
"""
def __init__(self, max_tags=False, *args, **kwargs):
self.max_tags = max_tags
- super(TagAutocompleteField, self).__init__(*args, **kwargs)
+ super(TagAutocompleteTagItField, self).__init__(*args, **kwargs)
def formfield(self, **kwargs):
- defaults = {'widget': TagAutocomplete(max_tags=self.max_tags)}
+ defaults = {'widget': TagAutocompleteTagIt(max_tags=self.max_tags)}
defaults.update(kwargs)
# As an ugly hack, we override the admin widget
if defaults['widget'] == AdminTextInputWidget:
- defaults['widget'] = TagAutocomplete(max_tags=self.max_tags)
+ defaults['widget'] = TagAutocompleteTagIt(max_tags=self.max_tags)
- return super(TagAutocompleteField, self).formfield(**defaults)
+ return super(TagAutocompleteTagItField, self).formfield(**defaults)
View
0 ...css/images/ui-bg_flat_0_aaaaaa_40x100.png → ...css/images/ui-bg_flat_0_aaaaaa_40x100.png
File renamed without changes
View
0 ...ss/images/ui-bg_flat_75_ffffff_40x100.png → ...ss/images/ui-bg_flat_75_ffffff_40x100.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_55_fbf9ee_1x400.png → ...ss/images/ui-bg_glass_55_fbf9ee_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_65_ffffff_1x400.png → ...ss/images/ui-bg_glass_65_ffffff_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_75_dadada_1x400.png → ...ss/images/ui-bg_glass_75_dadada_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_75_e6e6e6_1x400.png → ...ss/images/ui-bg_glass_75_e6e6e6_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_95_fef1ec_1x400.png → ...ss/images/ui-bg_glass_95_fef1ec_1x400.png
File renamed without changes
View
0 .../ui-bg_highlight-soft_75_cccccc_1x100.png → .../ui-bg_highlight-soft_75_cccccc_1x100.png
File renamed without changes
View
0 ...ed/css/images/ui-icons_222222_256x240.png → ...it/css/images/ui-icons_222222_256x240.png
File renamed without changes
View
0 ...ed/css/images/ui-icons_2e83ff_256x240.png → ...it/css/images/ui-icons_2e83ff_256x240.png
File renamed without changes
View
0 ...ed/css/images/ui-icons_454545_256x240.png → ...it/css/images/ui-icons_454545_256x240.png
File renamed without changes
View
0 ...ed/css/images/ui-icons_888888_256x240.png → ...it/css/images/ui-icons_888888_256x240.png
File renamed without changes
View
0 ...ed/css/images/ui-icons_cd0a0a_256x240.png → ...it/css/images/ui-icons_cd0a0a_256x240.png
File renamed without changes
View
0 ...plete/css/django-tagging-autocomplete.css → ...ery-tag-it/css/ui-autocomplete-tag-it.css
File renamed without changes.
View
0 ...static/tagging_autocomplete/tag-it.min.js → ...static/jquery-tag-it/jquery.tag-it.min.js
File renamed without changes.
View
0 ...ging_autocomplete/tagging_autocomplete.js → ...uery-tag-it/tagging_autocomplete_tagit.js
File renamed without changes.
View
0 ...css/images/ui-bg_flat_0_aaaaaa_40x100.png → ...css/images/ui-bg_flat_0_aaaaaa_40x100.png
File renamed without changes
View
0 ...ss/images/ui-bg_flat_75_ffffff_40x100.png → ...ss/images/ui-bg_flat_75_ffffff_40x100.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_55_fbf9ee_1x400.png → ...ss/images/ui-bg_glass_55_fbf9ee_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_65_ffffff_1x400.png → ...ss/images/ui-bg_glass_65_ffffff_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_75_dadada_1x400.png → ...ss/images/ui-bg_glass_75_dadada_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_75_e6e6e6_1x400.png → ...ss/images/ui-bg_glass_75_e6e6e6_1x400.png
File renamed without changes
View
0 ...ss/images/ui-bg_glass_95_fef1ec_1x400.png → ...ss/images/ui-bg_glass_95_fef1ec_1x400.png
File renamed without changes
View
0 .../ui-bg_highlight-soft_75_cccccc_1x100.png → .../ui-bg_highlight-soft_75_cccccc_1x100.png
File renamed without changes
View
0 ...te/css/images/ui-icons_222222_256x240.png → ...ed/css/images/ui-icons_222222_256x240.png
File renamed without changes
View
0 ...te/css/images/ui-icons_2e83ff_256x240.png → ...ed/css/images/ui-icons_2e83ff_256x240.png
File renamed without changes
View
0 ...te/css/images/ui-icons_454545_256x240.png → ...ed/css/images/ui-icons_454545_256x240.png
File renamed without changes
View
0 ...te/css/images/ui-icons_888888_256x240.png → ...ed/css/images/ui-icons_888888_256x240.png
File renamed without changes
View
0 ...te/css/images/ui-icons_cd0a0a_256x240.png → ...ed/css/images/ui-icons_cd0a0a_256x240.png
Diff not rendered.
View
0 ...ete/static/uncompressed/css/jquery-ui.css → ...git/static/uncompressed/css/jquery-ui.css
File renamed without changes.
View
0 .../static/uncompressed/css/jquery.tagit.css → .../static/uncompressed/css/jquery.tagit.css
File renamed without changes.
View
0 ...utocomplete/static/uncompressed/tag-it.js → ...agit/static/uncompressed/jquery.tag-it.js
File renamed without changes.
View
5 tagging_autocomplete_tagit/urls.py
@@ -0,0 +1,5 @@
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('tagging_autocomplete_tagit.views',
+ url(r'^list$', 'list_tags', name='tagging_autocomplete_tagit-list'),
+)
View
0 tagging_autocomplete/views.py → tagging_autocomplete_tagit/views.py
File renamed without changes.
View
16 tagging_autocomplete/widgets.py → tagging_autocomplete_tagit/widgets.py
@@ -4,11 +4,11 @@
from django.utils.safestring import mark_safe
-class TagAutocomplete(TextInput):
+class TagAutocompleteTagIt(TextInput):
def __init__(self, max_tags, *args, **kwargs):
self.max_tags = max_tags if max_tags else getattr(settings, 'TAGGING_AUTOCOMPLETE_MAX_TAGS', 20)
- super(TagAutocomplete, self).__init__(*args, **kwargs)
+ super(TagAutocompleteTagIt, self).__init__(*args, **kwargs)
def render(self, name, value, attrs=None):
""" Render HTML code """
@@ -20,8 +20,8 @@ def render(self, name, value, attrs=None):
remove_confirmation = 'true' if getattr(settings, 'TAGGING_AUTOCOMPLETE_REMOVE_CONFIRMATION', True) else 'false'
animate = 'true' if getattr(settings, 'TAGGING_AUTOCOMPLETE_ANIMATE', True) else 'false'
- list_view = reverse('tagging_autocomplete-list')
- html = super(TagAutocomplete, self).render(name, value, attrs)
+ list_view = reverse('tagging_autocomplete_tagit-list')
+ html = super(TagAutocompleteTagIt, self).render(name, value, attrs)
# Subclass this field in case you need to add some custom behaviour like custom callbacks
js = u"""<script type="text/javascript">init_jQueryTagit({
objectId: '%s',
@@ -44,7 +44,7 @@ def render(self, name, value, attrs=None):
class Media:
# JS Base url defaults to STATIC_URL/jquery-autocomplete/
- js_base_url = getattr(settings, 'TAGGING_AUTOCOMPLETE_JS_BASE_URL', '%s/jquery-autocomplete' % settings.STATIC_URL)
+ js_base_url = getattr(settings, 'TAGGING_AUTOCOMPLETE_JS_BASE_URL', '%sjs/jquery-tag-it/' % settings.STATIC_URL)
# jQuery ui is loaded from google's CDN by default
jqueryui_default = 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js'
jqueryui_file = getattr(settings, 'TAGGING_AUTOCOMPLETE_JQUERY_UI_FILE', jqueryui_default)
@@ -55,13 +55,13 @@ class Media:
# load js
js = (
- '%stagging_autocomplete.js' % js_base_url,
+ '%stagging_autocomplete_tagit.js' % js_base_url,
jqueryui_file,
- '%stag-it.min.js' % js_base_url,
+ '%sjquery.tag-it.min.js' % js_base_url,
)
# custom css can also be overriden in settings
- css_list = getattr(settings, 'TAGGING_AUTOCOMPLETE_CSS', ['%scss/django-tagging-autocomplete.css' % js_base_url])
+ css_list = getattr(settings, 'TAGGING_AUTOCOMPLETE_CSS', ['%scss/ui-autocomplete-tag-it.css' % js_base_url])
# check is a list, if is a string convert it to a list
if type(css_list) != list and type(css_list) == str:
css_list = [css_list]

0 comments on commit b75b259

Please sign in to comment.
Something went wrong with that request. Please try again.