/phone_book_django

Primary LanguageHTMLMIT LicenseMIT

Phonebook Django webapp

About

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

Plan to follow

====================

Install and initialize empty project Video How To(RUS)

  1. Create git rep
  2. Create venv
  3. Start project

===================

Create app and models Video How To(RUS)

  1. Create app phonebook
  2. Create Models

=====================

HomePageVIew and Template Video How To(RUS)

  1. Create HomePageVIew
  2. Create home.html template
  3. Add path to HomePageVIew
  4. Add bootstrap (CDN)

=======================

AddView(CreateView), ModelForm, NavBar. Video How To(RUS)

  1. Add navbar (add navbar-expand-lg class)

  2. Add home navbar item

  3. Add Add and All navbar items

  4. Add CreatePersoneForm and AddPhoneFormView. Add path to AddPhoneFormView

  5. Add django-crispy-forms

  6. Add Html form, submit button

  7. Redefine get_success_url of AddPhoneFormView for adding phones

  8. Redefine get_context_data of HomePageView for filtering

  9. add card for rearch result in home.html template. Add search_message and all results

  10. add all_phones_to_string to Persone Model. Add result table to home.html

  11. add DeletePhoneView and functional

  12. add search forms to home.html

Install

  1. clone project and cd to project dir
  2. create venv and activate it
    #linux/mac
    python3 -m venv env
    source ./env/bin/activate
    #win cmd
    python -m venv env
    .\env\Scripts\activate
  3. Install dependensies:
    pip install -r requirements.txt

Run it

  1. cd to src directory
  2. run
    #linux/mac
    python3 manage.py runserver
    #win cmd
    python manage.py runserver

Video explanation[RUS]

coming soon.. How to... (RUS)

Previous step

Next steps

  • Create the same app as web-app usind Django + Django REST Framework + VUE