Following features have been implemented at the moment:
- Create(add) contact
- Search by name
- Search by phone
- A contact could have many phones attached to it
- Delete contacts
- Contacts are stored in sqlite DB via Django ORM
====================
Install and initialize empty project Video How To(RUS)
- Create git rep
- Create venv
- Start project
===================
Create app and models Video How To(RUS)
- Create app
phonebook
- Create
Models
=====================
HomePageVIew and Template Video How To(RUS)
- Create
HomePageVIew
- Create
home.html
template - Add path to
HomePageVIew
- Add bootstrap (CDN)
=======================
AddView(CreateView), ModelForm, NavBar. Video How To(RUS)
-
Add navbar (add navbar-expand-lg class)
-
Add
home
navbar item -
Add
Add
andAll
navbar items -
Add
CreatePersoneForm
andAddPhoneFormView
. Add path toAddPhoneFormView
-
Add
django-crispy-forms
-
Add Html form, submit button
-
Redefine
get_success_url
ofAddPhoneFormView
for adding phones -
Redefine
get_context_data
ofHomePageView
for filtering -
add card for rearch result in
home.html
template. Addsearch_message
and all results -
add
all_phones_to_string
toPersone
Model. Add result table tohome.html
-
add
DeletePhoneView
and functional -
add search forms to
home.html
- clone project and cd to project dir
- create venv and activate it
#linux/mac python3 -m venv env source ./env/bin/activate
#win cmd python -m venv env .\env\Scripts\activate
- Install dependensies:
pip install -r requirements.txt
- cd to
src
directory - run
#linux/mac python3 manage.py runserver
#win cmd python manage.py runserver
coming soon.. How to... (RUS)
- Create the same app as web-app usind Django + Django REST Framework + VUE