Skip to content

Commit

Permalink
Merge pull request #12 from nickatnight/develop
Browse files Browse the repository at this point in the history
merging 'develop' into master
  • Loading branch information
nickatnight committed Mar 13, 2021
2 parents 4133fea + ab66952 commit 3d953ee
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -19,7 +19,7 @@ var/
.installed.cfg
*.egg
demo/django_spam

.vscode
*.sqlite3

# Installer logs
Expand Down
43 changes: 21 additions & 22 deletions .travis.yml
@@ -1,42 +1,41 @@
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
env:
- DJANGO=1.8.*
- DJANGO=1.9.*
- DJANGO=1.10.*
- DJANGO=1.11.*
- DJANGO=2.0.*
- DJANGO=2.1.*
- DJANGO=2.2.*
- DJANGO=3.0.*
- DJANGO=3.1.*
matrix:
exclude:
- python: 2.7
env: DJANGO=2.0.*
- python: 2.7
- python: 3.4
env: DJANGO=2.1.*
- python: 2.7
- python: 3.4
env: DJANGO=2.2.*
- python: 3.4
env: DJANGO=2.1.*
env: DJANGO=3.0.*
- python: 3.4
env: DJANGO=3.1.*
- python: 3.5
env: DJANGO=3.0.*
- python: 3.5
env: DJANGO=3.1.*
- python: 3.8
env: DJANGO=2.0.*
- python: 3.8
env: DJANGO=2.1.*
- python: 3.9
env: DJANGO=2.0.*
- python: 3.9
env: DJANGO=2.1.*
- python: 3.9
env: DJANGO=2.2.*
- python: 3.6
env: DJANGO=1.8.*
- python: 3.6
env: DJANGO=1.9.*
- python: 3.6
env: DJANGO=1.10.*
- python: 3.7
env: DJANGO=1.8.*
- python: 3.7
env: DJANGO=1.9.*
- python: 3.7
env: DJANGO=1.10.*
install:
- pip install -q Django==$DJANGO
- pip install coveralls
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2018 Tivix, Inc.
Copyright (c) 2021 Tivix, Inc.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
26 changes: 15 additions & 11 deletions README.md
@@ -1,6 +1,12 @@
django_spam
django-spam
===========

<p align="center">
<a href="https://travis-ci.org/nickatnight/django-spam"><img alt="Build Status" src="https://travis-ci.org/nickatnight/django-spam.svg?branch=master"></a>
<a href="https://coveralls.io/github/nickatnight/django-spam?branch=master"><img alt="Coverage Status" src="https://coveralls.io/repos/github/nickatnight/django-spam/badge.svg?branch=master"></a>
<a href="https://github.com/Tivix/django-spam/releases"><img alt="Release Status" src="https://img.shields.io/github/v/release/Tivix/django-spam"></a>
</p>

![alt text](https://media.giphy.com/media/Mr8Gr9ejR0OpW/giphy.gif "django_spam")

Inspired by this Nick Craver tweet https://twitter.com/nick_craver/status/720062942960623616
Expand All @@ -10,17 +16,15 @@ solution for your django application. django_spam simply adds common admin urls
for that matter) try and access them, they will get redirected...


[![Build Status](https://travis-ci.org/nickatnight/django-spam.svg?branch=master)](https://travis-ci.org/nickatnight/django-spam)
[![Coverage Status](https://coveralls.io/repos/github/nickatnight/django-spam/badge.svg?branch=master)](https://coveralls.io/github/nickatnight/django-spam?branch=master)

| | Django 2.0 | Django 2.1 | Django 2.2 | Django 3.0 | Django 3.1 |
| -- | -- | -- | -- | -- | -- |
| Python 3.4 | :heavy_check_mark: | | | | |
| Python 3.5 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | |
| Python 3.6 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Python 3.7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Python 3.8 | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Python 3.9 | | | | :heavy_check_mark: | :heavy_check_mark: |

| | Django 1.8 | Django 1.9 | Django 1.10 | Django 1.11 | Django 2.0 | Django 2.1 | Django 2.2 |
| -- | -- | -- | -- | -- | -- | -- | -- |
| Python 2.7 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | |
| Python 3.4 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | |
| Python 3.5 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Python 3.6 | | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Python 3.7 | | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

To install:
```python
Expand Down
4 changes: 2 additions & 2 deletions demo/requirements.pip
@@ -1,2 +1,2 @@
django>=1.8
django_spam>=0.3
django>=2.0
django_spam>=1.0.0
6 changes: 5 additions & 1 deletion django_spam/__init__.py
Expand Up @@ -60,7 +60,11 @@
# wii theme music
'https://www.youtube.com/watch?v=Twi92KYddW4',
# nyan cat
'https://www.youtube.com/watch?v=wZZ7oFKsKzY'
'https://www.youtube.com/watch?v=wZZ7oFKsKzY',
# ASMR
"https://www.youtube.com/watch?v=jbAy9MwBR-I",
# he-man heyeayea
"https://www.youtube.com/watch?v=eh7lp9umG2I"
]

# check if any settings vars have been included to add to the
Expand Down
7 changes: 1 addition & 6 deletions django_spam/urls.py
@@ -1,10 +1,5 @@
from __future__ import absolute_import

from django.conf import settings
try:
from django.urls import re_path as url # Django >= 2.0
except ImportError:
from django.conf.urls import url # Django < 2.0
from django.urls import re_path as url # Django >= 2.0

from django_spam import SPAM_ROUTES
from django_spam.views import ten_hours
Expand Down
13 changes: 5 additions & 8 deletions django_spam/utils.py
@@ -1,4 +1,3 @@
# utils.py


class Colour(object):
Expand All @@ -18,15 +17,13 @@ def __init__(self):
raise NotImplementedError

@classmethod
def text(cls, txt, status=None):
"""
Colorize specific text
def text(cls, txt: str, status: str = None) -> str:
"""colorize specific text
@txt: text printed to console
@status: the type of status depends on the color
:param txt: text printed to console
:param status: the type of status depends on the color
returns:
colorized text string
:return: colorized text string
"""
if status == 'fail':
return cls.FAIL + txt + cls.ENDC
Expand Down
9 changes: 4 additions & 5 deletions setup.py
Expand Up @@ -21,7 +21,7 @@

setup(
name='django_spam',
version='0.4.2',
version='1.0.0',
author='Nick Kelly',
author_email='nick.kelly@tivix.com',
url='http://github.com/Tivix/django-spam',
Expand All @@ -35,16 +35,15 @@
py_modules=['django_spam'],
test_suite='runtests.runtests',
install_requires=[
'Django>=1.8.0',
'Django>=2.0.0',
],
classifiers=[
'Framework :: Django',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
Expand Down

0 comments on commit 3d953ee

Please sign in to comment.