├── .DS_Store ├── 01 Django Create Project.md ├── 02 Django Create App.md ├── 03 Django Views.md ├── 04 Django Templates.md ├── 04 Django URLs.md ├── 05 Django Models.md ├── 06 Django Insert Data.md ├── 06 Django Update Data.md ├── 07 Django Delete Data.md ├── 08 Django Update Model.md ├── 09 Django Prepare Template.md ├── 10 Django Add Link to Details.md ├── 11 Django Add Master Template.md ├── 12 Django Add Main Index Page.md ├── 13 Django Admin.md ├── 14 Django Admin - Create User.md ├── 15 Django Admin - Include Member.md ├── 16 Django Admin - Set Fields to Display.md ├── 17 Django Admin - Add Members.md ├── 18 Django Admin - Update Members.md ├── 19 Django Admin - Delete Members.md ├── 20 Django Variables.md ├── 21 Django Template Tags.md ├── 22 Django if elseTag.md ├── 23 Django for Tag.md ├── 24 Django comment Tag.md ├── 24 Django include Tag.md ├── 25 Pass Arguments with Include.md ├── 26 Reusable List View Snippets.md ├── 27 Reverse for URLs.md ├── 28 Navbar.md ├── 29 Template Filters.md ├── 30 ForLoop Counter & Cycle.md ├── 31 Template Extending.md ├── 32 Static files.md ├── DjangoCrud ├── .gitignore ├── README.md ├── apps │ ├── apps │ │ ├── __init__.py │ │ ├── settings.py │ │ ├── urls.py │ │ ├── views.py │ │ └── wsgi.py │ ├── books_cbv │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── books_cbv │ │ │ │ ├── book_confirm_delete.html │ │ │ │ ├── book_form.html │ │ │ │ └── book_list.html │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ ├── books_fbv │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── books_fbv │ │ │ │ ├── book_confirm_delete.html │ │ │ │ ├── book_form.html │ │ │ │ └── book_list.html │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ ├── books_fbv_user │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── templates │ │ │ └── books_fbv_user │ │ │ │ ├── book_confirm_delete.html │ │ │ │ ├── book_form.html │ │ │ │ └── book_list.html │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ ├── manage.py │ └── theme │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ └── __init__.py │ │ ├── models.py │ │ ├── static │ │ └── css │ │ │ └── style.css │ │ ├── templates │ │ ├── base.html │ │ ├── home.html │ │ └── registration │ │ │ └── login.html │ │ ├── tests.py │ │ └── views.py └── requirements.txt ├── Example └── cwp │ ├── README.md │ ├── cwp │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── urls.cpython-310.pyc │ │ └── wsgi.cpython-310.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ └── myapp │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── admin.cpython-310.pyc │ ├── apps.cpython-310.pyc │ ├── forms.cpython-310.pyc │ ├── models.cpython-310.pyc │ ├── urls.cpython-310.pyc │ └── views.cpython-310.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ ├── 0001_initial.py │ ├── __init__.py │ └── __pycache__ │ │ ├── 0001_initial.cpython-310.pyc │ │ └── __init__.cpython-310.pyc │ ├── models.py │ ├── templates │ └── myapp │ │ ├── form.html │ │ └── success.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── Project3 └── p4n_profiles │ ├── db.sqlite3 │ ├── manage.py │ ├── members │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── models.cpython-310.pyc │ │ ├── urls.cpython-310.pyc │ │ └── views.cpython-310.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ └── __init__.cpython-310.pyc │ ├── models.py │ ├── templates │ │ └── members │ │ │ └── profile_list.html │ ├── tests.py │ ├── urls.py │ └── views.py │ └── p4n_profiles │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── settings.cpython-310.pyc │ ├── urls.cpython-310.pyc │ └── wsgi.cpython-310.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── Project4 └── p4n_form │ ├── db.sqlite3 │ ├── employee │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── forms.cpython-310.pyc │ │ ├── forms.cpython-312.pyc │ │ ├── models.cpython-310.pyc │ │ ├── models.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── views.cpython-310.pyc │ │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ ├── __init__.cpython-310.pyc │ │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── static │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ └── style.css │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── jquery.js │ │ │ └── popper.js │ ├── templates │ │ ├── employee_form.html │ │ ├── employee_list.html │ │ └── navbar.html │ ├── tests.py │ ├── urls.py │ └── views.py │ ├── manage.py │ └── p4n_form │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── __init__.cpython-312.pyc │ ├── settings.cpython-310.pyc │ ├── settings.cpython-312.pyc │ ├── urls.cpython-310.pyc │ ├── urls.cpython-312.pyc │ ├── wsgi.cpython-310.pyc │ └── wsgi.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── README.md ├── Search_Component ├── blog │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-312.pyc │ │ ├── __init__.cpython-39.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── admin.cpython-39.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── models.cpython-312.pyc │ │ ├── models.cpython-39.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── urls.cpython-39.pyc │ │ ├── views.cpython-312.pyc │ │ └── views.cpython-39.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ ├── 0001_initial.cpython-39.pyc │ │ │ ├── __init__.cpython-312.pyc │ │ │ └── __init__.cpython-39.pyc │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── blogging │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-312.pyc │ │ ├── __init__.cpython-39.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── settings.cpython-39.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── urls.cpython-39.pyc │ │ ├── wsgi.cpython-312.pyc │ │ └── wsgi.cpython-39.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 ├── manage.py └── templates │ ├── blog-detail.html │ └── blog.html ├── blogs ├── blogs │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── wsgi.cpython-310.pyc │ │ └── wsgi.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 ├── manage.py └── p4nblog │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── __init__.cpython-312.pyc │ ├── admin.cpython-310.pyc │ ├── admin.cpython-312.pyc │ ├── apps.cpython-310.pyc │ ├── apps.cpython-312.pyc │ ├── models.cpython-310.pyc │ ├── models.cpython-312.pyc │ ├── urls.cpython-310.pyc │ ├── urls.cpython-312.pyc │ ├── views.cpython-310.pyc │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ ├── 0001_initial.py │ ├── __init__.py │ └── __pycache__ │ │ ├── 0001_initial.cpython-310.pyc │ │ ├── 0001_initial.cpython-312.pyc │ │ ├── __init__.cpython-310.pyc │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── templates │ ├── create_post.html │ └── show_posts.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── cart_component ├── cart │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── models.cpython-310.pyc │ │ ├── models.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── views.cpython-310.pyc │ │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ ├── __init__.cpython-310.pyc │ │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── templates │ │ └── cart │ │ │ └── cart.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── cart_component │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── wsgi.cpython-310.pyc │ │ └── wsgi.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 └── manage.py ├── django_login ├── blog │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── forms.cpython-310.pyc │ │ ├── forms.cpython-312.pyc │ │ ├── models.cpython-310.pyc │ │ ├── models.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── views.cpython-310.pyc │ │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ ├── __init__.cpython-310.pyc │ │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── templates │ │ └── blog │ │ │ ├── about.html │ │ │ ├── home.html │ │ │ ├── post_confirm_delete.html │ │ │ └── post_form.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── db.sqlite3 ├── django_project │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── wsgi.cpython-310.pyc │ │ └── wsgi.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── manage.py ├── requirements.txt ├── static │ ├── css │ │ └── style.css │ └── js │ │ └── app.js ├── templates │ └── base.html └── users │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── __init__.cpython-312.pyc │ ├── admin.cpython-310.pyc │ ├── admin.cpython-312.pyc │ ├── apps.cpython-310.pyc │ ├── apps.cpython-312.pyc │ ├── forms.cpython-310.pyc │ ├── forms.cpython-312.pyc │ ├── models.cpython-310.pyc │ ├── models.cpython-312.pyc │ ├── urls.cpython-310.pyc │ ├── urls.cpython-312.pyc │ ├── views.cpython-310.pyc │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ ├── __init__.py │ └── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── templates │ └── users │ │ └── login.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── employee_search_project ├── db.sqlite3 ├── employee_directory │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── forms.cpython-310.pyc │ │ ├── forms.cpython-312.pyc │ │ ├── models.cpython-310.pyc │ │ ├── models.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── views.cpython-310.pyc │ │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ ├── __init__.cpython-310.pyc │ │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── templates │ │ └── employee_directory │ │ │ ├── search_form.html │ │ │ └── search_results.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── employee_search_project │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── wsgi.cpython-310.pyc │ │ └── wsgi.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── manage.py ├── employee_searching ├── db.sqlite3 ├── employee_searching │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── urls.cpython-310.pyc │ │ └── wsgi.cpython-310.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── manage.py ├── p4n_empdata │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── models.cpython-310.pyc │ │ ├── urls.cpython-310.pyc │ │ └── views.cpython-310.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ └── __init__.cpython-310.pyc │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py └── templates │ ├── emp_detail.html │ └── employee.html ├── getway.md ├── message ├── db.sqlite3 ├── manage.py ├── message │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── wsgi.cpython-310.pyc │ │ └── wsgi.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── messageapp │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── models.cpython-310.pyc │ │ ├── models.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── views.cpython-310.pyc │ │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ ├── __init__.cpython-310.pyc │ │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py └── templates │ ├── dashboard.html │ ├── edit.html │ └── index.html ├── mylogin ├── db.sqlite3 ├── manage.py ├── mylogin │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── urls.cpython-310.pyc │ │ └── wsgi.cpython-310.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── p4n_login │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── admin.cpython-310.pyc │ ├── apps.cpython-310.pyc │ ├── forms.cpython-310.pyc │ ├── models.cpython-310.pyc │ ├── urls.cpython-310.pyc │ └── views.cpython-310.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ ├── __init__.py │ └── __pycache__ │ │ └── __init__.cpython-310.pyc │ ├── models.py │ ├── templates │ └── p4n_login │ │ ├── header.html │ │ ├── login.html │ │ └── register.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── p4n_payment ├── db.sqlite3 ├── manage.py ├── p4n_payment │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── urls.cpython-310.pyc │ │ └── wsgi.cpython-310.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── payment_app │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── admin.cpython-310.pyc │ ├── apps.cpython-310.pyc │ ├── models.cpython-310.pyc │ ├── urls.cpython-310.pyc │ └── views.cpython-310.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ ├── __init__.py │ └── __pycache__ │ │ └── __init__.cpython-310.pyc │ ├── models.py │ ├── templates │ ├── payment.html │ ├── payment_failed.html │ └── payment_success.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── razorpay_integration ├── manage.py ├── payment │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── templates │ │ ├── checkout.html │ │ ├── failure.html │ │ ├── pay.html │ │ └── success.html │ ├── tests.py │ ├── urls.py │ └── views.py └── razorpay_integration │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-312.pyc │ └── settings.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── todo_list ├── db.sqlite3 ├── manage.py ├── media │ ├── avatar.jpg │ └── profile_avatars │ │ ├── 1.png │ │ ├── aleximage.jpg │ │ └── samosa_2.png ├── static │ ├── css │ │ ├── bootstrap.min.css │ │ └── style.css │ ├── images │ │ └── feature.png │ └── js │ │ └── bootstrap.min.js ├── templates │ ├── base.html │ └── home.html ├── todo │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── admin.cpython-310.pyc │ │ ├── admin.cpython-312.pyc │ │ ├── apps.cpython-310.pyc │ │ ├── apps.cpython-312.pyc │ │ ├── models.cpython-310.pyc │ │ ├── models.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── views.cpython-310.pyc │ │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ ├── 0001_initial.cpython-312.pyc │ │ │ ├── __init__.cpython-310.pyc │ │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── templates │ │ └── todo │ │ │ ├── task_confirm_delete.html │ │ │ ├── task_detail.html │ │ │ ├── task_form.html │ │ │ └── task_list.html │ ├── tests.py │ ├── urls.py │ └── views.py ├── todo_list │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── settings.cpython-310.pyc │ │ ├── settings.cpython-312.pyc │ │ ├── urls.cpython-310.pyc │ │ ├── urls.cpython-312.pyc │ │ ├── wsgi.cpython-310.pyc │ │ └── wsgi.cpython-312.pyc │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── users │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── __init__.cpython-312.pyc │ ├── admin.cpython-310.pyc │ ├── admin.cpython-312.pyc │ ├── apps.cpython-310.pyc │ ├── apps.cpython-312.pyc │ ├── forms.cpython-310.pyc │ ├── forms.cpython-312.pyc │ ├── models.cpython-310.pyc │ ├── models.cpython-312.pyc │ ├── signals.cpython-310.pyc │ ├── signals.cpython-312.pyc │ ├── urls.cpython-310.pyc │ ├── urls.cpython-312.pyc │ ├── views.cpython-310.pyc │ └── views.cpython-312.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ ├── 0001_initial.py │ ├── __init__.py │ └── __pycache__ │ │ ├── 0001_initial.cpython-310.pyc │ │ ├── 0001_initial.cpython-312.pyc │ │ ├── __init__.cpython-310.pyc │ │ └── __init__.cpython-312.pyc │ ├── models.py │ ├── signals.py │ ├── templates │ └── users │ │ ├── login.html │ │ ├── password_reset.html │ │ ├── password_reset_complete.html │ │ ├── password_reset_confirm.html │ │ ├── password_reset_done.html │ │ ├── password_reset_email.html │ │ ├── profile.html │ │ └── register.html │ ├── tests.py │ ├── urls.py │ └── views.py └── user_authentication ├── cwp_login ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-310.pyc │ ├── __init__.cpython-312.pyc │ ├── admin.cpython-310.pyc │ ├── admin.cpython-312.pyc │ ├── apps.cpython-310.pyc │ ├── apps.cpython-312.pyc │ ├── forms.cpython-310.pyc │ ├── forms.cpython-312.pyc │ ├── models.cpython-310.pyc │ ├── models.cpython-312.pyc │ ├── urls.cpython-310.pyc │ ├── urls.cpython-312.pyc │ ├── views.cpython-310.pyc │ └── views.cpython-312.pyc ├── admin.py ├── apps.py ├── forms.py ├── migrations │ ├── __init__.py │ └── __pycache__ │ │ ├── __init__.cpython-310.pyc │ │ └── __init__.cpython-312.pyc ├── models.py ├── templates │ ├── index.html │ ├── login.html │ └── signup.html ├── tests.py ├── urls.py └── views.py ├── db.sqlite3 ├── manage.py └── user_authentication ├── __init__.py ├── __pycache__ ├── __init__.cpython-310.pyc ├── __init__.cpython-312.pyc ├── settings.cpython-310.pyc ├── settings.cpython-312.pyc ├── urls.cpython-310.pyc ├── urls.cpython-312.pyc ├── wsgi.cpython-310.pyc └── wsgi.cpython-312.pyc ├── asgi.py ├── settings.py ├── urls.py └── wsgi.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/.DS_Store -------------------------------------------------------------------------------- /DjangoCrud/.gitignore: -------------------------------------------------------------------------------- 1 | db.sqlite3 2 | __pycache__ 3 | *.swp 4 | /venv 5 | /.vscode 6 | .DS_Store -------------------------------------------------------------------------------- /DjangoCrud/README.md: -------------------------------------------------------------------------------- 1 | # Django CRUD Example Apps 2 | 3 | -------------------------------------------------------------------------------- /DjangoCrud/apps/apps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/apps/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/apps/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import include, path 2 | from django.contrib import admin 3 | 4 | import theme.views 5 | 6 | urlpatterns = [ 7 | path('', theme.views.home), 8 | path('books_cbv/', include('books_cbv.urls')), 9 | path('books_fbv/', include('books_fbv.urls')), 10 | path('books_fbv_user/', include('books_fbv_user.urls')), 11 | 12 | # Enable built-in authentication views 13 | path('accounts/', include('django.contrib.auth.urls')), 14 | # Enable built-in admin interface 15 | path('admin/', admin.site.urls), 16 | ] 17 | -------------------------------------------------------------------------------- /DjangoCrud/apps/apps/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render -------------------------------------------------------------------------------- /DjangoCrud/apps/apps/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for apps project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/books_cbv/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from books_cbv.models import Book 3 | 4 | admin.site.register(Book) -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BooksCbvConfig(AppConfig): 5 | name = 'books_cbv' 6 | -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/books_cbv/migrations/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.urls import reverse 3 | 4 | 5 | class Book(models.Model): 6 | name = models.CharField(max_length=200) 7 | pages = models.IntegerField() 8 | 9 | def __str__(self): 10 | return self.name 11 | 12 | def get_absolute_url(self): 13 | return reverse('books_cbv:book_edit', kwargs={'pk': self.pk}) -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/templates/books_cbv/book_confirm_delete.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books CBV: Delete?

