Touch is a vibrant and supportive community platform designed to foster mutual assistance among its members. Our community encompasses a diverse range of topics, including:
Touch is more than just a forum—it's a community where members help each other thrive. Join us today and be a part of a supportive network that values sharing, learning, and growing together.
Name | Student ID | Github user name |
---|---|---|
Xiang Li | 23921151 | TomatoesBurner |
Wannian Mei | 23855006 | WannianMEI |
Hangqiuzi Wang | 23904899 | akikodesu |
Chang Chen | 23931637 | TheCatFactoryOfV |
A Virtual Environment is necessary to develop and test the application. This is performed in a safe, self-contained manner through Python's Virtual Environment.
Ensure that your current working directory contains the requirements.txt
file, in this case it is '/venv', then use:
$ python -m venv venv
NOTE: Your system may have python3
aliased as something other than python
On standard Unix operating systems this would be:
$ source venv/bin/activate
On Windows systems:
$ venv\Scripts\activate
The requirements.txt
file contains all the Python dependencies that the application requires to run. These can be downloaded and installed with:
$ pip install -r requirements.txt
NOTE: Your system may have pip3
aliased as something other than pip
.
To start the server and open pages in our browser, the follow command should be executed:
flask run
The application should now be running at http://localhost:5050. If you want to modify the port number, you can modify it in .flaskenv
and
pip install python-dotenv
.
The Auth Module handles user registration, login, logout,It also includes security questions for password recovery.
app/models.py
: Defines the UserModel
and related methods.app/forms.py
: Defines the RegisterForm
and LoginForm
.app/blueprint/auth/auth.py
: Handles user registration, login, and logout views and routes.app/templates/
: Contains HTML templates (login.html,register.html,forgot-password.html,register.html).The PostCom Module allows users to create post, view and search. Users can comment on posts and mark the best answer.
app/models.py
: Defines the PostModel
and CommentModel
and related methods.app/forms.py
: Defines the PostForm
and CommentForm
.app/blueprint/postCom/postCom.py
: Handles post-related views and routes.app/templates/
: Contains HTML templates for posts and comments(post-detail.htm,posts.htmll).The Profile Module allows users to manage their profile settings, including changing their avatar and username, viewing their own posts and comments, and deleting their posts and comments.
app/models.py
: Defines the UserModel
, PostModel
, and CommentModel
.app/forms.py
: Defines the forms used in the profile management process (EditUsernameForm
, UploadImageForm
).app/blueprint/profile/profile.py
: Handles profile-related views and routes.app/templates/
: Contains HTML templates (profile.html
).The Notification Module is responsible for sending notifications to users when their posts or comments receive replies.
app/models.py
: Defines the Notifications
model and related methods.app/blueprint/notification/notification.py
: Handles notification-related views and routes.app/templates/
:ajax rendering on base.html
We use unittest
to run the unit test.
Email: user123@qq.com
Password: 123456
unittest is a unit testing framework in Python that is built into the standard library. You can install it by following command:
pip install unittest
Use the following command to run your unittests:
python -m unittest tests.unittest
NOTE: Your system may have python3
aliased as something other than python
.