Giter Site home page Giter Site logo

almet / copanier Goto Github PK

View Code? Open in Web Editor NEW
23.0 3.0 10.0 1.21 MB

A minimalist collective buying software.

License: GNU General Public License v3.0

Python 49.05% CSS 15.56% HTML 33.83% Makefile 0.07% JavaScript 1.11% Dockerfile 0.37%
joint-buying-association delivery pay purchasing purchasing-system python community-buying food-hubs

copanier's Introduction

copanier's People

Contributors

almet avatar aurelienshz avatar dependabot-preview[bot] avatar encrypt94 avatar gwenael-f avatar indatwood avatar manu5801 avatar natim avatar thecapslock avatar vinyll avatar yohanboniface 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

Watchers

 avatar  avatar  avatar

copanier's Issues

Add a onInput pretty phone number

/* Handle nice phone number formatting */
function prettifyPhoneNumber() {
  var $phone = $(this)

  var phone = $phone.val()

  phone = phone.replace(/[^0-9]/g, '') // Only keep digits
  phone = (function addSpaces(phone) {
    if (phone.length <= 2) {
      return phone
    }
    return phone.substring(0, 2) + ' ' + addSpaces(phone.substring(2))
  }(phone))

  $phone.val(phone)
}

Change default values for the site

At some locations it says « epinamap » which is the group the original author belongs to, but we probably don't want to have this here.

Configure the app URL

Given the following nginx configuration:

server {

	listen 80;

	location /copanier/ {
	  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	  proxy_set_header X-Forwarded-Proto $scheme;
	  proxy_set_header X-Real-IP $remote_addr;
	  proxy_set_header Host $http_host;
	  proxy_pass http://127.0.0.1:2244/;
	  proxy_redirect off;

 	}
}

When I go to http://localhost/copanier/, the app redirects me to http://localhost/connexion?next=/ — instead of the expected http://localhost/copanier/connexion?next=/.

I'm not yet sure where the problem happens, in the app itself, or Nginx.

Support multiple groups

It could be cool that one instance of copanier handles multiple groups.

Also, we might need rework the wording here, to distinguish:

  • Ordering entity : A collection of persons that can place orders. It could be families or shared houses, for instance;
  • A cooperative : A collection of ordering entities.

I'm not sure about the naming here. Any help is appreciated :-)

Error when sending email?

Traceback (most recent call last):
File "/home/alexis/copanier/venv/lib/python3.7/site-packages/roll/init.py", line 77, in call
await handler(request, response, **request.route.vars)
File "/home/alexis/copanier/copanier/views/delivery.py", line 247, in place_order
group_id=orderer.group_id,
File "/home/alexis/copanier/copanier/emails.py", line 50, in send_order
group_id=group_id,
File "/home/alexis/copanier/copanier/emails.py", line 37, in send_from_template
send(to, subject, body=txt, html=html)
File "/home/alexis/copanier/copanier/emails.py", line 19, in send
return print("Sending email", str(body))
UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in position 162: ordinal not in range(256)

Rethink how products and producers are handled

Currently, they're part of the delivery, but we might want to put them in a separate location, like it's done for groups, so that we don't have to copy them on every delivery.

If we do this, we might want to enable / disable them on a delivery basis.
Also, when we do this, we might want to keep a record of the prices and availability of the products, related to a delivery, but I'm not sure how we should handle this.

Ideas?

Afficher clairement les étapes de fonctionnement

  1. Mise à jour des référent·es
  2. Mise à jour des prix (par les référent·es)
  3. Commande (par les groupes)
  4. Récupération des produits (par les référen·tes)
  5. Distribution
  6. Validation des produits récupérés
  7. Répartition des paiements
  8. Paiements

enhance packaging info

Maybe we should fold it, or we should put a sane default in this field (1?). Or just rename it to "ajuster le colisage", or something else? Ideas?

Enhance the readme

  • Is a configuration file needed?
  • Is there a database?
  • how to deploy this (wsgi / reverse HTTP proxy) ?

Unmatched ''"' when when decoding 'string'

I have a bug on a fresh install when I try to login. This is when using python 3.8.2.

Traceback (most recent call last):
  File "/workspace/.pip-modules/lib/python3.8/site-packages/roll/__init__.py", line 60, in __call__
    await handler(request, response, **request.route.vars)
  File "/workspace/copanier/copanier/views/login.py", line 38, in connexion
    response.html("login.html")
  File "/workspace/copanier/copanier/views/core.py", line 29, in html
    self.body = self.render_template(template_name, *args, **kwargs)
  File "/workspace/copanier/copanier/views/core.py", line 23, in render_template
    context["message"] = json.loads(self.request.cookies["message"])
ValueError: Unmatched ''"' when when decoding 'string'

Permit to disable to edit groups for non-admin user

Right now a non-admin can modify a group and edit the name and the list of members.
That's very much error prone for a newcomer.

If that's useful for some organisations, we should be able to disable from the config the access to that functionality.

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.