6 | 7 |
{% csrf_token %} 8 | Are you sure you want to delete "{{ object }}" ?
9 | 10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/templates/books_cbv/book_form.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books CBV: Edit

6 | 7 |
{% csrf_token %} 8 | {{ form.as_p }} 9 | 10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/templates/books_cbv/book_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books CBV

6 | 7 | 15 | 16 | New 17 | 18 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /DjangoCrud/apps/books_cbv/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'books_cbv' 6 | 7 | urlpatterns = [ 8 | path('', views.BookList.as_view(), name='book_list'), 9 | path('new/', views.BookCreate.as_view(), name='book_new'), 10 | path('edit//', views.BookUpdate.as_view(), name='book_edit'), 11 | path('delete//', views.BookDelete.as_view(), name='book_delete'), 12 | ] -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/books_fbv/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from books_fbv.models import Book 3 | 4 | admin.site.register(Book) -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BooksFbvConfig(AppConfig): 5 | name = 'books_fbv' 6 | -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/books_fbv/migrations/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.urls import reverse 3 | 4 | 5 | class Book(models.Model): 6 | name = models.CharField(max_length=200) 7 | pages = models.IntegerField() 8 | 9 | def __str__(self): 10 | return self.name 11 | 12 | def get_absolute_url(self): 13 | return reverse('books_fbv:book_edit', kwargs={'pk': self.pk}) -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/templates/books_fbv/book_confirm_delete.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books FBV: Delete?

6 | 7 |
{% csrf_token %} 8 | Are you sure you want to delete "{{ object }}" ?
9 | 10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/templates/books_fbv/book_form.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books FBV: Edit

6 | 7 |
{% csrf_token %} 8 | {{ form.as_p }} 9 | 10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/templates/books_fbv/book_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books FBV

6 | 7 | 15 | 16 | New 17 | 18 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from books_fbv import views 4 | 5 | app_name = 'books_fbv' 6 | 7 | urlpatterns = [ 8 | path('', views.book_list, name='book_list'), 9 | path('new/', views.book_create, name='book_new'), 10 | path('edit//', views.book_update, name='book_edit'), 11 | path('delete//', views.book_delete, name='book_delete'), 12 | ] -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/books_fbv_user/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from books_fbv_user.models import Book 3 | 4 | admin.site.register(Book) -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BooksFbvUserConfig(AppConfig): 5 | name = 'books_fbv_user' 6 | -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/books_fbv_user/migrations/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.urls import reverse 3 | from django.conf import settings 4 | 5 | class Book(models.Model): 6 | user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) 7 | name = models.CharField(max_length=200) 8 | pages = models.IntegerField() 9 | 10 | def __str__(self): 11 | return self.name 12 | 13 | def get_absolute_url(self): 14 | return reverse('books_fbv_user:book_edit', kwargs={'pk': self.pk}) -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/templates/books_fbv_user/book_confirm_delete.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books FBV User: Delete?

6 | 7 |
{% csrf_token %} 8 | Are you sure you want to delete "{{ object }}" ?
9 | 10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/templates/books_fbv_user/book_form.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books FBV User: Edit

6 | 7 |
{% csrf_token %} 8 | {{ form.as_p }} 9 | 10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/templates/books_fbv_user/book_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |

Books FBV User

6 | 7 |
    8 | {% for book in object_list %} 9 |
  • {{ book.name }} ({{ book.pages }} Pages) 10 | edit 11 | delete 12 |
  • 13 | {% endfor %} 14 |
