Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Mac files
.DS_Store

# python files
__pycache__/
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include README.rst
include setup.py

recursive-include recaptcha_mailhide/locale *
recursive-include recaptcha_mailhide/templates *
recursive-exclude * __pycache__
recursive-exclude * *.pyc
42 changes: 0 additions & 42 deletions README.md

This file was deleted.

44 changes: 44 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
reCAPTCHA Mailhide
==================

ReCAPTCHA Mailhide is an app for hiding mails from spammers. To use with
Django templates.

Installation
------------

Install using PIP

.. code:: sh

pip install django-recaptcha-mailhide

Add “recaptcha-mailhide” to your INSTALLED\_APPS setting like this:

.. code:: python

INSTALLED_APPS = (
...
'recaptcha_mailhide',
)

MAILHIDE_PUBLIC_KEY = "XXX"
MAILHIDE_PRIVATE_KEY = "XXX"

You can obtain public and private key for free via
http://www.google.com/recaptcha/mailhide/apikey

Usage
-----

First load it in Django template and use it as a filter.

.. code:: html+django

{% load mailhide %}
You can mail me at {{ "example@example"|mailhide }}

Credits
-------

Adapted from https://github.com/jbzdak/django-mailhide
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import base64
import binascii
from urllib.parse import urlencode

try:
from urllib.parse import urlencode
except ImportError: # python 2
from urllib import urlencode

from Crypto.Cipher import AES
from django.template.loader import render_to_string
Expand Down
42 changes: 42 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from setuptools import setup, find_packages

with open('README.rst') as fd:
README = fd.read()

CLASSIFIERS = [
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
]

setup(
author="Bartosz Gryszko",
author_email="[email protected]",
name="django-recaptcha-mailhide",
packages=find_packages(exclude=['docs']),
version='1.2',
description="ReCAPTCHA Mailhide is an app for hiding mails from spammers. To use with Django templates.",
long_description=README,
url='https://github.com/bgryszko/django-recaptcha-mailhide',
license='MIT',
platforms=['OS Independent'],
classifiers=CLASSIFIERS,
keywords= ['Django', 'ReCaptcha'],
include_package_data=True,
zip_safe=False,
install_requires=[
'Django>=1.10.0,<1.11',
'pycrypto>=2.6.1',
],
)