Git Product home page Git Product logo

hackspace-foundation-sites's Introduction

This is the source code for the London Hackspace web site

Getting Started

We use Vagrant to deploy a consistent development environment. To get your development environment set up:

  • Clone this repo
  • Fetch libraries:
git submodule update --init
  • Create config file (the defaults are fine):
cp etc/config.php.example etc/config.php
  • Create production settings file (the defaults are fine):
cp lhs/production_settings.py.example lhs/production_settings.py
  • Install Vagrant and Virtualbox
  • To create and configure a virtual machine run in this directory
vagrant up

You should now be able to connect to http://localhost:8000 to view your development site. Changes you make on your machine will be reflected on the VM.

If you need to log into the VM for any reason, you can just run

vagrant ssh

To access the postgres database, run from the SSH shell

psql hackspace

Making yourself an admin

In the postgres shell:

hackspace=# update users set subscribed=True;
hackspace=# update users set admin=True;

to make yourself a member and an admin

letting apache add ldap users (!)

use visudo to add this:

www-data ALL=(www-data:ldapadmin) NOPASSWD:NOSETENV: /var/www/hackspace-foundation-sites/bin/ldap-add.sh, /var/www/hackspace-foundation-sites/bin/ldap-delete.sh

and then:

groupadd ldapadmin
chgrp ldapadmin /etc/smbldap-tools/smbldap_bind.conf
chmod 0640 /etc/smbldap-tools/smbldap_bind.conf

Enabling Calendar management

  1. Enable the Calendar API at https://console.developers.google.com/.../apiui/api
  2. Create a service account for OAuth at https://console.developers.google.com/.../apiui/credential
  3. Put the OAuth certificate in ./var, and correct the service_account_name and key_file_location in lib/calendar.php
  4. Go to the Hackspace calendar on Google and share it with the same service_account_name address

API documentation https://developers.google.com/api-client-library/php/

Upgrading from PHP

Add to cron:

0 4 * * *  www-data  /var/www/hackspace-foundation-sites/manage.sh clearsessions

After setting the credentials appropriately and taking a backup, run:

env/bin/python manage.py migrate main 0001 --fake-initial
env/bin/python manage.py migrate sites
env/bin/python manage.py migrate

And then run in the following SQL files:

  • etc/create-flourish-tables.sql
  • etc/restore-column-defaults.sql
  • etc/restore-multicolumn-pks.sql

And don't forget to run:

env/bin/python manage.py collectstatic

after each deployment.

Running under docker

This is a work-in-progress, but likely to take over from Vagrant quickly.

docker-compose up

To clear out the database and PHP sessions:

docker-compose down -v

To access the DB:

docker-compose exec db psql postgres://hackspace:hackspace@db/hackspace

hackspace-foundation-sites's People

Contributors

ajamesphillips avatar alexmuller avatar chixor avatar chrislo avatar darigovresearch avatar dekstop avatar fahadsadah avatar gausie avatar jasiek avatar jasperwallace avatar jonhodgson avatar jonty avatar maciejgryka avatar marksteward avatar marrold avatar mentarus avatar mich181189 avatar montyphy avatar oskarpearson avatar padski avatar paullessing avatar russss avatar teabot avatar tgreer avatar theorbtwo avatar timrterrible avatar tisdragos avatar tolland avatar yamatt avatar zymurgic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hackspace-foundation-sites's Issues

Bug in Profiles: member interest list

On the view profile page adding 'aerospace' creates a duplicate 'Special interests' category. Need to fix the ordering of buildInterests function.

Better Homepage

The Hackspace homepage needs to represent the community more, whilst remaining nicely designed:

  • Clear call-to-action (Come on a Tuesday, join the list/follow twitter/like us on FB, become a member)
  • Twitter/Facebook feed, perhaps more Flickr content
  • More info about how to interact with the community
  • Upcoming events?

I wouldn't be averse to widening it a little. I hear all the cool kids are talking about 960px these days.

Pledges System

Would be nice for people to be able to create pledges, call them in, and nag people who don't pay up.

Expenses claim system

Allow members to submit expense claims (with attachments), and provide an easy way of tracking and approving them.

Storage System bugs

  • Description field should be 2,000 char (I'll need to dump the projects table and recreate it as sqlite doesn't support ALTER TABLE MODIFY COLUMN)
  • Name field should be re-labelled Project Name (people keep putting in their own names here)
  • Instant auto approval should be 2hr delay
  • Look into why cron emails aren't appearing on mailing list (passed deadline emails not showing up)
  • Add member name to requests list (would be nice to easily see if a member already has a request in the list)
  • Instead of switching from 'Approved' to 'Passed Deadline' with the option to extend, projects should pass directly from 'Approved' to 'Extended' then 'Passed Deadline' once the extension is exhausted. The nagging emails should be enough for the owner to understand what's happening without having to explicitly click the 'Extend Deadline' button.

Capture a "level of commercialism" for storage requests

Dean's suggested adding an informational field for whether the project is:

  • personal
  • academic
  • material paid for
  • time and material paid for
  • being done through a registered company

https://groups.google.com/d/msg/london-hack-space/uRr099hr1tM/YPvem52E1goJ

Responses suggested that it might be difficult to keep people from making this a deciding factor, and that it might be a good idea to wait for a bit to see whether this is still a tension in a couple of months.

Perhaps it should be stored by not exposed on the website/mailing list, as a way to check back in the future.

RFID Entry Management

We want access cards to be managed automatically though the membership system. This requires:

  • A way for users to add and manage a number of RFID card IDs (strings) attached to their account.
  • A secure way for Doorbot to retrieve the list of card IDs associated with active members.
  • An easy app to run on Lovelace for people to add their cards to the DB.

Move from sqlite3 to postgres

Realistically all our systems are going to be running Postgres, and sqlite3 is annoying sometimes with locking. This does make the dev environment setup process slightly more involved, but I think it's worth it.

Event ticketing system

Be able to ticket our own events, and accept payment via PayPal IPN or bank transfer using the existing reconciliation method.

Website is difficult to use on a mobile device

Specifically the login button is tiny and navigating to the padlock code is fiddly. Other links such as irc or wiki are also difficult to trigger.

I propose replacing the 960grid css library with the more recent Twitter Bootstrap responsive library which is also based on a 960 grid layout. It handles the most common device sizes and font size requirements by default with industry standard media queries.

I plan to do this soon, just documenting the issue which justifies the branch.

Support for yearly membership payments

  • User should be able to specify a yearly payment instead of monthly in their account settings
  • This should increase that user's minimum to £60, and cause them to get 12 months of subscription for it.
  • Paying more money should not extend the membership unless it's due for renewal.

Reconciliation by a specific payment reference

Because Hackspace is on the same Barclays banking login as my personal account, I am unable to send a reference with my payment. It comes in with a reference of "GARRETT RD xxxxxx yyyyyyyy STO" (where xxx and yyy are my sort code and account number).

The reconciliation system should support reconciling payments by a hash of the reference string, so my membership shows up correctly.

Send reminder email

Send an email when we're sure membership is going to expire, and only unsubscribe after giving a little while for that to be rectified.

LDAP todo

  • Block usernames like root, postmaster etc. [done]
  • Look into making it work without root access (special ldap group?). - needs more patches to the smbldap-tools
  • maybe option to add email and name to ldap too?
  • modify the ruby script to disable and enable people. [done]
  • for ^-- add ldapusername and the password hashes to the sqlite db [done]

Edit membership page asks if members live in LB Hackney

The edit membership page asks users if they live in the London Borough of Hackney. This is no longer relevant, as the new space is in the London Borough of Hackney. It could either be removed, or replaced by a similar box indicating whether or not they live in Tower Hamlets.

Garbled email headers causing decoding problems for some clients

This affects especially the password reset emails (from inkey):

Subject: London Hackspace Password Reset
Date: Thu, 1 Mar 2012 13:54:55 +0100
From: London Hackspace <[email protected]>
To: <snipped>

Message-ID: <[email protected]>

MIME-Version: 1.0

Content-Type: text/plain; charset=utf-8

Content-Transfer-Encoding: quoted-printable
Date: Thu,  1 Mar 2012 12:54:36 +0000 (UTC)

Hi <snipped>,=0D=0A=0D=0AYou (or someone pretending to be you)=

=20requested a password reset for your=0D=0ALondon Hackspace account. To=20=

reset your password, go to this address:=0D=0A=0D=0Ahttp://london.hackspace=

.org.uk/passwordreset.php?token=3D<snipped>=0D=0A=0D=0AIf you don't=

=20want to reset your password, just ignore this email.=0D=0A=0D=0ACheers,=

=0D=0A=0D=0AThe London Hackspace email monkey=0D=0A

GoCardless support

We'd like to accept direct debits as membership payments using GoCardless in order to remove the unreliability of standing orders and make it easier to set up a payment.

We should do this using GoCardless's pre-authorisation/billing flow, which does not set a fixed payment amount per month, so members can easily change their membership payment on our site without cancelling and re-creating the payment plan. It also allows us to potentially charge for consumables or other services using the same method in the future.

This will mean we need to initiate the bill from our system for every member each month.

We will need to move the logic used to subscribe members and send new-member and expiry emails out of the existing ruby reconciliation system and into PHP, so we can share this code between bank transfer and direct debit payments.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.