15 | 16 | New 17 | 18 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /DjangoCrud/apps/books_fbv_user/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'books_fbv_user' 6 | 7 | urlpatterns = [ 8 | path('', views.book_list, name='book_list'), 9 | path('new/', views.book_create, name='book_new'), 10 | path('edit//', views.book_update, name='book_edit'), 11 | path('delete//', views.book_delete, name='book_delete'), 12 | ] -------------------------------------------------------------------------------- /DjangoCrud/apps/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apps.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/theme/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ThemeConfig(AppConfig): 5 | name = 'theme' 6 | -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/DjangoCrud/apps/theme/migrations/__init__.py -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/static/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, Helvetica, sans-serif; 3 | width:800px; 4 | margin:auto; 5 | } 6 | 7 | a { 8 | color:#0000EE; 9 | text-decoration:none; 10 | } 11 | 12 | a:hover { 13 | text-decoration:underline; 14 | } 15 | 16 | #user {float:right; } -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 | Class Based Views
6 | Function Based Views
7 | Function Based Views with User Access
8 | 9 | {% endblock %} -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /DjangoCrud/apps/theme/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | def home(request): 4 | return render(request, "home.html") -------------------------------------------------------------------------------- /DjangoCrud/requirements.txt: -------------------------------------------------------------------------------- 1 | Django>=3.2.7,<4.0 -------------------------------------------------------------------------------- /Example/cwp/cwp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/cwp/__init__.py -------------------------------------------------------------------------------- /Example/cwp/cwp/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/cwp/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/cwp/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/cwp/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/cwp/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/cwp/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/cwp/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/cwp/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/cwp/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for cwp project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cwp.settings") 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Example/cwp/cwp/urls.py: -------------------------------------------------------------------------------- 1 | # myproject/urls.py 2 | from django.contrib import admin 3 | from django.urls import path, include 4 | 5 | urlpatterns = [ 6 | path('admin/', admin.site.urls), 7 | path('myapp/', include('myapp.urls')), 8 | ] 9 | -------------------------------------------------------------------------------- /Example/cwp/cwp/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for cwp project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cwp.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Example/cwp/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/db.sqlite3 -------------------------------------------------------------------------------- /Example/cwp/myapp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__init__.py -------------------------------------------------------------------------------- /Example/cwp/myapp/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | 5 | from django.contrib import admin 6 | from .models import MyModel 7 | 8 | admin.site.register(MyModel) -------------------------------------------------------------------------------- /Example/cwp/myapp/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyappConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "myapp" 7 | -------------------------------------------------------------------------------- /Example/cwp/myapp/forms.py: -------------------------------------------------------------------------------- 1 | # myapp/forms.py 2 | from django import forms 3 | from .models import MyModel 4 | 5 | class MyModelForm(forms.ModelForm): 6 | class Meta: 7 | model = MyModel 8 | fields = ['name', 'age'] 9 | -------------------------------------------------------------------------------- /Example/cwp/myapp/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/migrations/__init__.py -------------------------------------------------------------------------------- /Example/cwp/myapp/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Example/cwp/myapp/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Example/cwp/myapp/models.py: -------------------------------------------------------------------------------- 1 | # myapp/models.py 2 | from django.db import models 3 | 4 | class MyModel(models.Model): 5 | name = models.CharField(max_length=255) 6 | age = models.IntegerField() 7 | 8 | -------------------------------------------------------------------------------- /Example/cwp/myapp/templates/myapp/form.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | {% csrf_token %} 4 | {{ form.as_p }} 5 | 6 |
7 | -------------------------------------------------------------------------------- /Example/cwp/myapp/templates/myapp/success.html: -------------------------------------------------------------------------------- 1 | 2 |

Form submitted successfully!

3 | -------------------------------------------------------------------------------- /Example/cwp/myapp/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Example/cwp/myapp/urls.py: -------------------------------------------------------------------------------- 1 | # myapp/urls.py 2 | from django.urls import path 3 | from .views import my_view , success_view 4 | 5 | urlpatterns = [ 6 | path('form/', my_view, name='form'), 7 | path('success/', success_view, name='success'), 8 | ] 9 | -------------------------------------------------------------------------------- /Example/cwp/myapp/views.py: -------------------------------------------------------------------------------- 1 | # myapp/views.py 2 | from django.shortcuts import render, redirect 3 | from .forms import MyModelForm 4 | 5 | def my_view(request): 6 | if request.method == 'POST': 7 | form = MyModelForm(request.POST) 8 | if form.is_valid(): 9 | form.save() 10 | return redirect('success') # Create a success.html template for the success page 11 | else: 12 | form = MyModelForm() 13 | 14 | return render(request, 'myapp/form.html', {'form': form}) 15 | 16 | def success_view(request): 17 | return render(request, 'myapp/success.html') -------------------------------------------------------------------------------- /Project3/p4n_profiles/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/db.sqlite3 -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/__init__.py -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | from django.contrib import admin 5 | from .models import UserProfile 6 | 7 | admin.site.register(UserProfile) 8 | -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MembersConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "members" 7 | -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/migrations/__init__.py -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/members/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | 5 | class UserProfile(models.Model): 6 | first_name = models.CharField(max_length=100) 7 | last_name = models.CharField(max_length=100) 8 | email = models.EmailField(unique=True) 9 | 10 | def __str__(self): 11 | return f'{self.first_name} {self.last_name}' 12 | 13 | -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import display_profiles 3 | 4 | urlpatterns = [ 5 | path('profiles/', display_profiles, name='profile_list'), 6 | ] 7 | -------------------------------------------------------------------------------- /Project3/p4n_profiles/members/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | from django.shortcuts import render 5 | from .models import UserProfile 6 | 7 | def display_profiles(request): 8 | profiles = UserProfile.objects.all() 9 | return render(request, 'members/profile_list.html', {'profiles': profiles}) 10 | -------------------------------------------------------------------------------- /Project3/p4n_profiles/p4n_profiles/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/p4n_profiles/__init__.py -------------------------------------------------------------------------------- /Project3/p4n_profiles/p4n_profiles/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/p4n_profiles/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/p4n_profiles/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/p4n_profiles/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/p4n_profiles/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/p4n_profiles/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/p4n_profiles/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project3/p4n_profiles/p4n_profiles/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /Project3/p4n_profiles/p4n_profiles/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for p4n_profiles project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "p4n_profiles.settings") 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Project3/p4n_profiles/p4n_profiles/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for p4n_profiles project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "p4n_profiles.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Project4/p4n_form/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/db.sqlite3 -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__init__.py -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/forms.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/forms.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Employee 3 | 4 | admin.site.register(Employee) -------------------------------------------------------------------------------- /Project4/p4n_form/employee/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class EmployeeConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "employee" 7 | -------------------------------------------------------------------------------- /Project4/p4n_form/employee/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Employee 3 | 4 | class EmployeeForm(forms.ModelForm): 5 | class Meta: 6 | model = Employee 7 | fields = ['first_name', 'last_name', 'email', 'phone_number'] 8 | -------------------------------------------------------------------------------- /Project4/p4n_form/employee/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/migrations/__init__.py -------------------------------------------------------------------------------- /Project4/p4n_form/employee/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/employee/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/employee/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | class Employee(models.Model): 4 | first_name = models.CharField(max_length=100) 5 | last_name = models.CharField(max_length=100) 6 | email = models.EmailField() 7 | phone_number = models.CharField(max_length=15) 8 | 9 | -------------------------------------------------------------------------------- /Project4/p4n_form/employee/static/css/style.css: -------------------------------------------------------------------------------- 1 | /* Custom CSS for adjusting label width */ 2 | .form-group label { 3 | width: 150px; /* Adjust as needed */ 4 | text-align: right; 5 | margin-bottom: 0; 6 | padding-right: 10px; 7 | } 8 | body{ 9 | background-color: aqua; 10 | } -------------------------------------------------------------------------------- /Project4/p4n_form/employee/templates/navbar.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Project4/p4n_form/employee/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Project4/p4n_form/employee/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('form/', views.employee_form, name='employee_form'), 6 | path('list/', views.employee_list, name='employee_list'), 7 | ] 8 | -------------------------------------------------------------------------------- /Project4/p4n_form/employee/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from .forms import EmployeeForm 3 | from .models import Employee 4 | def employee_form(request): 5 | if request.method == 'POST': 6 | form = EmployeeForm(request.POST) 7 | if form.is_valid(): 8 | form.save() 9 | # Redirect to a success page or do something else 10 | else: 11 | form = EmployeeForm() 12 | return render(request, 'employee_form.html', {'form': form}) 13 | 14 | def employee_list(request): 15 | employees = Employee.objects.all() 16 | return render(request, 'employee_list.html', {'employees': employees}) 17 | 18 | 19 | -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__init__.py -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Project4/p4n_form/p4n_form/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for p4n_form project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "p4n_form.settings") 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path('admin/', admin.site.urls), 6 | path('', include('employee.urls')), 7 | ] 8 | -------------------------------------------------------------------------------- /Project4/p4n_form/p4n_form/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for p4n_form project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "p4n_form.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Search_Component/blog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__init__.py -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/admin.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/admin.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/models.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/models.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/__pycache__/views.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/__pycache__/views.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import * 3 | # Register your models here. 4 | 5 | admin.site.register(Blog) 6 | -------------------------------------------------------------------------------- /Search_Component/blog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogConfig(AppConfig): 5 | name = 'blog' 6 | -------------------------------------------------------------------------------- /Search_Component/blog/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/migrations/__init__.py -------------------------------------------------------------------------------- /Search_Component/blog/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/migrations/__pycache__/0001_initial.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/migrations/__pycache__/0001_initial.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blog/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blog/migrations/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blog/migrations/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blog/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Blog(models.Model): 5 | title = models.CharField(max_length=150) 6 | created_at = models.DateTimeField(auto_now_add=True) 7 | description = models.CharField(max_length=550) 8 | 9 | def __str__(self): 10 | return self.title 11 | -------------------------------------------------------------------------------- /Search_Component/blog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Search_Component/blog/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.PostIndexView.as_view(), name='post-list'), 6 | path('detail/', views.PostDetailView.as_view(), name='post_detail'), 7 | path('search-blogs/', views.BlogSearchView.as_view(), name='search_blogs') 8 | ] 9 | -------------------------------------------------------------------------------- /Search_Component/blogging/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__init__.py -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/settings.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/settings.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/__pycache__/wsgi.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/blogging/__pycache__/wsgi.cpython-39.pyc -------------------------------------------------------------------------------- /Search_Component/blogging/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for blogging project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogging.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Search_Component/blogging/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for blogging project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogging.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Search_Component/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/Search_Component/db.sqlite3 -------------------------------------------------------------------------------- /blogs/blogs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__init__.py -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/blogs/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/blogs/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/blogs/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for blogs project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blogs.settings") 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /blogs/blogs/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for blogs project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blogs.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /blogs/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/db.sqlite3 -------------------------------------------------------------------------------- /blogs/p4nblog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__init__.py -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import BlogPost 4 | 5 | admin.site.register(BlogPost) 6 | -------------------------------------------------------------------------------- /blogs/p4nblog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class P4NblogConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "p4nblog" 7 | -------------------------------------------------------------------------------- /blogs/p4nblog/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/migrations/__init__.py -------------------------------------------------------------------------------- /blogs/p4nblog/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/blogs/p4nblog/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /blogs/p4nblog/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | class BlogPost(models.Model): 4 | title = models.CharField(max_length=200) 5 | content = models.TextField() 6 | 7 | def __str__(self): 8 | return self.title 9 | -------------------------------------------------------------------------------- /blogs/p4nblog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /blogs/p4nblog/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import create_post, show_posts 3 | 4 | urlpatterns = [ 5 | path('', create_post, name='create_post'), 6 | path('show/', show_posts, name='show_posts'), 7 | ] 8 | -------------------------------------------------------------------------------- /blogs/p4nblog/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from .models import BlogPost 3 | 4 | def create_post(request): 5 | if request.method == 'POST': 6 | title = request.POST['title'] 7 | content = request.POST['content'] 8 | BlogPost.objects.create(title=title, content=content) 9 | return redirect('show_posts') 10 | return render(request, 'create_post.html') 11 | 12 | def show_posts(request): 13 | posts = BlogPost.objects.all() 14 | return render(request, 'show_posts.html', {'posts': posts}) -------------------------------------------------------------------------------- /cart_component/cart/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__init__.py -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/admin.py: -------------------------------------------------------------------------------- 1 | # cart/admin.py 2 | 3 | from django.contrib import admin 4 | from .models import CartItem 5 | 6 | admin.site.register(CartItem) 7 | -------------------------------------------------------------------------------- /cart_component/cart/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CartConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'cart' 7 | -------------------------------------------------------------------------------- /cart_component/cart/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/migrations/__init__.py -------------------------------------------------------------------------------- /cart_component/cart/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart/models.py: -------------------------------------------------------------------------------- 1 | # cart/models.py 2 | 3 | from django.db import models 4 | from django.contrib.auth.models import User 5 | 6 | class CartItem(models.Model): 7 | user = models.ForeignKey(User, on_delete=models.CASCADE) 8 | product_name = models.CharField(max_length=100) 9 | quantity = models.PositiveIntegerField(default=1) 10 | price = models.DecimalField(max_digits=10, decimal_places=2) 11 | -------------------------------------------------------------------------------- /cart_component/cart/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /cart_component/cart/urls.py: -------------------------------------------------------------------------------- 1 | # cart/urls.py 2 | 3 | from django.urls import path 4 | from . import views 5 | 6 | app_name = 'cart' 7 | urlpatterns = [ 8 | path('add/', views.add_to_cart, name='add_to_cart'), 9 | path('remove//', views.remove_from_cart, name='remove_from_cart'), 10 | path('', views.cart_view, name='cart_view'), 11 | ] 12 | -------------------------------------------------------------------------------- /cart_component/cart_component/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__init__.py -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/cart_component/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /cart_component/cart_component/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for cart_component project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cart_component.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /cart_component/cart_component/urls.py: -------------------------------------------------------------------------------- 1 | # myproject/urls.py 2 | 3 | from django.contrib import admin 4 | from django.urls import path, include 5 | 6 | urlpatterns = [ 7 | path('admin/', admin.site.urls), 8 | path('cart/', include('cart.urls')), 9 | ] 10 | -------------------------------------------------------------------------------- /cart_component/cart_component/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for cart_component project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cart_component.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /cart_component/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/cart_component/db.sqlite3 -------------------------------------------------------------------------------- /django_login/blog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__init__.py -------------------------------------------------------------------------------- /django_login/blog/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/forms.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/forms.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Post 3 | 4 | admin.site.register(Post) 5 | -------------------------------------------------------------------------------- /django_login/blog/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BlogConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'blog' 7 | -------------------------------------------------------------------------------- /django_login/blog/forms.py: -------------------------------------------------------------------------------- 1 | from django.forms import ModelForm 2 | from .models import Post 3 | 4 | 5 | class PostForm(ModelForm): 6 | class Meta: 7 | model = Post 8 | fields = ['title', 'content', 'author', 'author'] 9 | -------------------------------------------------------------------------------- /django_login/blog/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/migrations/__init__.py -------------------------------------------------------------------------------- /django_login/blog/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/blog/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/blog/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/blog/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.utils import timezone 3 | from django.contrib.auth.models import User 4 | 5 | 6 | class Post(models.Model): 7 | title = models.CharField(max_length=120) 8 | content = models.TextField() 9 | published_at = models.DateTimeField(default=timezone.now) 10 | author = models.ForeignKey(User, on_delete=models.CASCADE) 11 | 12 | def __str__(self): 13 | return self.title 14 | 15 | class Meta: 16 | ordering = ['-published_at'] 17 | -------------------------------------------------------------------------------- /django_login/blog/templates/blog/about.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} {% block content %} 2 |

About

3 | {% endblock content %} 4 | -------------------------------------------------------------------------------- /django_login/blog/templates/blog/home.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 |

My Posts

5 | {% for post in posts %} 6 |

{{ post.title }}

7 | Published on {{ post.published_at | date:"M d, Y" }} by {{ post.author | title}} 8 |

{{ post.content }}

9 |

10 | Edit 11 | Delete 12 |

13 | {% endfor %} 14 | {% endblock content %} -------------------------------------------------------------------------------- /django_login/blog/templates/blog/post_confirm_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 |

Delete Post

5 | 6 |
7 | {% csrf_token %} 8 |

Are you sure that you want to delete the post "{{post.title}}"?

9 |
10 | 11 | Cancel 12 |
13 |
14 | 15 | {% endblock content %} -------------------------------------------------------------------------------- /django_login/blog/templates/blog/post_form.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} {% block content %} 2 | 3 |

