aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2019-09-10 17:57:03 +0200
committerWojciech Polak <polak@gnu.org>2019-09-10 17:57:03 +0200
commit6ee2cdd2573866484089da12a892ed1c888b5dc6 (patch)
tree1aa384a19c98e28c5e3a63f3b66a2d7418ed75f9
parentca0711ba17c457de6f8fba2c56e536c7f846dd2b (diff)
downloadglifestream-6ee2cdd2573866484089da12a892ed1c888b5dc6.tar.gz
glifestream-6ee2cdd2573866484089da12a892ed1c888b5dc6.tar.bz2
Upgrade codebase to Django 1.11
-rw-r--r--.gitignore5
-rw-r--r--AUTHORS2
-rw-r--r--INSTALL.md6
-rw-r--r--glifestream/apis/fb.py4
-rw-r--r--glifestream/apis/friendfeed.py4
-rw-r--r--glifestream/apis/twitter.py3
-rw-r--r--glifestream/bookmarklet/urls.py11
-rw-r--r--glifestream/gauth/models.py6
-rw-r--r--glifestream/gauth/templates/login.html4
-rw-r--r--glifestream/gauth/templates/openid.html4
-rw-r--r--glifestream/gauth/urls.py13
-rw-r--r--glifestream/gauth/views.py44
-rw-r--r--glifestream/settings-sample.py59
-rw-r--r--glifestream/stream/models.py13
-rw-r--r--glifestream/stream/views.py2
-rw-r--r--glifestream/templates/base.html8
-rw-r--r--glifestream/templates/stream-pure.html1
-rw-r--r--glifestream/templates/stream.atom2
-rw-r--r--glifestream/templates/stream.html4
-rw-r--r--glifestream/templates/stream.json2
-rw-r--r--glifestream/urls.py89
-rw-r--r--glifestream/usettings/templates/oauth.html2
-rw-r--r--glifestream/usettings/templates/oid.html4
-rw-r--r--glifestream/usettings/templates/pshb.html4
-rw-r--r--glifestream/usettings/templates/services.html2
-rw-r--r--glifestream/usettings/templates/settings.html12
-rw-r--r--glifestream/usettings/urls.py33
-rw-r--r--glifestream/usettings/views.py14
-rw-r--r--glifestream/utils/html.py13
-rw-r--r--requirements.txt9
30 files changed, 205 insertions, 174 deletions
diff --git a/.gitignore b/.gitignore
index d4ae399..fcdaf8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,11 @@
2*.pyc 2*.pyc
3*.pyo 3*.pyo
4*.mo 4*.mo
5*.iml
6.idea/
7pip-selfcheck.json
8pyvenv.cfg
9venv*/
5bin/ 10bin/
6include/ 11include/
7lib/ 12lib/
diff --git a/AUTHORS b/AUTHORS
index 16e8109..64be22d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,7 +1,7 @@
1Authors of gLifestream 1Authors of gLifestream
2====================== 2======================
3 3
4 Wojciech Polak (http://wojciechpolak.org/) 4 Wojciech Polak (https://wojciechpolak.org/)
5 5
6 6
7This software is shipped with a third-party icon sets and software 7This software is shipped with a third-party icon sets and software
diff --git a/INSTALL.md b/INSTALL.md
index 159b8ac..c651917 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,10 +1,10 @@
1gLifestream -- INSTALL 1gLifestream -- INSTALL
2Copyright (C) 2009-2015 Wojciech Polak 2Copyright (C) 2009-2019 Wojciech Polak
3 3
4gLifestream requirements 4gLifestream requirements
5======================== 5========================
6 6
7- Django 1.7 or later -- a Python Web framework (https://www.djangoproject.com/) 7- Django 1.11 -- a Python Web framework (https://www.djangoproject.com/)
8- A database supported by Django (e.g. MySQL, PostgreSQL). 8- A database supported by Django (e.g. MySQL, PostgreSQL).
9- Universal Feed Parser (https://pypi.python.org/pypi/feedparser) 9- Universal Feed Parser (https://pypi.python.org/pypi/feedparser)
10 10
@@ -98,7 +98,7 @@ Alias /static "/usr/local/django/glifestream/static"
98``` 98```
99 99
100More detailed information is available at: 100More detailed information is available at:
101http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango 101https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/
102 102
103See https://docs.djangoproject.com/en/dev/howto/deployment/ 103See https://docs.djangoproject.com/en/dev/howto/deployment/
104for usual Django applications deployment. 104for usual Django applications deployment.
diff --git a/glifestream/apis/fb.py b/glifestream/apis/fb.py
index 1c162cc..2e7cf6d 100644
--- a/glifestream/apis/fb.py
+++ b/glifestream/apis/fb.py
@@ -13,10 +13,10 @@
13# You should have received a copy of the GNU General Public License along 13# You should have received a copy of the GNU General Public License along
14# with this program. If not, see <http://www.gnu.org/licenses/>. 14# with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
16from django.conf import settings 16from django.utils.html import strip_tags
17from django.utils.html import strip_tags, strip_entities
18from django.template.defaultfilters import urlizetrunc 17from django.template.defaultfilters import urlizetrunc
19from glifestream.filters import expand, truncate 18from glifestream.filters import expand, truncate
19from glifestream.utils.html import strip_entities
20from glifestream.utils.time import from_rfc3339, mtime, now 20from glifestream.utils.time import from_rfc3339, mtime, now
21from glifestream.stream.models import Entry 21from glifestream.stream.models import Entry
22from glifestream.stream import media 22from glifestream.stream import media
diff --git a/glifestream/apis/friendfeed.py b/glifestream/apis/friendfeed.py
index 2bed88c..03bf78f 100644
--- a/glifestream/apis/friendfeed.py
+++ b/glifestream/apis/friendfeed.py
@@ -15,11 +15,11 @@
15 15
16import re 16import re
17import datetime 17import datetime
18from django.utils.html import strip_tags, strip_entities 18from django.utils.html import strip_tags
19from glifestream.filters import truncate 19from glifestream.filters import truncate
20from glifestream.gauth import gls_oauth 20from glifestream.gauth import gls_oauth
21from glifestream.utils.time import mtime, now 21from glifestream.utils.time import mtime, now
22from glifestream.utils.html import bytes_to_human 22from glifestream.utils.html import bytes_to_human, strip_entities
23from glifestream.stream.models import Entry 23from glifestream.stream.models import Entry
24from glifestream.stream import media 24from glifestream.stream import media
25 25
diff --git a/glifestream/apis/twitter.py b/glifestream/apis/twitter.py
index 57cfb29..61f1701 100644
--- a/glifestream/apis/twitter.py
+++ b/glifestream/apis/twitter.py
@@ -15,9 +15,10 @@
15 15
16import datetime 16import datetime
17from django.utils.encoding import force_text 17from django.utils.encoding import force_text
18from django.utils.html import strip_tags, strip_entities 18from django.utils.html import strip_tags
19from glifestream.filters import expand, truncate, twyntax 19from glifestream.filters import expand, truncate, twyntax
20from glifestream.gauth import gls_oauth 20from glifestream.gauth import gls_oauth
21from glifestream.utils.html import strip_entities
21from glifestream.utils.time import mtime, now 22from glifestream.utils.time import mtime, now
22from glifestream.stream.models import Entry 23from glifestream.stream.models import Entry
23from glifestream.stream import media 24from glifestream.stream import media
diff --git a/glifestream/bookmarklet/urls.py b/glifestream/bookmarklet/urls.py
index 8611725..7f962ac 100644
--- a/glifestream/bookmarklet/urls.py
+++ b/glifestream/bookmarklet/urls.py
@@ -13,11 +13,10 @@
13# You should have received a copy of the GNU General Public License along 13# You should have received a copy of the GNU General Public License along
14# with this program. If not, see <http://www.gnu.org/licenses/>. 14# with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
16from django.conf.urls import patterns, url 16from django.conf.urls import url
17from glifestream.bookmarklet import views 17from glifestream.bookmarklet import views
18 18
19urlpatterns = patterns( 19urlpatterns = [
20 '', 20 url(r'js$', views.js),
21 (r'js$', views.js), 21 url(r'frame$', views.frame),
22 (r'frame$', views.frame), 22]
23)
diff --git a/glifestream/gauth/models.py b/glifestream/gauth/models.py
index 7e0e5d4..a49e81b 100644
--- a/glifestream/gauth/models.py
+++ b/glifestream/gauth/models.py
@@ -22,8 +22,8 @@ from glifestream.stream.models import Service
22 22
23@python_2_unicode_compatible 23@python_2_unicode_compatible
24class OAuthClient (models.Model): 24class OAuthClient (models.Model):
25 service = models.ForeignKey(Service, verbose_name=_('Service'), 25 service = models.OneToOneField(Service, on_delete=models.CASCADE, verbose_name=_('Service'),
26 null=False, blank=False, unique=True) 26 null=False, blank=False, unique=True)
27 identifier = models.CharField('Identifier', max_length=64, null=False, 27 identifier = models.CharField('Identifier', max_length=64, null=False,
28 blank=False) 28 blank=False)
29 secret = models.CharField('Secret', max_length=128, null=False, 29 secret = models.CharField('Secret', max_length=128, null=False,
@@ -49,7 +49,7 @@ class OAuthClient (models.Model):
49 49
50@python_2_unicode_compatible 50@python_2_unicode_compatible
51class OpenId (models.Model): 51class OpenId (models.Model):
52 user = models.ForeignKey(User, db_index=True) 52 user = models.ForeignKey(User, on_delete=models.CASCADE, db_index=True)
53 identity = models.CharField(_('Identity'), max_length=128, null=False, 53 identity = models.CharField(_('Identity'), max_length=128, null=False,
54 blank=False) 54 blank=False)
55 55
diff --git a/glifestream/gauth/templates/login.html b/glifestream/gauth/templates/login.html
index da09087..87def5d 100644
--- a/glifestream/gauth/templates/login.html
+++ b/glifestream/gauth/templates/login.html
@@ -1,12 +1,12 @@
1{% extends "base.html" %} 1{% extends "base.html" %}
2{% load i18n %}{% load url from future %} 2{% load i18n %}
3 3
4{% block main %} 4{% block main %}
5<section id="login"> 5<section id="login">
6 6
7<div id="loginbox"> 7<div id="loginbox">
8{% if form.errors %}<p class="error">{% trans "Invalid username or password" %}</p>{% endif %} 8{% if form.errors %}<p class="error">{% trans "Invalid username or password" %}</p>{% endif %}
9<form name="loginform" method="post" action="{% url 'glifestream.gauth.views.login' %}"> 9<form name="loginform" method="post" action="{% url 'login' %}">
10 <p>