Skip to content

Commit

Permalink
Show README.md on pypi.org and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaandotcom committed May 22, 2019
1 parent 5317d21 commit a14f3ad
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/*
dist/*
simpleanalytics.egg-info
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# simpleanalytics for Django
# Simple Analytics for Django

Want privacy friendly analytics for Django? You're at the right place.

> You need an account [on Simple Analytics](https://simpleanalytics.com) to see your stats collected by this plugin.
# Installing it

Install the plugin:

`pip install django-simpleanalytics`

# Using it

Add the package to the `INSTALLED_APPS`:
```python
```python
INSTALLED_APPS = [
...,
simpleanalytics,
]
```

Next use the `templatetag` in your template:
```

```
<!DOCTYPE html>
{% load staticfiles simpleanalytics_tags %}
<html>
Expand Down Expand Up @@ -60,25 +66,25 @@ This app has four templatetags:
- simpleanalytics_sync
- simpleanalytics_async
- simpleanalytics_noscript_block
- simpleanalytics_noscript_img
- simpleanalytics_noscript_img

`simpleanalytics_sync` converts to a plain `<script>` tag without the `async`
keyword.
keyword.

`simpleanalytics_async` converts to a plain `<script>` tag with the `async`
keyword.
keyword.

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

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

# Compatibility

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


11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"""
from setuptools import setup

with open("README.md", "r") as fh:
long_description = fh.read()

setup(
name='simpleanalytics',
Expand All @@ -32,9 +34,12 @@
"Framework :: Django :: 2.1",
"Framework :: Django :: 2.2",
],
version='1.0.2',
description='simpleanalytics templatetags for Django',
version='1.0.3',
description='Simple Analytics template tags for Django',
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/simpleanalytics/django-plugin",
packages=['simpleanalytics', 'simpleanalytics.templatetags', ],
author='simpleanalytics.io',
author='Simple Analytics',
author_email='support@mail.simpleanalytics.io',
)
2 changes: 1 addition & 1 deletion simpleanalytics/templatetags/simpleanalytics_tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
(c) 2019 by simpleanalytics.io. All rights reserved
(c) 2019 Simple Analytics. All rights reserved.
This program is distributed in the hope that it will be useful, but is provided AS IS with ABSOLUTELY NO WARRANTY;
The entire risk as to the quality and performance of the program is with you. Should the program prove defective,
Expand Down

0 comments on commit a14f3ad

Please sign in to comment.