{% if id %} Edit {% else %} New {% endif %} Post

4 |
5 | {% csrf_token %} 6 | {{ form.as_p }} 7 | 8 |
9 | 10 | {% endblock content %} 11 | -------------------------------------------------------------------------------- /django_login/blog/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /django_login/blog/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.home, name='posts'), 6 | path('post/create', views.create_post, name='post-create'), 7 | path('post/edit//', views.edit_post, name='post-edit'), 8 | path('post/delete//', views.delete_post, name='post-delete'), 9 | path('about/', views.about, name='about'), 10 | ] 11 | -------------------------------------------------------------------------------- /django_login/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/db.sqlite3 -------------------------------------------------------------------------------- /django_login/django_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__init__.py -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/django_project/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/django_project/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/django_project/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for django_project project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_project.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /django_login/django_project/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path('admin/', admin.site.urls), 6 | path('', include('blog.urls')), 7 | path('', include('users.urls')) 8 | ] 9 | -------------------------------------------------------------------------------- /django_login/django_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for django_project project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_project.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /django_login/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.6.0 2 | Django==4.1.5 3 | sqlparse==0.4.3 4 | tzdata==2022.7 5 | -------------------------------------------------------------------------------- /django_login/static/css/style.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: #0052ea; 3 | } 4 | 5 | form { 6 | max-width: 400px; 7 | } 8 | label, 9 | input, 10 | textarea, 11 | select { 12 | display: block; 13 | width: 100%; 14 | } 15 | 16 | input[type='submit'] { 17 | display: inline-block; 18 | width: auto; 19 | } 20 | 21 | .errorlist { 22 | padding: 0; 23 | margin: 0; 24 | } 25 | .errorlist li { 26 | color: red; 27 | list-style: none; 28 | } 29 | 30 | .alert { 31 | padding: 0.5rem; 32 | } 33 | 34 | .alert-success { 35 | background-color: #dfd; 36 | } 37 | .alert-error { 38 | background-color: #ba2121; 39 | color: #fff; 40 | } 41 | -------------------------------------------------------------------------------- /django_login/static/js/app.js: -------------------------------------------------------------------------------- 1 | /* remove comments below to see the alert */ 2 | 3 | // setTimeout(() => { 4 | // alert('Welcome to my site!'); 5 | // }, 3000); 6 | -------------------------------------------------------------------------------- /django_login/users/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__init__.py -------------------------------------------------------------------------------- /django_login/users/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/forms.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/forms.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /django_login/users/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class UsersConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'users' 7 | -------------------------------------------------------------------------------- /django_login/users/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | 4 | class LoginForm(forms.Form): 5 | username = forms.CharField(max_length=65) 6 | password = forms.CharField(max_length=65, widget=forms.PasswordInput) 7 | -------------------------------------------------------------------------------- /django_login/users/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/migrations/__init__.py -------------------------------------------------------------------------------- /django_login/users/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /django_login/users/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/django_login/users/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /django_login/users/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /django_login/users/templates/users/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 |
5 | {% csrf_token %} 6 |

Login

7 | {{form.as_p}} 8 | 9 |
10 | 11 | {% endblock content%} -------------------------------------------------------------------------------- /django_login/users/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /django_login/users/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('login/', views.sign_in, name='login'), 6 | path('logout/', views.sign_out, name='logout'), 7 | ] 8 | -------------------------------------------------------------------------------- /employee_search_project/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/db.sqlite3 -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__init__.py -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/forms.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/forms.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Employee 3 | 4 | # Register your models here. 5 | admin.site.register(Employee) 6 | -------------------------------------------------------------------------------- /employee_search_project/employee_directory/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class EmployeeDirectoryConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'employee_directory' 7 | -------------------------------------------------------------------------------- /employee_search_project/employee_directory/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | class EmployeeSearchForm(forms.Form): 4 | search_query = forms.CharField(label='Search Employee') 5 | -------------------------------------------------------------------------------- /employee_search_project/employee_directory/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/migrations/__init__.py -------------------------------------------------------------------------------- /employee_search_project/employee_directory/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_directory/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_directory/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | class Employee(models.Model): 4 | name = models.CharField(max_length=100) 5 | department = models.CharField(max_length=100) 6 | position = models.CharField(max_length=100) 7 | -------------------------------------------------------------------------------- /employee_search_project/employee_directory/templates/employee_directory/search_form.html: -------------------------------------------------------------------------------- 1 |
2 | {{ form.as_p }} 3 | 4 |
5 | -------------------------------------------------------------------------------- /employee_search_project/employee_directory/templates/employee_directory/search_results.html: -------------------------------------------------------------------------------- 1 |

Search Results for "{{ search_query }}"

2 |
    3 | {% for employee in employees %} 4 |
  • {{ employee.name }} - {{ employee.department }} - {{ employee.position }}
  • 5 | {% empty %} 6 |
  • No results found
  • 7 | {% endfor %} 8 |
9 | -------------------------------------------------------------------------------- /employee_search_project/employee_directory/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /employee_search_project/employee_directory/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import search_employee 3 | 4 | urlpatterns = [ 5 | path('', search_employee, name='search_employee'), 6 | ] 7 | -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__init__.py -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_search_project/employee_search_project/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for employee_search_project project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'employee_search_project.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /employee_search_project/employee_search_project/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for employee_search_project project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'employee_search_project.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /employee_searching/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/db.sqlite3 -------------------------------------------------------------------------------- /employee_searching/employee_searching/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/employee_searching/__init__.py -------------------------------------------------------------------------------- /employee_searching/employee_searching/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/employee_searching/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/employee_searching/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/employee_searching/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/employee_searching/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/employee_searching/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/employee_searching/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/employee_searching/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/employee_searching/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for employee_searching project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'employee_searching.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /employee_searching/employee_searching/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path('admin/', admin.site.urls), 6 | path('', include('p4n_empdata.urls')), 7 | 8 | ] -------------------------------------------------------------------------------- /employee_searching/employee_searching/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for employee_searching project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'employee_searching.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/__init__.py -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | from .models import * 5 | 6 | admin.site.register(EmpData) 7 | -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class P4NEmpdataConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'p4n_empdata' 7 | -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/migrations/__init__.py -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/employee_searching/p4n_empdata/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | 5 | class EmpData(models.Model): 6 | emp_name = models.CharField(max_length=150) 7 | join_date = models.DateTimeField(auto_now_add=True) 8 | description = models.CharField(max_length=558) 9 | 10 | def __str__(self): 11 | return self.emp_name -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /employee_searching/p4n_empdata/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.Emp_indexView.as_view(), name='emp-list'), 6 | path('detail/', views.EmpDetailView.as_view(), name='emp_detail'), 7 | path('search-emp/', views.EmpSearchView.as_view(), name='search_emp') 8 | ] -------------------------------------------------------------------------------- /message/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/db.sqlite3 -------------------------------------------------------------------------------- /message/message/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__init__.py -------------------------------------------------------------------------------- /message/message/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /message/message/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /message/message/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /message/message/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /message/message/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /message/message/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /message/message/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /message/message/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/message/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /message/message/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for message project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "message.settings") 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /message/message/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for message project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "message.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /message/messageapp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__init__.py -------------------------------------------------------------------------------- /message/messageapp/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Msg 3 | # Register your models here. 4 | admin.site.register(Msg) -------------------------------------------------------------------------------- /message/messageapp/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MessageappConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "messageapp" 7 | -------------------------------------------------------------------------------- /message/messageapp/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/migrations/__init__.py -------------------------------------------------------------------------------- /message/messageapp/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /message/messageapp/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/message/messageapp/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /message/messageapp/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Msg(models.Model): 5 | name=models.CharField(max_length=100) 6 | email = models.CharField(max_length=100) 7 | mobile=models.BigIntegerField() 8 | msg = models.TextField() -------------------------------------------------------------------------------- /message/messageapp/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /message/messageapp/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns=[ 5 | path("create",views.create), 6 | path("dashboard",views.dashboard), 7 | path("edit/",views.edit), 8 | path("delete/",views.delete) 9 | ] 10 | 11 | -------------------------------------------------------------------------------- /mylogin/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/db.sqlite3 -------------------------------------------------------------------------------- /mylogin/mylogin/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/mylogin/__init__.py -------------------------------------------------------------------------------- /mylogin/mylogin/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/mylogin/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/mylogin/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/mylogin/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/mylogin/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/mylogin/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/mylogin/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/mylogin/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/mylogin/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for mylogin project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mylogin.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /mylogin/mylogin/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for mylogin project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mylogin.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /mylogin/p4n_login/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__init__.py -------------------------------------------------------------------------------- /mylogin/p4n_login/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /mylogin/p4n_login/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class P4NLoginConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'p4n_login' 7 | -------------------------------------------------------------------------------- /mylogin/p4n_login/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.contrib.auth.forms import UserCreationForm 3 | from django.contrib.auth.models import User 4 | 5 | 6 | # Create your forms here. 7 | 8 | class NewUserForm(UserCreationForm): 9 | email = forms.EmailField(required=True) 10 | 11 | class Meta: 12 | model = User 13 | fields = ("username", "email", "password1", "password2") 14 | 15 | def save(self, commit=True): 16 | user = super(NewUserForm, self).save(commit=False) 17 | user.email = self.cleaned_data['email'] 18 | if commit: 19 | user.save() 20 | return user -------------------------------------------------------------------------------- /mylogin/p4n_login/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/migrations/__init__.py -------------------------------------------------------------------------------- /mylogin/p4n_login/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/mylogin/p4n_login/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /mylogin/p4n_login/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /mylogin/p4n_login/templates/p4n_login/login.html: -------------------------------------------------------------------------------- 1 | {% extends "main/header.html" %} 2 | 3 | {% block content %} 4 | 5 | {% load crispy_forms_tags %} 6 | 7 | 8 |
9 |

Login

10 |
11 | {% csrf_token %} 12 | {{ login_form|crispy }} 13 | 14 |
15 |

Don't have an account? Create an account.

16 |
17 | 18 | {% endblock %} -------------------------------------------------------------------------------- /mylogin/p4n_login/templates/p4n_login/register.html: -------------------------------------------------------------------------------- 1 | {% extends "main/header.html" %} 2 | 3 | {% block content %} 4 | 5 | {% load crispy_forms_tags %} 6 | 7 | 8 |
9 |

Register

10 |
11 | {% csrf_token %} 12 | {{ register_form|crispy }} 13 | 14 |
15 |

If you already have an account, login instead.

16 |
17 | 18 | {% endblock %} -------------------------------------------------------------------------------- /mylogin/p4n_login/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /mylogin/p4n_login/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from p4n_login import views 3 | 4 | app_name = "p4n_login" 5 | 6 | urlpatterns = [ 7 | # path("", views.homepage, name="homepage"), 8 | path("", views.register_request, name="register"), 9 | path("login", views.login_request, name="login"), 10 | path("logout", views.logout_request, name= "logout"), 11 | ] -------------------------------------------------------------------------------- /p4n_payment/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/db.sqlite3 -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/p4n_payment/__init__.py -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/p4n_payment/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/p4n_payment/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/p4n_payment/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/p4n_payment/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for p4n_payment project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'p4n_payment.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path('admin/', admin.site.urls), 6 | path("payment/", include("payment_app.urls")), 7 | ] -------------------------------------------------------------------------------- /p4n_payment/p4n_payment/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for p4n_payment project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'p4n_payment.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /p4n_payment/payment_app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/__init__.py -------------------------------------------------------------------------------- /p4n_payment/payment_app/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/payment_app/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/payment_app/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/payment_app/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/payment_app/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/payment_app/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/payment_app/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /p4n_payment/payment_app/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentAppConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'payment_app' 7 | -------------------------------------------------------------------------------- /p4n_payment/payment_app/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/migrations/__init__.py -------------------------------------------------------------------------------- /p4n_payment/payment_app/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/p4n_payment/payment_app/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /p4n_payment/payment_app/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /p4n_payment/payment_app/templates/payment_failed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Payment Failed 8 | 9 | 10 |

Payment Failed

11 |

Your payment could not be processed. Please try again later.

12 | 13 | -------------------------------------------------------------------------------- /p4n_payment/payment_app/templates/payment_success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Payment Success 8 | 9 | 10 |

Payment Successful

11 |

Your payment has been successfully processed.

12 | 13 | -------------------------------------------------------------------------------- /p4n_payment/payment_app/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /p4n_payment/payment_app/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path("initiate-payment/", views.initiate_payment, name="initiate_payment"), 6 | path("payment-success/", views.payment_success, name="payment_success"), 7 | path("payment-failed/", views.payment_failed, name="payment_failed"), 8 | ] -------------------------------------------------------------------------------- /razorpay_integration/payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/razorpay_integration/payment/__init__.py -------------------------------------------------------------------------------- /razorpay_integration/payment/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /razorpay_integration/payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'payment' 7 | -------------------------------------------------------------------------------- /razorpay_integration/payment/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/razorpay_integration/payment/migrations/__init__.py -------------------------------------------------------------------------------- /razorpay_integration/payment/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /razorpay_integration/payment/templates/failure.html: -------------------------------------------------------------------------------- 1 |

Payment Failed!

2 | -------------------------------------------------------------------------------- /razorpay_integration/payment/templates/pay.html: -------------------------------------------------------------------------------- 1 |
2 | {% csrf_token %} 3 | 4 | 5 | 6 |
7 | -------------------------------------------------------------------------------- /razorpay_integration/payment/templates/success.html: -------------------------------------------------------------------------------- 1 |

Payment Successful!

-------------------------------------------------------------------------------- /razorpay_integration/payment/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /razorpay_integration/payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import initiate_payment, complete_payment 3 | 4 | urlpatterns = [ 5 | path('pay/', initiate_payment, name='initiate_payment'), 6 | path('complete/', complete_payment, name='complete_payment'), 7 | ] 8 | -------------------------------------------------------------------------------- /razorpay_integration/razorpay_integration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/razorpay_integration/razorpay_integration/__init__.py -------------------------------------------------------------------------------- /razorpay_integration/razorpay_integration/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/razorpay_integration/razorpay_integration/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /razorpay_integration/razorpay_integration/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/razorpay_integration/razorpay_integration/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /razorpay_integration/razorpay_integration/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for razorpay_integration project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'razorpay_integration.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /razorpay_integration/razorpay_integration/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for razorpay_integration project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'razorpay_integration.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /todo_list/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/db.sqlite3 -------------------------------------------------------------------------------- /todo_list/media/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/media/avatar.jpg -------------------------------------------------------------------------------- /todo_list/media/profile_avatars/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/media/profile_avatars/1.png -------------------------------------------------------------------------------- /todo_list/media/profile_avatars/aleximage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/media/profile_avatars/aleximage.jpg -------------------------------------------------------------------------------- /todo_list/media/profile_avatars/samosa_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/media/profile_avatars/samosa_2.png -------------------------------------------------------------------------------- /todo_list/static/css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200;300;400;500;700;800&display=swap'); 2 | @import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css'); 3 | -------------------------------------------------------------------------------- /todo_list/static/images/feature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/static/images/feature.png -------------------------------------------------------------------------------- /todo_list/templates/home.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html'%} 2 | 3 | {%load static %} 4 | 5 | 6 | {%block content%} 7 |
8 |
9 |

Todo

10 |

Todo helps you more focus, either work or play.

11 | Get Started 12 |
13 | 14 |
15 | {%endblock content%} -------------------------------------------------------------------------------- /todo_list/todo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__init__.py -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Task 4 | 5 | admin.site.register(Task) -------------------------------------------------------------------------------- /todo_list/todo/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class TodoConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'todo' 7 | -------------------------------------------------------------------------------- /todo_list/todo/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/migrations/__init__.py -------------------------------------------------------------------------------- /todo_list/todo/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | class Task(models.Model): 5 | title = models.CharField(max_length=255) 6 | description = models.TextField(null=True, blank=True) 7 | completed = models.BooleanField(default=False) 8 | created_at = models.DateTimeField(auto_now_add=True) 9 | user = models.ForeignKey(User,on_delete=models.CASCADE, null=True, blank=True) 10 | 11 | def __str__(self): 12 | return self.title 13 | 14 | class Meta: 15 | ordering = ['completed'] -------------------------------------------------------------------------------- /todo_list/todo/templates/todo/task_confirm_delete.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html'%} 2 | 3 | {%block content%} 4 |
5 |
6 | {% csrf_token %} 7 |

Delete Task

