Changeset - 60010999d25f
[Not reviewed]
0 8 0
Ben Sturmfels (bsturmfels) - 8 months ago 2023-09-07 12:59:23
ben@sturm.com.au
Remove use of python3-future
8 files changed with 37 insertions and 26 deletions:
0 comments (0 inline, 0 general)
README.md
Show inline comments
 
Software Freedom Conservancy website
 
====================================
 

	
 

	
 
Contributing
 
============
 
------------
 

	
 
The canonical location for this repository is [on Conservancy’s
 
Kallithea instance](http://k.sfconservancy.org/website).  Copies of
 
Kallithea instance](https://k.sfconservancy.org/website).  Copies of
 
this repository elsewhere, such as Github, are for backup purposes
...
 
@@ -8,4 +12,5 @@ only..
 

	
 

	
 
License
 
=======
 
-------
 

	
...
 
@@ -19,7 +24,8 @@ The content and text (such as the HTML files) is currently
 

	
 
Server Configuration
 
====================
 

	
 
conservancy's webserver runs on a machine called
 
dogwood.sfconservancy.org, which is a standard Debian installation.
 
Server configuration
 
--------------------
 

	
 
conservancy's webserver runs on a machine called aspen.sfconservancy.org, which
 
is a standard Debian installation.
 

	
...
 
@@ -28,8 +34,7 @@ squeeze install:
 

	
 
    $ aptitude install python-django apache2 sqlite3 python2.5-sqlite libapache2-mod-python
 

	
 
    $ aptitude install python-django apache2 sqlite3 python3-sqlite libapache2-mod-wsgi-py3
 

	
 

	
 
Django Setup
 
============
 
Django setup
 
------------
 

	
...
 
@@ -38 +43,16 @@ Django Setup
 
   PYTHON_PATH.
 

	
 

	
 
Local development
 
---------
 

	
 
    python3 -m pip install -r requirements.txt
 
    cd www
 
    python manage.py runserver
 

	
 
Deploying
 
---------
 

	
 
Changes pushed to the https://k.sfconservancy.org/website repository are
 
automatically deployed to the production website by the `conservancy-www-update`
 
SystemD timer. See `systemd/conservancy-www-update.timer` for details.
requirements.txt
Show inline comments
...
 
@@ -4,3 +4,2 @@ soupsieve==1.9.6
 
html5lib==0.999999999
 
future
 

	
www/conservancy/__init__.py
Show inline comments
 
from past.builtins import basestring
 
from builtins import object
...
 
@@ -5,3 +4,2 @@ import hashlib
 
from django.conf import settings
 
from django.template import RequestContext
 

	
...
 
@@ -11,2 +9,3 @@ from django.shortcuts import render as render_template_with_context
 

	
 

	
 
class ParameterValidator(object):
...
 
@@ -19,3 +18,3 @@ class ParameterValidator(object):
 
        self.hasher = hashlib.sha256(seed)
 
        if isinstance(self.given_hash, basestring):
 
        if isinstance(self.given_hash, str):
 
            self.hash_type = type(self.given_hash)
www/conservancy/apps/blog/models.py
Show inline comments
 
from future import standard_library
 
standard_library.install_aliases()
 
from builtins import object
www/conservancy/apps/fundgoal/models.py
Show inline comments
 
from __future__ import division
 
from past.utils import old_div
 
from builtins import object
...
 
@@ -7,2 +6,3 @@ from django.db import models
 

	
 

	
 
class FundraisingGoal(models.Model):
...
 
@@ -21,4 +21,4 @@ class FundraisingGoal(models.Model):
 
    def percentage_there(self):
 
        return (old_div(self.fundraiser_so_far_amount, self.fundraiser_goal_amount) ) * 100
 
    
 
        return self.fundraiser_so_far_amount / self.fundraiser_goal_amount * 100
 

	
 
    class Meta(object):
www/conservancy/apps/news/models.py
Show inline comments
 
from future import standard_library
 
standard_library.install_aliases()
 
from builtins import object
www/conservancy/apps/news/templatetags/fill_url.py
Show inline comments
 
from future import standard_library
 
standard_library.install_aliases()
 
from builtins import zip
www/conservancy/middleware.py
Show inline comments
 
from builtins import object
 
from future.utils import raise_
 
from django import http
...
 
@@ -31,3 +30,3 @@ class ForceCanonicalHostnameMiddleware(object):
 
            if settings.DEBUG and request.method == 'POST':
 
                raise_(RuntimeError, "You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to %s%s (note the trailing slash), or set APPEND_SLASH=False in your Django settings." % (new_url[0], new_url[1]))
 
                raise(RuntimeError, "You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to %s%s (note the trailing slash), or set APPEND_SLASH=False in your Django settings." % (new_url[0], new_url[1]))
 
        # Strip trailing index.html
0 comments (0 inline, 0 general)