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

Better classes attribute handling #222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paradoxxxzero
Copy link

Now support multiple class attributes specified and class/bool objects:

- var a = True;

a.cls1(class={'cls2': False, 'cls3': True, 'cls4': a})

a.cls0.cls1(class=['cls2', 'cls3'], class=['cls4', 'cls5'])

gives

<a class="cls1 cls3 cls4"></a><a class="cls0 cls1 cls2 cls3 cls4 cls5"></a>

@kakulukia
Copy link

Since there are no updates to pyjade and its successor recently was deleted from pypi, I took the liberty to revive it: https://github.com/kakulukia/pypugjs

Version 5.0.1 has fixed the incompatibility with recent Django versions.
I'll be happy to merge this into the next version if you resubmit the PR to my repo.

@paradoxxxzero
Copy link
Author

Please cherry-pick if you want the code, I'm not using this anymore.

@kakulukia
Copy link

Will do. What do you currently use?

@paradoxxxzero
Copy link
Author

React :)

@kakulukia
Copy link

But compared to pug templates react is ugly as hell! :)
I tried to work with it, but found react too complicated/ugly coming from Angular.
Have you had a look at VueJS? Its as beautiful as Angular u can use pug templates and sass right away and its as fast as react.
Plus VueJS can be used as a drop in script for pages served with Django.

Here is a lil example (i love that combination or DRF and Vue frontend) https://github.com/kakulukia/django-default-project

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

Successfully merging this pull request may close these issues.

2 participants