8 |

Are you sure that you want to delete "{{task}}"?

9 |

10 | 11 | Cancel 12 |

13 |
14 |
15 | 16 | {%endblock content%} -------------------------------------------------------------------------------- /todo_list/todo/templates/todo/task_detail.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html'%} 2 | 3 | {%block content%} 4 | 5 |
6 |
7 |

{{ task.title }}

8 | 9 | {% if task.completed %} Completed {%else%} Pending {%endif%} 10 | 11 |
12 |

{{task.description}}

13 |
14 | 15 | {%endblock content%} -------------------------------------------------------------------------------- /todo_list/todo/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /todo_list/todo/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import ( 3 | home, 4 | TaskList, 5 | TaskDetail, 6 | TaskCreate, 7 | TaskUpdate, 8 | TaskDelete 9 | ) 10 | 11 | 12 | urlpatterns = [ 13 | path('', home, name='home'), 14 | path('tasks/', TaskList.as_view(),name='tasks'), 15 | path('task//', TaskDetail.as_view(),name='task'), 16 | path('task/create/', TaskCreate.as_view(),name='task-create'), 17 | path('task/update//', TaskUpdate.as_view(),name='task-update'), 18 | path('task/delete//', TaskDelete.as_view(),name='task-delete'), 19 | ] -------------------------------------------------------------------------------- /todo_list/todo_list/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__init__.py -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/todo_list/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/todo_list/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for todo_list project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todo_list.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /todo_list/todo_list/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | from django.conf import settings 5 | from django.conf.urls.static import static 6 | 7 | urlpatterns = [ 8 | path('admin/', admin.site.urls), 9 | path('',include('todo.urls')), 10 | path('',include('users.urls')) 11 | ] 12 | 13 | 14 | 15 | if settings.DEBUG: 16 | urlpatterns += static(settings.MEDIA_URL, 17 | document_root=settings.MEDIA_ROOT) -------------------------------------------------------------------------------- /todo_list/todo_list/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for todo_list project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todo_list.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /todo_list/users/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__init__.py -------------------------------------------------------------------------------- /todo_list/users/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/forms.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/forms.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/signals.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/signals.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/signals.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/signals.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Profile 3 | 4 | 5 | admin.site.register(Profile) -------------------------------------------------------------------------------- /todo_list/users/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class UsersConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'users' 7 | 8 | def ready(self): 9 | import users.signals 10 | -------------------------------------------------------------------------------- /todo_list/users/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/migrations/__init__.py -------------------------------------------------------------------------------- /todo_list/users/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/migrations/__pycache__/0001_initial.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/migrations/__pycache__/0001_initial.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /todo_list/users/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/todo_list/users/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /todo_list/users/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.contrib.auth.models import User 3 | from django.dispatch import receiver 4 | from .models import Profile 5 | 6 | 7 | @receiver(post_save, sender=User) 8 | def create_profile(sender, instance, created, **kwargs): 9 | if created: 10 | Profile.objects.create(user=instance) 11 | 12 | 13 | @receiver(post_save, sender=User) 14 | def save_profile(sender, instance, **kwargs): 15 | instance.profile.save() 16 | -------------------------------------------------------------------------------- /todo_list/users/templates/users/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html'%} 2 | 3 | {%block content%} 4 | 5 |
6 |

Your password has been changed successfully. Please Login

7 |
8 | 9 | {%endblock content%} -------------------------------------------------------------------------------- /todo_list/users/templates/users/password_reset_confirm.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html'%} 2 | 3 | {%block content%} 4 | 5 |
6 |
7 | {% csrf_token %} 8 |

Password Reset Confirm

9 | 10 | {% for field in form %} 11 | {{ field.label_tag }} 12 | {{ field }} 13 | {% if field.errors %} 14 | {{ field.errors|striptags }} 15 | {% endif %} 16 | {% endfor %} 17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 | 25 | {%endblock content%} -------------------------------------------------------------------------------- /todo_list/users/templates/users/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html'%} 2 | 3 | {%block content%} 4 |
5 |

Reset Password

6 |

Please check your inbox and follow the instruction to reset your password.

7 |
8 | 9 | {%endblock content%} -------------------------------------------------------------------------------- /todo_list/users/templates/users/password_reset_email.html: -------------------------------------------------------------------------------- 1 |

Hi

2 | 3 |

You're receiving this email because you requested a password reset for your user account at {{domain}}/

4 | 5 |

Please click the following link to reset your password:

6 | 7 | {{ protocol }}://{{ domain }}{% url "password_reset_confirm" uidb64=uid token=token %} 8 | 9 |

Thanks

10 |

Todo App Team

11 | -------------------------------------------------------------------------------- /todo_list/users/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /user_authentication/cwp_login/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__init__.py -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/admin.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/admin.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/admin.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/admin.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/apps.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/apps.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/apps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/apps.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/forms.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/forms.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/forms.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/forms.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/models.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/models.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/models.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/models.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/views.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/views.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/__pycache__/views.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/__pycache__/views.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /user_authentication/cwp_login/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CwpLoginConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'cwp_login' 7 | -------------------------------------------------------------------------------- /user_authentication/cwp_login/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.contrib.auth.forms import UserCreationForm 3 | from django.contrib.auth.models import User 4 | 5 | class SignupForm(UserCreationForm): 6 | class Meta: 7 | model = User 8 | fields = ['username', 'password1', 'password2'] 9 | 10 | class LoginForm(forms.Form): 11 | username = forms.CharField() 12 | password = forms.CharField(widget=forms.PasswordInput) -------------------------------------------------------------------------------- /user_authentication/cwp_login/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/migrations/__init__.py -------------------------------------------------------------------------------- /user_authentication/cwp_login/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/migrations/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/cwp_login/migrations/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/cwp_login/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /user_authentication/cwp_login/templates/index.html: -------------------------------------------------------------------------------- 1 | {% if request.user.is_authenticated %} 2 |

{{ request.user.username }}

3 | Logout 4 | {% else %} 5 | Login 6 | Signup 7 | {% endif %} 8 | 9 |

Welcome!

-------------------------------------------------------------------------------- /user_authentication/cwp_login/templates/login.html: -------------------------------------------------------------------------------- 1 |

Login

2 |
3 | {% csrf_token %} 4 | {{ form.as_p }} 5 | 6 | Dont have Account Create 7 |
-------------------------------------------------------------------------------- /user_authentication/cwp_login/templates/signup.html: -------------------------------------------------------------------------------- 1 |

Signup

2 |
3 | {% csrf_token %} 4 | {{ form.as_p }} 5 | 6 | Already have account? 7 |
-------------------------------------------------------------------------------- /user_authentication/cwp_login/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /user_authentication/cwp_login/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.index, name='home'), 6 | path('login/', views.user_login, name='login'), 7 | path('signup/', views.user_signup, name='signup'), 8 | path('logout/', views.user_logout, name='logout'), 9 | ] -------------------------------------------------------------------------------- /user_authentication/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/db.sqlite3 -------------------------------------------------------------------------------- /user_authentication/user_authentication/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__init__.py -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/settings.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/settings.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/settings.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/settings.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/urls.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/urls.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/urls.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/urls.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/wsgi.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/wsgi.cpython-310.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/__pycache__/wsgi.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pankaj-Str/Django-Tutorial/a35c2e449597cfe6f679e2ee64b506eee3399451/user_authentication/user_authentication/__pycache__/wsgi.cpython-312.pyc -------------------------------------------------------------------------------- /user_authentication/user_authentication/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for user_authentication project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_authentication.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /user_authentication/user_authentication/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for user_authentication project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_authentication.settings') 15 | 16 | application = get_wsgi_application() 17 | --------------------------------------------------------------------------------