Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing BBCode to List #17

Open
erayerdin opened this issue May 10, 2017 · 0 comments
Open

Parsing BBCode to List #17

erayerdin opened this issue May 10, 2017 · 0 comments

Comments

@erayerdin
Copy link

I didn't see it in documentation, so I thought maybe this feature does not exist.

Is there a way to parse bbcode to a list from a string? Considering a custom tag as a:

text = "Lorem ipsum dolor sit amet, [a]consectetur[/a] adipiscing elit, sed do eiusmod [a]tempor[/a] incididunt ut labore [a]et[/a] dolore magna aliqua."

parser("a", "text")
["consectetur","tempor","et"]

Why do I need it? (Or why would someone else need it?)

In a basic blog, where titles are (for an unknown reason) implemented as a different model (not a field) called as Title.

I want to get value of a tag and filter a QuerySet based on that value. Considering the former example:

Title.objects.filter(label="consectetur")

Is it possible yet?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant