This is a service that provides basic functions of SNS.
python 3.6.5
In this SNS, the following functions are implemented by default.
Please add additional functions if necessary.
-
- You can use the Markdown language
- Pagination is supported
- You can post comments on blogs posted by other users
-
- User creation
- User authentication
- Email confirmation
-
User Role Management
- User
- Basic permissions to write articles and comments and this other users
- Moderator
- Adds permission to moderate comments made by other users
- Administrator
- Full access, which includes permission to change the roles of other users
- User
-
User follow function
-
REST API
Please refer to requirements/common.txt for dependencies necessary to activate SNS.
$git clone https://github.com/shosato0306/SNS.git
$cd SNS
$pip install -r requirements/dev.txt
$flask db init
$flask db migrate
$flask db upgrade
$flask shell
>>> Role.insert_roles()
>>> Role.query.all()
>>> exit()
$export FLASK_APP=sns.py
$export SNS_ADMIN=<Administrator's email address>
$export MAIL_USERNAME=<Mail account username>
$export MAIL_PASSWORD=<Mail account password>
$flask run
- If you create an account for a user with the email address you set in SNS_ADMIN, that user will be assigned the Administrator Role.
- SNS uses gravatar to display avatar images
- This service does not yet support OAuth 2.0. Therefore, there is a limit to the use of gmail which requires OAuth 2.0 when confirming email address. OAuth 2.0 will be implemented in the future.
- Fork this repository
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am ‘Add some feature’)
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
This software is released under the MIT License.