Skip to content
/ Islandr Public

A website for UWC-CSCer to initiate, manage, and promote student activities.

License

Notifications You must be signed in to change notification settings

zlxlty/Islandr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Islandr

Language Version Dependencies

Islandr is a website for UWCCSCer to organize, publicize and find interesting activities


Equal Contributors: Ruihan Xu rhxu17@uwcchina.org Tianyi Lu skylty01@gmail.com Yufeng Wu yfwu02@gmail.com


Content


Getting_Started

Prerequisites

  • Python 3.6.x (3.7.x is not supported)
    • If you haven't installed anaconda on your computer, here is the URL link to Download Anaconda
  • Virtualenv
  • Mac OS or Linux
$ sudo apt-get install python3-venv

Installing

  1. Click the top-right Fork button and fork my repo to your own repo
  2. Clone your repo to your local computer
$ git clone https://github.com/<your_username>/Islandr.git
$ cd Islandr
  1. Create Virtualenv
$ python3 -m venv venv
  1. Add FLASK_APP to your activate shell file
$ vim venv/bin/activate

Add this line at the buttom of activate file

export FLASK_APP=flasky.py

Save and exit the file by pressing `Contrl+C` and `:wq`

  1. Activate Virtualevn and install dependencies
(venv)$ source venv/bin/activate
(venv)$ pip install -r requirements.txt
  1. Generate your database
(venv)$ flask db init
(venv)$ flask db migrate -m "first migration"
(venv)$ flask db upgrade
  1. Create index for search function
(venv)$ flask deploy
  1. Run your flask app
(venv)$ flask run
  1. Go to http://127.0.0.1:5000/ and see the app running

Changlog

2019.07.08

TODO

  • Email template (working)
  • About Us page
  • Tag system (working)
  • Team Organization
  • Tingting Communication

ERROR

  • Mobile Display Error
  • Unread Message Error

Unittesting

(venv)$ flask test

Expecting Output

test_app_exists (test_basics.BasicsTestCase) ... ok
test_app_is_testing (test_basics.BasicsTestCase) ... ok
test_no_password_getter (test_user_model.UserModelTestCase) ... ok
test_password_salts_are_random (test_user_model.UserModelTestCase) ... ok
test_password_setter (test_user_model.UserModelTestCase) ... ok
test_password_verification (test_user_model.UserModelTestCase) ... ok
test_user_role (test_user_model.UserModelTestCase) ... ok

-----------------------------------------------------------------
Ran 7 tests in 0.244s

OK

Faking Users and Posts

(venv)$ flask shell
>>> from app import faker
>>> faker.test_user()
>>> faker.users()
>>> faker.groups()
>>> faker.posts()

An admin account with email skylty01@gmail.com and password 123 will be added into your database for testing

100 users ,groups and posts will be added into your database


Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Pull Request Process

Starting from Step 4

About

A website for UWC-CSCer to initiate, manage, and promote student activities.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •