Coder Social home page Coder Social logo

Comments (11)

theskumar avatar theskumar commented on August 16, 2024 5

Django 1.11 is here πŸŽ‰ Wondering if we can get this in! :)

from django-tagulous.

radiac avatar radiac commented on August 16, 2024 4

I don't think anybody has started work on 1.11 support yet - I'll update this issue when there is news.

from django-tagulous.

radiac avatar radiac commented on August 16, 2024 4

Sorry for the delay getting on to this - @dubirajara is right, the main issue seems to be the leading _ in the model prefix, and removing that seems to get everything working. As @ricosalomar says, a custom tag model will get around that problem altogether (and yes, tag options on custom tag models have to be set on the model itself - otherwise you could end up with two tag fields pointing at the same custom tag model with different options, which would lead to madness).

I've now got a working branch with experimental Django 1.11 support - that is to say some tests are failing, but they don't seem to be failing in a way which should have much of an impact. At least I think - hence "experimental".

I'm really busy irl at the moment, but hope to get the remaining failing tests fixed and Tagulous 0.13.0 out shortly.

In the meantime, you should be able to install the branch with:

pip install -e git+https://github.com/radiac/django-tagulous.git@feature/django-1_11#egg=django-tagulous

Be sure to read the upgrade instructions for this next version though - because the prefix has changed, you'll need to create migrations to rename your auto-generated tag models.

from django-tagulous.

ricosalomar avatar ricosalomar commented on August 16, 2024 2

@dubirajara I'm running Django 1.11 and Python 3.5. And it's working for me.
According to your error, it looks like you should check to see which tag_options you are setting (don't set any in the field declaration).
Also, give it a better name, like MyTagModel.
I believe you need to set options in MyTagModel.TagMeta and not in the field.
E.g.:

class MyTagModel(tagulous.models.TagModel):
    class TagMeta:
        autocomplete_view = 'tags_autocomplete'

And the field declaration needs to have no options, except to=...

tags = tagulous.models.TagField(to=MyTagModel)

This will require migrations, of course.
Any chance you could verify @radiac ?

from django-tagulous.

dubirajara avatar dubirajara commented on August 16, 2024 1

hi @radiac , i fork this project and i change the Prefix for models auto-generated by tagulous, i remove MODEL_PREFIX "undercore _" to work django versiΓ³n 1.11, now its work fine with Django 1.11
Can I have a problem with that change I made?

from django-tagulous.

dubirajara avatar dubirajara commented on August 16, 2024 1

@ricosalomar its not work to me. ValueError: Cannot set tag options on explicit tag model <class 'myideas.core.models.TagModel'>

from django-tagulous.

radiac avatar radiac commented on August 16, 2024 1

0.13.0 has now been released, supporting Django 1.11.

Thanks for your patience everyone - life has been hectic!

from django-tagulous.

tomasgarzon avatar tomasgarzon commented on August 16, 2024

Hi, when do you think we will have the next release with this issue resolved?

from django-tagulous.

ricosalomar avatar ricosalomar commented on August 16, 2024

An easy fix is to use a custom tag model, a la:

class TagModel(tagulous.models.TagModel):
    class TagMeta:
        pass
class MyModel(models.Model):
    ....
    tags = tagulous.models.TagField(to=TagModel)

That way tagulous doesn't need to auto-generate model names.

from django-tagulous.

metaljoe avatar metaljoe commented on August 16, 2024

Hi. I'm upgrading a Django application to 1.11 and had the same problem. Is there an update on when 0.13.0 will be available?

Oh, and thanks for this library - it's been really useful!

from django-tagulous.

metaljoe avatar metaljoe commented on August 16, 2024

Big thank you for releasing this πŸ‘

from django-tagulous.

Related Issues (20)

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.