https://github.com/madhvi-n/django-notes
A Google Keep clone using Django and Angular which allows user to add notes, archive and pin them. It also allows user to pin, archive notes and add labels.
https://github.com/madhvi-n/django-notes
angular10 django django-notes google-keep-clone python
Last synced: 3 months ago
JSON representation
A Google Keep clone using Django and Angular which allows user to add notes, archive and pin them. It also allows user to pin, archive notes and add labels.
- Host: GitHub
- URL: https://github.com/madhvi-n/django-notes
- Owner: madhvi-n
- Created: 2022-11-27T08:27:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-12T13:59:49.000Z (over 2 years ago)
- Last Synced: 2024-12-22T09:44:13.084Z (5 months ago)
- Topics: angular10, django, django-notes, google-keep-clone, python
- Language: TypeScript
- Homepage:
- Size: 528 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Django Notes
A Google Keep Clone using Django and Angular# Requirements
- Backend
- Python 3.8+
- virtualenv
- WSL- Frontend
- Angular 10.2.4 (or 10.2.5)
- Node 10.13.x +# Installation
Clone the repository and enter the root directory
```
git clone https://github.com/madhvi-n/django-notes.git
cd django-notes
```Create a virtual environment and activate it
```
virtualenv venv
source venv/bin/activate
```Making sure your virtual environment is activated, install the dependencies using `pip`
```
pip install -r requirements.txt
```After installing dependencies, migrate Django apps.(You will find the list of apps when you run the command `python manage.py runserver`)
```
python manage.py migrate
```Create django superuser so that you can access django admin interface
```
python manage.py createsuperuser```
Access python shell```
python manage.py shell
```Adding data from shell
```
from django.contrib.auth.models import User
user = User.objects.get(id=1) # Considering the createsuperuser command has been executed beforefrom labels.models import Label
label = Label.objects.create(name="My first label", user=user)from notes.models import Note
note = note.objects.create(title="Something title", content="Something in the content here", user=user)# Add label to your note
note.labels.add(label)# Change color of your note
print(Note.Color.choices)
note.color = Note.Color.INDIANRED# Archive it or pin it
note.is_pinned = True
note.is_archived = True# Save your changes
note.save()
```Finally start your Django server
```
python manage.py runserver
```Visit `http://127.0.0.1:8000/` or `localhost:8000` for running web server
Alternatively you can access the admin interface on `http://127.0.0.1:8000/admin/` or `localhost:8000/admin`### Frontend
Start another shell tab and access the root of frontend directory `notes-app` (without bash or activated virtual environment).
Install the angular dependencies
```
cd static/frontent/notes-app
npm install
```Visit `http://127.0.0.1:4200` or `localhost:4200` to access frontend.
#### Note: Django/Backend runs on WSL and Angular/Frontend runs directly on Windows
## References
- [How to install Python3.8 on Ubuntu 18.04](https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/)
- [Installing NodeJs on Windows](https://www.guru99.com/download-install-node-js.html)
- [Official Angular 10 installation guide](https://v10.angular.io/guide/setup-local)
- [Installing a specific version of ng cli or packages](https://stackoverflow.com/questions/44759621/install-specific-version-of-ng-cli)
- [Compatibility list for Angular, Angular Cli and Node Js](https://stackoverflow.com/questions/60248452/is-there-a-compatibility-list-for-angular-angular-cli-and-node-js)