torchbox / torchbox/django-pattern-library
Usage examples in the documentation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 423
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
I do mostly back-end development. My organization hired somebody to do visual design for a site and they are delivering their work in the form of a set of django-pattern-library templates. Using the documentation site (https://torchbox.github.io/django-pattern-library/) I've been able to install django-pattern-library and I can see their work in /pattern-library/. It looks very nice.
My problem is that it is not obvious how to actually use these pattern templates in my project. I think I figured out that you {% include %} the templates and pass in one or more objects:
{% include "patterns/components/image_block.html" image=img, caption=imgcaption, url=imgurl %}
It's quite possible that this is not what you do and I don't actually understand it!
I found this in the code snippet under the "Document your patterns" section of Usage Tips. The django-pattern-library documentation contains hardly any examples of usage, or maybe it does but it's not obvious that these are different from the examples of writing pattern templates themselves.
I would like to see at least a short example at the bottom of the "Getting Started" page, as well as a more detailed "Using DPL In Your DJango Site" page.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/guides/usage-tips.md and the existing Getting Started documentation, especially the linked “Document your patterns” example. Clarify how a Django site consumes pattern templates, then add a short Getting Started example and a more detailed “Using DPL In Your Django Site” guide that clearly distinguishes using patterns from writing them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100