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

Example text_template including screenshot #79

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update README.md
Example text_template including screenshot
LHBL2003 authored Jul 15, 2024
commit db826dfde784945dec765f63aa04475f5d876e6f
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -39,7 +39,8 @@ Restart NetBox and add `netbox-qrcode` to your local_requirements.txt
The following options are available:

* `with_text`: Boolean (default True). Text label will be added to QR code image if enabled.
* `text_template`: Jinja2 template with {{ obj }} as context, using it ignores `text_fields` and `custom_text`. The following example shows the name and the site in two lines including labels:
* `text_template`: Jinja2 template with {{ obj }} as context, using it ignores `text_fields` and `custom_text`.
Example to output name and site in two lines with caption (See also screenshots below):
```
'text_template': 'Name: {{ obj.name }}\nSite: {{ obj.site }}',
```
@@ -156,3 +157,6 @@ Rack QR code

Cable QR code
![Cable QR Code](docs/img/qrcode_cable.png)

Device QR code via Jinja2 "text_template" Parameter (Multiline and labeled)
![Cable QR Code](docs/img/qrcode_text_template.png)