Giter Club home page Giter Club logo

lenuage's Introduction

Build Status

laboîte

Django web app of the laboîte project https://github.com/laboiteproject/laboite-maker/wiki

Getting Started

Make sure you are using a virtual environment of some sort (e.g. virtualenv or pyenv) and the following packages are installed :

  • python3
  • python3-dev
  • python3-pip
  • libxslt1-dev
  • libxml2-dev
  • zlib1g-dev
  • libjpeg-dev
  • libgif-dev
  • libpng-dev
  • libgnutls28-dev

For exemple on Debian based distributions, use:

apt install python3 python3-dev python3-pip libxslt1-dev libxml2-dev zlib1g-dev libjpeg-dev libgif-dev libpng-dev libgnutls28-dev 
pip3 install -r requirements.txt
python3 ./manage.py migrate
python3 ./manage.py loaddata sites
python3 ./manage.py createsuperuser
python3 ./manage.py runserver

You can then connect to the admin on http://127.0.0.1:8000/admin with the super user you created above.

lenuage's People

Contributors

vrialland avatar bgaultier avatar magopian avatar dependabot[bot] avatar flaghost avatar natim avatar pimouss1305 avatar

Stargazers

 avatar olivier MARGRIT avatar Julien Morin avatar  avatar Jean-Baptiste Braun avatar bestel avatar Alberto Labarga avatar  avatar  avatar

Watchers

 avatar  avatar James Cloos avatar

lenuage's Issues

when configuring an app, it should update straight away

Imagine you want to add (configure) a new app for your boite, it won't update before the delay has been elapsed (for example 10 minutes).

It should instead update straight away, and then only wait for the delay before the next update..

Update Dockerfile

  • Use an updated Debian (or other) version
  • Add volume to mount local sources
  • Use new project name
  • Use docker-compose with postgres?

Erreur pendant la compilation

Bonjour,
Pendant la compilation j'ai les erreurs suivantes qui apparaissent:

Arduino : 1.8.12 (Windows 10), Carte : "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:110:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

StaticJsonBuffer<1024> jsonBuffer;

       ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:254:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

StaticJsonBuffer<1024> jsonBuffer;

       ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp: In member function 'void Lenuage::updateBuffer()':

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:110:19: error: expected primary-expression before '<' token

StaticJsonBuffer<1024> jsonBuffer;

               ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:110:26: error: 'jsonBuffer' was not declared in this scope

StaticJsonBuffer<1024> jsonBuffer;

                      ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:113:13: error: 'ArduinoJson::JsonObject' has no member named 'success'

