GithubHelp home page GithubHelp logo

django-category's Introduction

Praekelt Engineering Ways of Working

These docs are automatically built & available at http://praekelt-prime-directive.rtfd.org/.

Build these docs locally with:

$ virtualenv ve
$ source ve/bin/activate
(ve)$ pip install -r requirements.pip
(ve)$ cd docs
(ve)$ make html

Open index.html in docs/_build/html.

django-category's People

Contributors

cblignaut avatar hedleyroos avatar qoda avatar ruands avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-category's Issues

Sub category display issue

When adding new categories to a sub category: EG

News -> Lifestyle -> sub sub category

When you display the categories list in the parent select box as well as in meta blocks of posts it lists each "sub sub category" as its parent name instead of its own name. So basically the list starts to look like:

News
Lifestyle
Lifestyle
Lifestyle

When it should be
News
Lifestyle
Sub Sub Category
etc

(WARNING) null has no effect on ManyToManyField

Python 2.7.10
Django 1.11.3

My model:

class Post(models.Model):
    ...
    categories = models.ManyToManyField('category.Category', help_text='Taxonomy')
    tags = models.ManyToManyField('category.Tag', help_text='Tag', blank=False)

But whenever I hit the command makemigrations or migrate I get the following error on console:

WARNINGS: category.Category.sites: (fields.W340) null has no effect on ManyToManyField category.Tag.categories: (fields.w340) null has no effect on ManyToManyField

Have I done something wrong?

Views

How Cann I print all categories on page?

Error with missing Sites module

As beginner to Django it took me a few moments to figure out why the package wasn't working. The Sites module is optional, however this category packages relies on it being install or else the definitions in model fail.

I suggest making this dependency / linking optional or mentioning it more explicitly. Simply adding 'django.contrib.sites' to the INSTALLED_APPS in settings.py and defining SITE_ID = 1 suffices to get the package working.

prepopulated_fields for tag and category

Hi,

Thanks for this code! It's just what the Django community needed. :)

It would be great if the tag and category admin used prepopulated_fields for the slug.

This should be a pretty simple addition to the admin.py. I could do a pull request if that will help speed things up.

Thanks!
Micky

i cant get instance category in my model

no return anything when i trying to get related objects depending on categories

 def get_related_apps(self):
        return Application.objects.filter(categories__subtitle=self.categories).exclude(id=self.id)[:6]

the problem in self.categories it return
category.Category.None
how i can fix that please?

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.