Skip to content

Conversation

@michaeljones
Copy link
Contributor

As briefly discussed in #95.

From the commit message:

Rather than doing the work in the template tags, we do the work in utils
functions so that the same functionality is available directly to Python
application code.

This can be useful for media properties on Django widgets (#95).

The README has been updated to provide simple examples of usage.

It feels a bit weird to mostly cut & paste code between the files but it seems that that is most of what is needed. I'm not sure that the get_as_tags function is exactly necessary but it seemed like it might save someone some trouble if they wanted to achieve similar results.

Very happy to change any and all of it. Especially the names of functions. Naming is hard :)

I've attempted to provide a bit of README and doc strings but they could be better I image.

I've run the tests locally and everything seems to pass. I confess I haven't looked at it closer than that though.

Thanks again,
Michael

@coveralls
Copy link

coveralls commented Jan 2, 2017

Coverage Status

Coverage decreased (-0.5%) to 96.835% when pulling 24ea47f on michaeljones:utils into c858d50 on owais:master.

Copy link
Collaborator

@owais owais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restated the CI build. Will approve if it passes but please take a look if it fails again.

Thanks for the PR

Rather than doing the work in the template tags, we do the work in utils functions so that the same functionality is available directly to Python application code. This can be useful for `media` properties on Django widgets (#95). The README has been updated to provide simple examples of usage.
@coveralls
Copy link

coveralls commented Jan 7, 2017

Coverage Status

Coverage increased (+0.1%) to 97.436% when pulling 2f4fb2e on michaeljones:utils into c858d50 on owais:master.

@michaeljones
Copy link
Contributor Author

The attrs=None part of get_as_tags wasn't being covered but I realise the template tag assumes attrs='' so I've change get_as_tags to have the same approach which restore the coverage totals.

@owais owais merged commit 0d6ea78 into django-webpack:master Jan 7, 2017
@ntucker
Copy link
Contributor

ntucker commented Jan 10, 2017

Please release a version to pypi with this. So incredibly useful!!!

@ntucker
Copy link
Contributor

ntucker commented Jan 10, 2017

Hmm, tried just installing the git hash and got

IOError: [Errno 2] No such file or directory: 'README.rst'

@owais
Copy link
Collaborator

owais commented Jan 10, 2017

I don't I'll have time to release this to pypi or fix direct git install or the next 2-3 days. PRs to fix git install welcome!

I'll release a version to some time later this week.

@ntucker
Copy link
Contributor

ntucker commented Jan 10, 2017

Ok, I created #97. :)

@pacahon
Copy link

pacahon commented May 18, 2017

@owais Hello! Looks like release on pypi still outdated. Do you have some time to fix this? Thanks.

@owais
Copy link
Collaborator

owais commented May 19, 2017

@pacahon I released a version to pypi yesterday. Could you check if it works for you now?

@pacahon
Copy link

pacahon commented May 19, 2017

@owais Thanks! I can install 0.4.1 only with pypi right now (no updates on site too) Will check it again tomorrow and write the results.

@pacahon
Copy link

pacahon commented May 21, 2017

Of course, i forgot to respond. It's ok since yesterday. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants