Skip to content

Commit 7af7cf0

Browse files
bastbnlAdriaan
authored andcommitted
Template tag names are now more similar to the package name
1 parent efb12ee commit 7af7cf0

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Next use the `templatetag` in your template:
2525
<title>{% block page_title %}{{ site.name }}{% endblock %}</title>
2626
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
2727
...
28-
{% simple_analytics_sync %}
28+
{% simpleanalytics_sync %}
2929
...
3030
</head>
3131
<body>
32-
{% simple_analytics_noscript_block %}
32+
{% simpleanalytics_noscript_block %}
3333
</body>
3434
</html>
3535
```
@@ -57,27 +57,28 @@ This will translate to roughly this:
5757

5858
This app has four templatetags:
5959

60-
- simple_analytics_sync
61-
- simple_analytics_async
62-
- simple_analytics_noscript_block
63-
- simple_analytics_noscript_img
60+
- simpleanalytics_sync
61+
- simpleanalytics_async
62+
- simpleanalytics_noscript_block
63+
- simpleanalytics_noscript_img
6464

65-
`simple_analytics_sync` converts to a plain `<script>` tag without the `async`
65+
`simpleanalytics_sync` converts to a plain `<script>` tag without the `async`
6666
keyword.
6767

68-
`simple_analytics_async` converts to a plain `<script>` tag with the `async`
68+
`simpleanalytics_async` converts to a plain `<script>` tag with the `async`
6969
keyword.
7070

71-
`simple_analytics_noscript_block` converts to an `<noscript>` block which
71+
`simpleanalytics_noscript_block` converts to an `<noscript>` block which
7272
includes an `img` element which is used to load the image. Use this when you
7373
don't have and don't need a `<noscript>` block on your page at all.
7474

75-
`simple_analytics_noscript_img` converts to an `<img>` tag which src points to
75+
`simpleanalytics_noscript_img` converts to an `<img>` tag which src points to
7676
the hello.img. Use this when you're using a `<noscript>` block and you want to
7777
add privacy friendly stats to your page.
7878

7979
# Compatibility
8080

81-
Tested on Django 2.2.
81+
Tested on Django 2.2, but we think you should be able to run on any recent
82+
Django deployment. Please file an issue when it doesn't.
8283

8384

simpleanalytics/templatetags/simpleanalytics_tags.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
script=_script_element,
2828
)
2929
),
30-
name='simple_analytics_sync',
30+
name='simpleanalytics_sync',
3131
)
3232

3333

@@ -37,7 +37,7 @@
3737
script=_script_element,
3838
)
3939
),
40-
name='simple_analytics_async',
40+
name='simpleanalytics_async',
4141
)
4242

4343

@@ -48,7 +48,7 @@
4848
img=_img_element,
4949
),
5050
),
51-
name='simple_analytics_noscript_block',
51+
name='simpleanalytics_noscript_block',
5252
)
5353

5454
# Installs the simpleanalytics noscript pixel in an image element
@@ -58,5 +58,5 @@
5858
img=_img_element,
5959
),
6060
),
61-
name='simple_analytics_noscript_img',
61+
name='simpleanalytics_noscript_img',
6262
)

0 commit comments

Comments
 (0)