Skip to content

AllenGao6/Briefly2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Briefly2.0

React-Redux Update (2021/06/15)

npm install react-particles-js
npm install redux redux-devtools-extension redux-thunk redux-persist react-redux redux-immutable-state-invariant
npm install react-toastify
npm install --save-dev style-loader css-loader

Database Update (2021/06/04)

Because the database has been shifted to PostgreSQL, you need to make several changes to allow the correct functioning:

  1. Download PostgreSQL at https://www.postgresql.org/download/ based on your version

  2. git pull origin

  3. run pipenv install in your virtual environment

  4. After download and install, open the postgreSQL command line psql. e.g: if you are on Windows, you can type psql at the left bottom search bar and run it. (Set the password based on your preference at this step)

  5. Run following command (should be exactly same):

    1. First, create a database for your project:

      CREATE DATABASE briefly;

    2. Next, create a database user for our project.

      CREATE USER brieflyuser WITH PASSWORD 'brieflypassword';

    3. Set several other things.

      ALTER ROLE brieflyuser SET client_encoding TO 'utf8';
      ALTER ROLE brieflyuser SET default_transaction_isolation TO 'read committed';
      ALTER ROLE brieflyuser SET timezone TO 'UTC';
      
    4. Now, we can give our new user access to administer our new database.

      GRANT ALL PRIVILEGES ON DATABASE briefly TO brieflyuser;

    5. When you are finished, exit out of the PostgreSQL prompt by typing:

      \q
  6. Run following command in your virtual env at directory Briefly

    1. python manage.py makemigrations
    2. python manage.py createsuperuser
    3. python manage.py migrate
    4. python manage.py collectstatic

Now the new database will be well functioning! 😉


Prerequisite:

If something went wrong, you can directly delete the npm_modules at the frontend folder and do following:

  1. start your virtual environment. If you use pipenv, you can run pipenv install, which installs all modules listed in Pipfile

  2. cd to frontend and run npm install, which will automatically install all packages listed in packages.json.

Or try following:

install pipenv on your os, or any other virtual environment of your preference

pip install pipenv

To Create a virtual environment and install modules within this virtue environment

pipenv install django djangorestframework
pipenv shell

cd to frontend directory and run following command one by one make sure npm is installed on your os

npm init -y
npm i webpack webpack-cli --save-dev
npm i @babel/core babel-loader @babel/preset-env @babel/preset-react --save-dev
npm i react react-dom --save-dev
npm install @material-ui/core
npm install @babel/plugin-proposal-class-properties
npm install react-router-dom
npm install @material-ui/icons
npm install @material-ui/styles

npm install --save file-loader url-loader

npm install react-player

To run the code, open two shell prompts: In the first one:

pipenv shell
python manage.py runserver

In the second one:

npm run dev

then you are all set!!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published