npm install -g @vue/cli
npm install
npm run serve
npm run build
npm run lint
using postgresql database with django
Install the postgresql database in your local computer first from the .exe file on the offical site.
Install the postgresql package for python - psycopg2 using pip in virtualenv
Create a new virtualenv and then install all the dependencies for our project there
To create a virtual environment pls refer to link
pip install virtualenvwrapper-win
Go to backend directory and run the following command in terminal
mkvirtualenv <Whatever-name-you-want-to-give-to-your-environment>
Install the dependencies from
pip install -r requirements.txt
Create a new database using the postgresql command line.
CREATE DATABASE phomtoblog
Inside our django project settings.py, set the database as the postgresql like so,
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'phomtoblog',
'USER': 'postgres',
'PASSWORD': '<passowrd-at-the-time-of-installation>',
'HOST': '127.0.0.1',
'PORT': '5432',
}
Run the server using command
python manage.py runserver
Just create models and run makemigrations and migrate command, the new database should work fine.