Giter Site home page Giter Site logo

idlesign / django-sitecats Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 2.0 181 KB

Django reusable application for content categorization.

Home Page: https://github.com/idlesign/django-sitecats

License: BSD 3-Clause "New" or "Revised" License

Python 89.78% JavaScript 6.25% HTML 3.97%
python django categories navigation tags tagcloud

django-sitecats's People

Contributors

bashu avatar idlesign avatar motiteux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-sitecats's Issues

RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated...

/home/vagrant/.virtualenv/local/lib/python2.7/site-packages/sitecats/models.py:11: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
  from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation

Item with no categories doesn't display form

I'm running git HEAD.

In my views.py, I have this:

class Gallery(ModelWithCategory):
    ...
    def get_context_data(self, **kwargs):
        context['gallery'].enable_category_lists_editor(self.request,
                    editor_init_kwargs = { 'allow_new': True },
                    lists_init_kwargs = { 'show_title': True, 'cat_html_class': 'label label-default'},
                    additional_parents_aliases = ['people', 'places'],
                    handler_init_kwargs = {})

and then in my template:

{% load sitecats %}
<div class="gallery-tags">
    {% sitecats_categories from gallery %}
</div>

But the page doesn't show the form to add a tag to the object. If I manually add a category to an object, using the django shell, then it displays both that tag and the form to add more. But without manually adding the first tag, there is no way to add more.

How am I supposed to do this correctly?

name error

I'm having some difficulty with your app:

models.py
from sitecats.models import ModelWithCategory # this was just a guess on my part
...
class Entry(sitecats.models.ModelWithCategory):
NameError: name 'sitecats' is not defined

urls
url(r'^sitecats/', include('sitecats.urls')),

settings
INSTALLED_APPS = [
'django.contrib.admin',
...
'sitecats',
]

I used pip install and the app is in site packages inside a venv. What's wrong?

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.