SpaceyaTech / mastori

Mastori is a community-driven open-source project that aims to provide a simple and efficient blogging platform built for the Dev Community
https://www.spaceyatech.com/
22 stars 54 forks source link

Environment setup(REOPENED) #13

Closed JimmyTron closed 1 year ago

JimmyTron commented 1 year ago

Discussed in https://github.com/SpaceyaTech/Team-Rio-Django/discussions/12

Originally posted by **mamu234** October 31, 2022 1. install python - the latest python version in my case is 3.8 2. Install django using the following command - pip install django (this will install django without specifying the version) 3. Create a virtual environment using the following command - python3 -m venv env 4. Activate the virtual environment - source env /bin/activate 5. Install a list of modules needed to run the project by - pip install -r requirements.txt 6. Check the modules that have been installed by - pip freeze
JimmyTron commented 1 year ago

Hold up ✌️

Maybe before we create the virtual environment on step 3, we should first clone the main branch of our repo locally onto our machine. Cd into the directory then proceed to make the virtual environment

mamu234 commented 1 year ago

JImmy please clarify the issue for setting up that needs to be done

LionelMv commented 1 year ago
  1. First install python3 (skip if you have it)
  2. Install django using the following command: pip install django
  3. Clone your repo to the location you want.
  4. cd into it
  5. Install the virtual environment otherwise skip: sudo apt install python3.10-venv (or sudo apt install python-venv)
    1. Create the virtual environment:
      • python3 -m venv env (env is the name of your virtual environment) or mkdir env -> cd env -> venv -p python3
  6. cd env
  7. source bin/activate (to deactivate run deactivate)
  8. Install a list of modules needed to run the project by - pip install -r requirements.txt (file found in Team-Rio-Django repo)
  9. pip freeze to confirm the requirements are installed.
  10. Create a folder in your virtual environment and start project:
    • mkdir src (can be any name)
    • cd src
    • django-admin startproject teamrio . (The dot means in the src folder. Otherwise it will create another folder inside teamrio folder called teamrio. teamrio can be any name you decide for your project).
    • python manage.py runserver (you will see the address. Click on it to redirect you to the webpage to show you have started the project successfully).

I hope this helps!

JosephThuku commented 1 year ago

after setting up the enviroment i think there is no need open a pull request since there are no changes

mamu234 commented 1 year ago

Thanks LionelMv i got it !