Giter Club home page Giter Club logo

aldryn-categories's Introduction

Deprecated

This project is no longer supported.

Divio will undertake no further development or maintenance of this project. If you are interested in continuing to develop it, use the fork functionality from GitHub. We are not able to transfer ownership of the repository to another party.

Aldryn Categories

PyPI Version Build Status Coverage Status Code Climate

Aldryn Categories is a simple, Aldryn-compatible project that provides hierarchical categories as an independent model in your project. Categories are similar to tags, but are structured into a taxonomy. The project is suitable for I18N projects as Categories are fully translatable.

Please see the official Aldryn Categories documentation, which includes information on installation.

Developers should also note that the project maintains UML diagrams for this project.

Contributing

Aldryn Categories is a an open-source project. We'll be delighted to receive your feedback in the form of issues and pull requests. Before submitting your pull request, please review our guidelines for Aldryn addons.

Requirements

  1. Python 2.7, 3.4, 3.5, 3.6
  2. Django 1.11, 2.0, 2.1
  3. django-treebeard v4.3+
  4. django-parler v1.9.2+

aldryn-categories's People

Contributors

bplociennik avatar chaosk avatar christianbertschy avatar chronossc avatar czpython avatar finalangel avatar mikek avatar mkoistinen avatar nikaro avatar stefanfoulis avatar vthaian avatar

Stargazers

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

Watchers

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

aldryn-categories's Issues

add a missing migration

running python manage.py makemigrations aldryn_categories creates a new migration, so there seems to be changes not addressed in the current migrations. I suspect it's actually changes in the latest django-parler base-class that causes this.

This can cause problems when creating migrations for other apps that have relations to aldryn-categories, since Django 1.7 will sneakily create the missing migration for aldryn-categories, even if it is installed somewhere in site-packages.

Cannot Delete Category

Hi,
With the current version we cannot delete any of the aldryn categories, through the admin panel.

Create a new category in one language but saved to another language

I'm not sure if it's a treebeard or aldryn-categories bug. I have two languages on my site, Chinese and English. If I log into admin site in English and create a category in Chinese tab, the content would be saved to English. The opposite is also true. If I log into admin site in Chinese and create a category in English tab, the content is saved to Chinese. It appears to me that the language tab doesn't matter at all. It all depends on what language of the Admin site is in at the moment.

I'm pretty sure it's not parler's problem per se because I have other model in parler that doesn't suffer from this problem.

Categories not displayed on the corresponding language

I have extended Page to include Categories using the following model:

# File: models.py
from django.db import models
from cms.extensions import PageExtension
from cms.extensions.extension_pool import extension_pool
from aldryn_categories.fields import CategoryManyToManyField

class CategoryExtension(PageExtension):
    categories = CategoryManyToManyField()

extension_pool.register(CategoryExtension)

Also added Categories to the tool bar:

#File: cms_toolbars.py
from cms.toolbar_pool import toolbar_pool
from cms.extensions.toolbar import ExtensionToolbar
from django.utils.translation import ugettext_lazy as _
from .models import CategoryExtension


@toolbar_pool.register
class CategoryExtensionToolbar(ExtensionToolbar):
    # defines the model for the current toolbar
    model = CategoryExtension

    def populate(self):
        # setup the extension toolbar with permissions and sanity checks
        current_page_menu = self._setup_extension_toolbar()

        # if it's all ok
        if current_page_menu:
            # retrieves the instance of the current extension (if any) and the toolbar item URL
            page_extension, url = self.get_page_extension_admin()
            if url:
                # adds a toolbar item in position 0 (at the top of the menu)
                current_page_menu.add_modal_item(_('Categories'), url=url,
                    disabled=not self.toolbar.edit_mode, position=0)

Now I can add and select categories to each page, but I have realized that the categories are always in English even if I am on a different language: http://127.0.0.1:8000/de/

Also:

Steps to reproduce the error:

  • Install the versions django-cms=3.4.3, Django==1.10.7, aldryn-categories==1.0.4.
  • Add the Category extension using the files models.py and cms_toolbars.py displayed previously.
  • Click on Page -> Categories
  • Click on the Delete button

Any idea what could be wrong?

Would be great having a small tutorial of how to implement the categories into pages, because I think that will be the most common use case.

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.