GithubHelp home page GithubHelp logo

we-are-one-cs / intranet Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 993 KB

Intranet project of We Are One (created at CentraleSupélec)

Home Page: https://weareone-intranet.herokuapp.com/

License: MIT License

Python 47.74% HTML 38.44% CSS 13.82%
centralesupelec django intranet weareone latitudes centrale-paris techforgood

intranet's Introduction

Django CI

We Are One (CentraleSupélec)

GitHub repository for our member website. This repository contains all files needed to see and integrate in the original website the 4 functions discussed during the initial phase of the project. The project is currently in development. Started at CentraleSupélec with Lattitude and We Are One.

Getting Started

Prerequisites

  1. Django 2.2.10
  2. Python 3.7.4
  3. PostgreSQL 10
  4. For others requirements, see requirements.txt

Run the project

Clone the project on your machine and change the directory :

$ git clone [email protected]:We-Are-One-CS/intranet.git
$ cd intranet/

Create the database:

  • Open the SQL Shell (psql)
  • Press enter five times to connect to the DB
$ CREATE DATABASE weareone;

Migrate the database:

$ python manage.py makemigrations wao 

$ python manage.py migrate --noinput

Create an admin user:

$ python manage.py createsuperuser

Run the app in a Django server:

$ python manage.py runserver

Now you should see the app by taping http://127.0.0.1:8000 in your web browser.

When you're done, don't forget to exit the server by :

Quit the server with CTRL-BREAK
(In Windows) Ctrl + C

Functions

  1. Personal data page: Each user has an unique page for seeing its private data. The users have the possibility to change their information.
  2. Events page: This page will show all the events that We Are One organize, and any user or visitor is able to subscribe to WAO events. There are public and private events, free and non-free event as well.
  3. Self development programs offered by We Are One: The website has the possibility to show all self development programs that the user can search and interact, either by subscribing or by setting its interest.
  4. Users directory: This function is mainly to being able to see the users database. Each user (that has the right to see) will be able to see the contact of others users.

To go further

To go further into the project, consult the project documentation (in French).

Authors

  • Ali Raïki
  • Leïla Bekaddour
  • Matheus Elyasha
  • Nouha Manai
  • Timothé Montel
  • Vítor Albuquerque
  • Yvan Lanore

intranet's People

Contributors

aliraiki avatar chiahetcho avatar dependabot[bot] avatar elyasha avatar vitoramr avatar yvanlnr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

intranet's Issues

Evaluate testing information

Once the first tests with We Are One are finished, we need to evaluate these information in order to implement all possible feedback in the due time.

Tests for dev programs

Describe the solution you'd like
A clear and concise description of unit tests for the dev programs part in test.py

Admin page is not working

Leila tried to created a Custom Admin page but now it is not working. We need to simplify it or get it working

Forget password

Is your feature request related to a problem? Please describe.
When a user forgets his password, he will need to reset it.

Describe the solution you'd like
Creation of a token that will be sent by email

Describe alternatives you've considered
Create an admin notification

Finalize models.py

We need to finalize models.py with better models that follow the standard in the # TODO assignment in code.

Unable to create super user

(venv) C:\Users\vitor\PycharmProjects\intranet>python manage.py createsuperuser
Email: [email protected]
Password:
Password (again):
Ce mot de passe est trop court. Il doit contenir au minimum 8 caractères.
Ce mot de passe est trop courant.
Bypass password validation and create user anyway? [y/N]: y

Traceback (most recent call last):
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.ForeignKeyViolation: insert or update on table "core_user" violates foreign key constraint "core_user_category_id_8f8d84bc_fk_core_usercategory_id"
DETAIL: Key (category_id)=(1) is not present in table "core_usercategory".

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\core\management_init_.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\core\management_init_.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\core\management\base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 61, in execute
return super().execute(*args, **options)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\core\management\base.py", line 364, in execute
output = self.handle(*args, **options)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 156, in handle
self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
File "C:\Users\vitor\PycharmProjects\intranet\core\managers.py", line 27, in create_superuser
user = self.create_user(email, password)
File "C:\Users\vitor\PycharmProjects\intranet\core\managers.py", line 19, in create_user
user.save(using=self._db)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\contrib\auth\base_user.py", line 66, in save
super().save(*args, **kwargs)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\models\base.py", line 741, in save
force_update=force_update, update_fields=update_fields)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\models\base.py", line 779, in save_base
force_update, using, update_fields,
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\models\base.py", line 870, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\models\base.py", line 908, in _do_insert
using=using, raw=raw)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\models\query.py", line 1186, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\models\sql\compiler.py", line 1368, in execute_sql
cursor.execute(sql, params)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\backends\utils.py", line 99, in execute
return super().execute(sql, params)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\backends\utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\backends\utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\utils.py", line 89, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\vitor\PycharmProjects\intranet\venv\lib\site-packages\django\db\backends\utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: insert or update on table "core_user" violates foreign key constraint "core_user_category_id_8f8d84bc_fk_core_usercategory_id"
DETAIL: Key (category_id)=(1) is not present in table "core_usercategory".

Circle CI not working

Describe the bug
Circle CI is not well configured, so we need to better configure it.

Expected behavior
A clear and concise build of the CI, or change of the CI.

Review modular code

We need to review all the code and organize it in a better way.
Implement all the standards of Django and better organize our code by apps (instead of only one core app).

Develop user manual

Is your feature request related to a problem? Please describe.
We need a manual for each user, so in this issue we are going to implement a good manual for each type of user. (admin, company, final user, staff, and so on)

Describe the solution you'd like
A clear and concise description of what each type of user can do in the platform.

Bug triage

We need to classify and identify all our bugs.

Tests for yearbook

Yearbook tests
A clear and concise description of unit tests for the yearbook part in test.py

Tests for user

Describe the solution you'd like
A clear and concise description of unit tests for the user part in test.py

Tests for events

Develop unit tests for the events part
A clear and concise description of unit tests for the user part in test.py

CSS not working

The production branch in heroku is not working with static files. I tried many things to work this out, but right now I find some difficulty to resolve it.
I will show you some results of heroku logs -t
image

I tried whitenoise but it wont work for us, we need to use only the modules on production related to amazon s3.

To Reproduce
Steps to reproduce the behavior:

  1. go to https://weareone-intranet.herokuapp.com/

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.