To get a working local copy on Windows, follow these steps.
Before working with the project, you need to have installed the following tools.
# Install python. Version used for development: Python 3.11.4
# Install PostgreSQL. Version used for development: PostgreSQL 15.3
pip install --upgrade pip
pip install virtualenv
- Clone the repo
git clone https://github.com/carmengl00/ThinkUp.git
- Create virtual environment
python -m venv venv
- Install requirements
Install requirements in the virtual environment.
.\venv\Scripts\activate
pip install -r requirements.txt
- Create database
Open terminal run the following command.
psql -U postgres
Complete with credentials used in the PostgreSQL installation.
CREATE USER think_admin WITH PASSWORD 'th1nk_adm1n'; #Create user
CREATE DATABASE thinkup WITH OWNER think_admin; #Create database with the created user
Migrations.
python manage.py makemigrations
python manage.py migrate
#Complete with credentials
python manage.py createsuperuser
- Run
python manage.py runserver
The request collection is as follows and can be tested in /graphql.
- Register user
mutation{
registerUser(username:"pepito", email:"[email protected]", password:"p@ssw0rd"){
username
}
}
- User login
mutation{
tokenAuth(username: "pepito", password:"p@ssw0rd"){
success
errors
token{
token
}
}
}
- Password change
mutation{
passwordChange(oldPassword:"p@ssw0rd",
newPassword1:"newpassword123",
newPassword2:"newpassword123"
){
success
errors
}
}
- Magic link
- Create idea
- Update visibility idea
- My ideas
- Delete idea
- Follow request
- My follow request
- My followers
- My followed
- Unfollow
- Delete follower
- Search user
- Ideas from other user
- Timeline
- My notifications