if (!root.success()) {

         ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:129:33: error: invalid initialization of non-const reference of type 'ArduinoJson::JsonArray& {aka ArduinoJson6152_0000010::ArrayRef&}' from an rvalue of type 'ArduinoJson6152_0000010::enable_if<true, ArduinoJson6152_0000010::MemberProxy<ArduinoJson6152_0000010::ObjectRef, const char*> >::type {aka ArduinoJson6152_0000010::MemberProxy<ArduinoJson6152_0000010::ObjectRef, const char*>}'

JsonArray& data = root["tiles"];

                             ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:131:29: error: invalid initialization of reference of type 'ArduinoJson::JsonObject& {aka ArduinoJson6152_0000010::ObjectRef&}' from expression of type 'ArduinoJson6152_0000010::VariantRef'

 JsonObject& tile_data = tile;

                         ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp: In member function 'void Lenuage::updateTile(int)':

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:254:19: error: expected primary-expression before '<' token

StaticJsonBuffer<1024> jsonBuffer;

               ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:254:26: error: 'jsonBuffer' was not declared in this scope

StaticJsonBuffer<1024> jsonBuffer;

                      ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:257:13: error: 'ArduinoJson::JsonObject' has no member named 'success'

if (!root.success()) {

         ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:273:33: error: invalid initialization of non-const reference of type 'ArduinoJson::JsonArray& {aka ArduinoJson6152_0000010::ArrayRef&}' from an rvalue of type 'ArduinoJson6152_0000010::enable_if<true, ArduinoJson6152_0000010::MemberProxy<ArduinoJson6152_0000010::ObjectRef, const char*> >::type {aka ArduinoJson6152_0000010::MemberProxy<ArduinoJson6152_0000010::ObjectRef, const char*>}'

JsonArray& data = root["items"];

                             ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:275:29: error: invalid initialization of reference of type 'ArduinoJson::JsonObject& {aka ArduinoJson6152_0000010::ObjectRef&}' from expression of type 'ArduinoJson6152_0000010::VariantRef'

 JsonObject& item_data = item;

                         ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:314:38: error: 'ArduinoJson6152_0000010::enable_if<true, ArduinoJson6152_0000010::MemberProxy<ArduinoJson6152_0000010::ObjectRef, const char*> >::type' has no member named 'asString'

   content = item_data["content"].asString();

                                  ^

C:\Program Files (x86)\Arduino\libraries\Redgick_Laboite-master\Redgick_Laboite.cpp:318:39: error: 'ArduinoJson6152_0000010::enable_if<true, ArduinoJson6152_0000010::MemberProxy<ArduinoJson6152_0000010::ObjectRef, const char*> >::type' has no member named 'asString'

   String type = item_data["type"].asString();

                                   ^

Plusieurs bibliothèque trouvées pour "ArduinoJson.h"
Utilisé : C:\Users\Guilhem\Documents\Arduino\libraries\ArduinoJson
Non utilisé : C:\Program Files (x86)\Arduino\libraries\ArduinoJson-5.x
exit status 1
Erreur de compilation pour la carte NodeMCU 1.0 (ESP-12E Module)

Security on boites and apps

Currently you can edit boites, edit apps and delete boites even if it's not yours as long as you have their id.

Renew Facebook token

We need to configure a long live page token that would allow public page fetching.

Update tiles asynchronously

Currently, apps are updated only if tiles endpoint is called, and in this case all apps are updated sequentially (see #70). A better solution would be to use a scheduler to update the apps if needed in the background, with Celery for example.

Add a minute to the clock

By the time it arrives on my box, it is almost already 1 minute late.
Maybe we should let it configurable in the clock app. (TimeDelta)

Add a plugin to follow tides

I'd like to select a city and see the hours and coefficient of the next tide as well as the current way and speed of it.

For instance:

Lorient - ↗ 3/12 — 17:57 — 96

The default api_key only changes after a server restart

If you look at line https://github.com/bgaultier/laboitepro/blob/774b63846ed372912ad5d37bf4a902eb3cfa0c30/boites/models.py#L19 there's a few issues:
1/ the uuid is only generated once, when the server starts (and the code is loaded)
2/ the field is not unique=True to prevent adding multiple "boites" with the same key
3/ as the default value is generated on each "code load", it changes on each makemigrations command, creating a new migration each time for the boites.models.Boite model
4/ truncating an uuid4 might lead to uid clashes, is there a limitation that needs this truncation? (For example, if the uid needs to be entered by hand somewhere?)

App folders, architecture and organisation

Following @vrialland's comment, here are a few ideas in no particular order:

1/ move all the app_* folders in an apps subfolder to prevent clutter
2/ categorize the apps, using a taxonomy, eg: Transportation > Bike
3/ organize apps by location (eg Rennes, Paris...), and then display all the APIs/Providers available for such location (time, weather, STAR...)
4/ organize apps by APIs/Providers (eg STAR, Velib, ratp...), and then display all the data available for such APIs/Providers (bus, tram, bike, subway...)
5/ tag applications in a very loose manner (eg "star rennes bus"), and have a full text search that can list the applications that might be interesting for a given subject

Maybe writing user stories might help to find other ideas? Example of a user story:

  • As a new user of "la boite", I am presented with a list of relevant apps when I connect to the admin and it detects my geolocation
  • As a user of the "la boite" configuration page, I can order the list of applications by popularity (number of users)
  • As a user of the "la boite" configuration page, I can order the list of applications by freshness (newest apps listed first)
  • As a user of the "la boite" configuration page, I can filter the list of applications by display size
  • As a user of the "la boite" configuration page, I can filter the list of applications by feature (eg if we have some "la boite" that have buttons, buzzers, nelson integration... in the future)
  • ...

Any other ideas @vrialland @jlebunetel @Pimouss1305 @flaghost?

@bgaultier thoughts?

API keys should be provided by users, not server

For apps that need an API key to connect to an external service, the key should be provided by the user and so stored in the app config (in DB) and not rely on a key set in settings.

These apps use settings at the moment:

  • Star
  • Vélib
  • Likes
  • Traffic
  • Weather

Width, height and numbers of colors in boite json

Since we now know the kind of display a boite is using, exporting these infos on /boites/<uuid> would be helpful.

Example payload:

{
  "id": 11,
  "width": 32,
  "height": 16,
  "nb_colors": 2, 
  "tiles": [
    {"id": 46, "last_activity": 1529262961}, 
    {"id": 48, "last_activity": 1529262961}
  ]
}

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.