Code Monkey home page Code Monkey logo

django-tagging-ext's Introduction

django-tagging-ext (Django Tagging EXT)

django-tagging gives you tagging. Django Tagging EXT gives you enhanced displays of tags and tag synonym capabilities. It is Django neutral but when combined with Pinax gives you some extra view capabilities based off some of the Pinax core applications.

Dependencies

django-tagging

Optional Dependencies

Pinax 0.7

Installation

Tagged release:

pip install django-tagging-est

Development version:

pip install -e git://github.com/pydanny/django-tagging-ext.git#egg=django-tagging-ext

View rendering via root url_conf

In the project url_conf (urls.py):

# django-tagging-ext url definitions
from blog.models import Post
from bookmarks.models import BookmarkInstance
from photos.models import Image
from tagging.models import TaggedItem

tagged_models = (
  dict(title="Blog Posts",
    query=lambda tag : TaggedItem.objects.get_by_model(Post, tag).filter(status=2),
    custom_template="pinax_tagging_ext/blogs.html",
  ),
  dict(title="Bookmarks",
    query=lambda tag : TaggedItem.objects.get_by_model(BookmarkInstance, tag),
  ),
  dict(title="Photos",
    query=lambda tag: TaggedItem.objects.get_by_model(Image, tag).filter(safetylevel=1),
    custom_template="pinax_tagging_ext/photos.html",    
  ),
)

tagging_ext_kwargs = {
  'tagged_models':tagged_models,
  #'default_template':'custom_templates/special.html'
}

urlpatterns += patterns('',
  url(r'^tags/(?P<tag>.+)/(?P<model>.+)$', 'tagging_ext.views.tag_by_model', kwargs=tagging_ext_kwargs, name='tagging_ext_tag_by_model'),
  url(r'^tags/(?P<tag>.+)/$', 'tagging_ext.views.tag', kwargs=tagging_ext_kwargs, name='tagging_ext_tag'),
  url(r'^tags/$', 'tagging_ext.views.index', name='tagging_ext_index'),  
)

django-tagging-ext's People

Contributors

pydanny avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.