├── App ├── __init__.py ├── migrations │ ├── __init__.py │ └── __pycache__ │ │ ├── __init__.cpython-37.pyc │ │ └── __init__.cpython-38.pyc ├── models.py ├── admin.py ├── tests.py ├── apps.py ├── __pycache__ │ ├── urls.cpython-37.pyc │ ├── urls.cpython-38.pyc │ ├── admin.cpython-37.pyc │ ├── admin.cpython-38.pyc │ ├── models.cpython-37.pyc │ ├── models.cpython-38.pyc │ ├── views.cpython-37.pyc │ ├── views.cpython-38.pyc │ ├── __init__.cpython-37.pyc │ └── __init__.cpython-38.pyc ├── urls.py ├── templates │ ├── index.html │ ├── login.html │ ├── register.html │ ├── restatic.py │ ├── resume.html │ └── create-resume.html ├── restatic.py ├── static │ ├── style.css │ └── script.js └── views.py ├── RESUMEBUILDER ├── __init__.py ├── __pycache__ │ ├── urls.cpython-37.pyc │ ├── urls.cpython-38.pyc │ ├── wsgi.cpython-37.pyc │ ├── wsgi.cpython-38.pyc │ ├── __init__.cpython-37.pyc │ ├── __init__.cpython-38.pyc │ ├── settings.cpython-37.pyc │ └── settings.cpython-38.pyc ├── wsgi.py ├── urls.py └── settings.py ├── db.sqlite3 ├── manage.py ├── requirements.txt └── README.md /App/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /App/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /RESUMEBUILDER/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /App/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /App/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /App/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/db.sqlite3 -------------------------------------------------------------------------------- /App/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AppConfig(AppConfig): 5 | name = 'App' 6 | -------------------------------------------------------------------------------- /App/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /App/__pycache__/urls.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/urls.cpython-38.pyc -------------------------------------------------------------------------------- /App/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /App/__pycache__/admin.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/admin.cpython-38.pyc -------------------------------------------------------------------------------- /App/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /App/__pycache__/models.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/models.cpython-38.pyc -------------------------------------------------------------------------------- /App/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /App/__pycache__/views.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/views.cpython-38.pyc -------------------------------------------------------------------------------- /App/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /App/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/urls.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/urls.cpython-38.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/wsgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/wsgi.cpython-37.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/wsgi.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/wsgi.cpython-38.pyc -------------------------------------------------------------------------------- /App/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /App/migrations/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/App/migrations/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/__init__.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/__init__.cpython-38.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/__pycache__/settings.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BurhanMohammad/Django-Resume-Bulider/HEAD/RESUMEBUILDER/__pycache__/settings.cpython-38.pyc -------------------------------------------------------------------------------- /RESUMEBUILDER/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for RESUMEBUILDER 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/2.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', 'RESUMEBUILDER.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /App/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.conf.urls.static import static 3 | from django.urls import path, include 4 | from . import views 5 | 6 | app_name = "App" 7 | 8 | urlpatterns = [ 9 | path("", views.login, name="login"), 10 | path("login", views.login, name="login"), 11 | path("register", views.register, name="register"), 12 | path("index", views.index, name="index"), 13 | path("create-resume", views.create_resume, name="create-resume"), 14 | path("resume", views.resume, name="resume"), 15 | 16 | 17 | ] 18 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'RESUMEBUILDER.settings') 9 | try: 10 | from django.core.management import execute_from_command_line 11 | except ImportError as exc: 12 | raise ImportError( 13 | "Couldn't import Django. Are you sure it's installed and " 14 | "available on your PYTHONPATH environment variable? Did you " 15 | "forget to activate a virtual environment?" 16 | ) from exc 17 | execute_from_command_line(sys.argv) 18 | 19 | 20 | if __name__ == '__main__': 21 | main() 22 | -------------------------------------------------------------------------------- /App/templates/index.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | Fauna Resume Builder 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 |

18 | Build Your Resume 19 |

20 |

21 | Dashboard 22 |

23 |
24 | 25 |
26 |
27 | Create/Edit Resume 28 |
29 |
30 | View Resume 31 |
32 |
33 | Logout 34 |
35 | 36 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.6.0 2 | async-timeout==3.0.1 3 | backports.zoneinfo==0.2.1 4 | certifi==2020.12.5 5 | cffi==1.15.1 6 | chardet==4.0.0 7 | charset-normalizer==2.1.1 8 | cryptography==39.0.0 9 | defusedxml==0.7.1 10 | dj-database-url==0.5.0 11 | Django==3.2 12 | django-allauth==0.52.0 13 | django-autoslug==1.9.8 14 | django-ckeditor==6.0.0 15 | django-crispy-forms==1.10.0 16 | django-heroku==0.3.1 17 | django-js-asset==1.2.2 18 | django-widget-tweaks==1.4.8 19 | future==0.18.2 20 | gunicorn==20.0.4 21 | html5lib==1.1 22 | idna==2.10 23 | oauthlib==3.2.2 24 | Pillow==8.0.1 25 | psycopg2==2.8.6 26 | pycparser==2.21 27 | PyJWT==1.7.1 28 | PyPDF2==1.26.0 29 | python-bidi==0.4.2 30 | python3-openid==3.2.0 31 | pytz==2021.1 32 | razorpay==1.2.0 33 | reportlab==3.5.56 34 | requests==2.25.1 35 | requests-oauthlib==1.3.1 36 | six==1.15.0 37 | sqlparse==0.4.1 38 | twilio==6.51.1 39 | typing-extensions==3.7.4.3 40 | tzdata==2022.7 41 | urllib3==1.26.2 42 | waitress==2.0.0 43 | webencodings==0.5.1 44 | whitenoise==5.2.0 45 | xhtml2pdf==0.2.5 -------------------------------------------------------------------------------- /RESUMEBUILDER/urls.py: -------------------------------------------------------------------------------- 1 | """MusicPlayer URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.2/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include 18 | from django.conf import settings 19 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns 20 | from django.contrib.staticfiles.urls import static 21 | 22 | urlpatterns = [ 23 | path('admin/', admin.site.urls), 24 | path('', include("App.urls")), 25 | 26 | 27 | ] 28 | urlpatterns += staticfiles_urlpatterns() 29 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 30 | -------------------------------------------------------------------------------- /App/templates/login.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Fauna Resume Builder 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 | {% csrf_token %} 18 |
19 |

20 | Login/Sign In 21 |

22 |

23 | Enter your login details below. 24 |

25 | {% csrf_token %} 26 | 31 |
32 |
33 | 39 | 40 |
41 |
42 |
43 |
44 | 50 | 51 |
52 |
53 |
54 | 55 | Don't have an account? Sign Up 56 |
57 | 58 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /App/templates/register.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Fauna Resume Builder 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 | {% csrf_token %} 18 |
19 |

20 | Register/Sign Up 21 |

22 |

23 | Enter your login details below. 24 |

25 |
26 |
27 | 33 | 34 |
35 |
36 |
37 |
38 | 44 | 45 |
46 |
47 |
48 |
49 | 55 | 56 |
57 |
58 |
59 | 60 | Already have an account? Sign In 61 |
62 | 63 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /App/restatic.py: -------------------------------------------------------------------------------- 1 | import codecs 2 | import sys 3 | import os 4 | from bs4 import BeautifulSoup as Soup 5 | 6 | def parse_html(file_name, output_file, framework="flask", supported_tags=["link", "script", "img", "video"]): 7 | # accounting for cases where someone enters a different casing 8 | framework = framework.lower() 9 | 10 | def parse_tags(tag): 11 | # parse every tag and return the restatic format 12 | def parse_doc(doc): 13 | # parse the actual document and format as either flask or django 14 | # if no document is found, return back unformatted 15 | if doc == None: 16 | return doc 17 | else: 18 | if framework == "flask": 19 | doc = "{{ url_for('static', filename = '" + doc + "') }}" 20 | elif framework == "django": 21 | doc = "{% static '" + doc + "' %}" 22 | else: 23 | print("Unknown framework {} passed".format(framework)) 24 | return doc 25 | 26 | # account for different tags having different source locations 27 | try: 28 | if tag.name == "link": 29 | doc_link = tag["href"] 30 | elif tag.name in ["script", "img", "video"]: 31 | doc_link = tag["src"] 32 | else: 33 | doc_link = None 34 | except: 35 | doc_link = None 36 | 37 | if doc_link == None: 38 | return str(tag) 39 | else: 40 | return str(tag).replace(doc_link, parse_doc(doc_link)) 41 | 42 | # read and parse the html to beautiful soup 43 | html = open(file_name, "r").read() 44 | html_soup = Soup(html, "html.parser") 45 | 46 | # iterate through every occurence of the tags and replace with the formatted values 47 | for i in html_soup.find_all(supported_tags): 48 | i.replace_with(Soup(parse_tags(i), "html.parser")) 49 | 50 | # write back the file 51 | clean_html = html_soup.prettify() 52 | if framework == "django": 53 | # account for django compulsory 'load static' 54 | clean_html = "{% load static %}\n\n" + clean_html 55 | 56 | codecs.open(output_file, "w", "utf-8").write(clean_html) 57 | print("Successfully formatted '{}' to {} template".format(file_name, framework)) 58 | 59 | if __name__ == "__main__": 60 | if len(sys.argv) < 3: 61 | print("""python restatic.py """) 62 | print("""python restatic.py . """) 63 | print("""python restatic.py """) 64 | else: 65 | # support to convert all files in current folder 66 | if sys.argv[1] == ".": 67 | all_html = [file for file in os.listdir(".") if file.split(".")[-1] == "html"] 68 | for html in all_html: 69 | parse_html(html, html, sys.argv[2]) 70 | else: 71 | try: 72 | output_file = sys.argv[3] 73 | except: 74 | output_file = sys.argv[1] 75 | parse_html(sys.argv[1], output_file, sys.argv[2]) 76 | -------------------------------------------------------------------------------- /App/templates/restatic.py: -------------------------------------------------------------------------------- 1 | import codecs 2 | import sys 3 | import os 4 | from bs4 import BeautifulSoup as Soup 5 | 6 | def parse_html(file_name, output_file, framework="flask", supported_tags=["link", "script", "img", "video"]): 7 | # accounting for cases where someone enters a different casing 8 | framework = framework.lower() 9 | 10 | def parse_tags(tag): 11 | # parse every tag and return the restatic format 12 | def parse_doc(doc): 13 | # parse the actual document and format as either flask or django 14 | # if no document is found, return back unformatted 15 | if doc == None: 16 | return doc 17 | else: 18 | if framework == "flask": 19 | doc = "{{ url_for('static', filename = '" + doc + "') }}" 20 | elif framework == "django": 21 | doc = "{% static '" + doc + "' %}" 22 | else: 23 | print("Unknown framework {} passed".format(framework)) 24 | return doc 25 | 26 | # account for different tags having different source locations 27 | try: 28 | if tag.name == "link": 29 | doc_link = tag["href"] 30 | elif tag.name in ["script", "img", "video"]: 31 | doc_link = tag["src"] 32 | else: 33 | doc_link = None 34 | except: 35 | doc_link = None 36 | 37 | if doc_link == None: 38 | return str(tag) 39 | else: 40 | return str(tag).replace(doc_link, parse_doc(doc_link)) 41 | 42 | # read and parse the html to beautiful soup 43 | html = open(file_name, "r").read() 44 | html_soup = Soup(html, "html.parser") 45 | 46 | # iterate through every occurence of the tags and replace with the formatted values 47 | for i in html_soup.find_all(supported_tags): 48 | i.replace_with(Soup(parse_tags(i), "html.parser")) 49 | 50 | # write back the file 51 | clean_html = html_soup.prettify() 52 | if framework == "django": 53 | # account for django compulsory 'load static' 54 | clean_html = "{% load static %}\n\n" + clean_html 55 | 56 | codecs.open(output_file, "w", "utf-8").write(clean_html) 57 | print("Successfully formatted '{}' to {} template".format(file_name, framework)) 58 | 59 | if __name__ == "__main__": 60 | if len(sys.argv) < 3: 61 | print("""python restatic.py """) 62 | print("""python restatic.py . """) 63 | print("""python restatic.py """) 64 | else: 65 | # support to convert all files in current folder 66 | if sys.argv[1] == ".": 67 | all_html = [file for file in os.listdir(".") if file.split(".")[-1] == "html"] 68 | for html in all_html: 69 | parse_html(html, html, sys.argv[2]) 70 | else: 71 | try: 72 | output_file = sys.argv[3] 73 | except: 74 | output_file = sys.argv[1] 75 | parse_html(sys.argv[1], output_file, sys.argv[2]) 76 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Django based Resume Builder 4 | 5 | 6 | #### Django Resume Builder is a web application that allows users to easily create and manage their resumes using a simple, user-friendly interface. 7 | > 8 | 9 | [![Maintenance](https://img.shields.io/badge/maintained-yes-green.svg)](https://github.com/rajaprerak/MusicPlayer/commits/master) 10 | [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org) 11 | 12 | This project is built with : 13 | 14 | ![HTML5](https://www.w3.org/html/logo/downloads/HTML5_Logo_64.png) , ![CSS3](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/CSS3_logo_and_wordmark.svg/48px-CSS3_logo_and_wordmark.svg.png) , ![Vanilla JS](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Unofficial_JavaScript_logo_2.svg/64px-Unofficial_JavaScript_logo_2.svg.png) , ![Python](https://www.quintagroup.com/++theme++quintagroup-theme/images/logo_python_section.png) , ![Django](https://www.quintagroup.com/++theme++quintagroup-theme/images/logo_django_section.png) 15 | 16 | 17 | 18 | ## Installation 📦 19 | ### To install Django Music Player, follow these steps: 20 | ## 1. Clone this repository: 21 | >'https://github.com/BurhanMohammad/Django-Resume-Bulider.git' 22 | ## 2. Navigate to the project directory: 23 | 24 | ```bash 25 | cd Django-Resume-Bulider 26 | ``` 27 | ## 3 . Create a virtual environment: 28 | ```bash 29 | python3 -m venv env 30 | ``` 31 | ## 4. Activate the virtual environment: 32 | ```bash 33 | source env/bin/activate 34 | ``` 35 | ## 5. Install the project dependencies: 36 | ```bash 37 | pip install -r requirements.txt 38 | ``` 39 | ## 6 . Run the server 40 | ```bash 41 | python manage.py runserver 42 | ``` 43 | ## 7 . Go to localhost:8000 44 | --- 45 | 46 | ## Features of this project: 47 | 48 | ### Django Resume Builder includes the following features: 49 | 50 | #### 1 . User authentication: Users can sign up for an account, log in, and log out. 51 | #### 2 . Resume creation: Users can create and edit their resumes using a simple, user-friendly interface. 52 | #### 3 . PDF export: Users can export their resumes as PDF files. 53 | #### 4. Responsive design: The app is designed to be mobile-friendly. 54 | --- 55 | 56 | ## Usage: 57 | ### To install Django Music Player, follow these steps: 58 | ## 1. Run the server: 59 | 60 | ```bash 61 | python manage.py runserver 62 | ``` 63 | 64 | ## 2. Open your web browser and go to: 65 | >'http://localhost:8000/' 66 | ## 3 . Sign up for a new account or log in with an existing one. 67 | 68 | ## 4. Click the "Create New Resume" button to start creating your resume. 69 | 70 | ## 5. Enter your personal information, work experience, education, and skills. 71 | 72 | ## 6 . Click the "Export as PDF" button to export your resume as a PDF file. 73 | 74 | 75 | 76 | ## Contributing 💡 77 | 78 | #### If you'd like to contribute to Django Resume Builder, feel free to fork this repository and submit a pull request. For more information on contributing to the project, please check out Django's Git repository on GitHub. 79 | 80 | 81 | #### Step 1 82 | 83 | - **Option 1** 84 | - 🍴 Fork this repo! 85 | 86 | - **Option 2** 87 | - 👯 Clone this repo to your local machine. 88 | 89 | 90 | #### Step 2 91 | 92 | - **Build your code** 🔨🔨🔨 93 | 94 | #### Step 3 95 | 96 | - 🔃 Create a new pull request. 97 | ## Creadits : 98 | 99 | #### Django Resume Builder was created by Mohammad Burhan 100 | 101 | 102 | ## License 103 | [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org) 104 | 105 | - **[MIT license](http://opensource.org/licenses/mit-license.php)** -------------------------------------------------------------------------------- /RESUMEBUILDER/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for RESUMEBUILDER project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.2.4. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.2/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'SECRET_KEY' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'App' 41 | ] 42 | 43 | MIDDLEWARE = [ 44 | 'django.middleware.security.SecurityMiddleware', 45 | 'django.contrib.sessions.middleware.SessionMiddleware', 46 | 'django.middleware.common.CommonMiddleware', 47 | 'django.middleware.csrf.CsrfViewMiddleware', 48 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 | 'django.contrib.messages.middleware.MessageMiddleware', 50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 51 | ] 52 | 53 | ROOT_URLCONF = 'RESUMEBUILDER.urls' 54 | 55 | TEMPLATES = [ 56 | { 57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 | 'DIRS': [], 59 | 'APP_DIRS': True, 60 | 'OPTIONS': { 61 | 'context_processors': [ 62 | 'django.template.context_processors.debug', 63 | 'django.template.context_processors.request', 64 | 'django.contrib.auth.context_processors.auth', 65 | 'django.contrib.messages.context_processors.messages', 66 | ], 67 | }, 68 | }, 69 | ] 70 | 71 | WSGI_APPLICATION = 'RESUMEBUILDER.wsgi.application' 72 | 73 | 74 | # Database 75 | # https://docs.djangoproject.com/en/2.2/ref/settings/#databases 76 | 77 | DATABASES = { 78 | 'default': { 79 | 'ENGINE': 'django.db.backends.sqlite3', 80 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 81 | } 82 | } 83 | 84 | 85 | # Password validation 86 | # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators 87 | 88 | AUTH_PASSWORD_VALIDATORS = [ 89 | { 90 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 91 | }, 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 100 | }, 101 | ] 102 | 103 | 104 | # Internationalization 105 | # https://docs.djangoproject.com/en/2.2/topics/i18n/ 106 | 107 | LANGUAGE_CODE = 'en-us' 108 | 109 | TIME_ZONE = 'UTC' 110 | 111 | USE_I18N = True 112 | 113 | USE_L10N = True 114 | 115 | USE_TZ = True 116 | 117 | 118 | # Static files (CSS, JavaScript, Images) 119 | # https://docs.djangoproject.com/en/2.2/howto/static-files/ 120 | 121 | STATIC_URL = '/static/' 122 | STATIC_ROOT=os.path.join(BASE_DIR, 'static') 123 | MEDIA_ROOT =os.path.join(BASE_DIR, 'media') 124 | MEDIA_URL = '/media/' 125 | -------------------------------------------------------------------------------- /App/templates/resume.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% if resume_info.full_name %}{{resume_info.full_name}}'s Resume {% endif %} 4 | 70 | 71 | 72 |
73 | {% if resume_info.full_name %} 74 |

{{resume_info.full_name}}

75 | {% endif %} 76 | {% if resume_info.email %} 77 |

{{resume_info.email}}

78 | {% endif %} 79 | {% if resume_info.phone %} 80 |

{{resume_info.phone}}

81 | {% endif %} 82 | {% if resume_info.address %} 83 |

{{resume_info.address}}

84 | {% endif %} 85 |
86 | {% if resume_info.about_you%} 87 |
88 |

ABOUT ME

89 |
90 |

{{resume_info.about_you}} 91 |

92 |
93 |
94 | {% endif %} 95 | {% if resume_info.career %} 96 |
97 |

CAREER OBJECTIVES

98 |
99 |
100 |

{{resume_info.career}}

101 |
102 |
103 | {% endif %} 104 | {% if resume_info.education %} 105 |
106 |
107 |

EDUCATION

108 |
109 |
110 |

{{resume_info.education}}

111 |
112 |
113 | {% endif %} 114 |
115 |
116 |

EMPLOYMENT EXPERIENCE

117 |
118 |
119 |

120 |
121 |
122 | {% if resume_info.job_1__start %} 123 |
124 |
125 |

{{resume_info.job_1__start}} to {{resume_info.job_1__end}}

126 |
127 |
128 |

{{resume_info.job_1__details}} 129 |

130 |
131 |
132 | {% endif %} 133 | {% if resume_info.job_2__start %} 134 |
135 |
136 |

{{resume_info.job_2__start}} to {{resume_info.job_2__end}}

137 |
138 |
139 |

{{resume_info.job_2__details}} 140 |

141 |
142 |
143 | {% endif %} 144 | {% if resume_info.job_3__start %} 145 |
146 |
147 |

{{resume_info.job_3__start}} to {{resume_info.job_3__end}}

148 |
149 |
150 |

{{resume_info.job_3__details}} 151 |

152 |
153 |
154 | {% endif %} 155 |
156 |
157 |

REFERENCES

158 |
159 |
160 |

{% if resume_info.references %}{{resume_info.references}}{% else %}Available upon request{% endif %}

161 |
162 |
163 |
164 |
Ctrl + P and "Save As PDF" to make a copy of this resume
165 | 166 | 167 | -------------------------------------------------------------------------------- /App/static/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Poppins:400,600&display=swap'); 2 | 3 | html { 4 | background: #E0F2F1; 5 | } 6 | 7 | body, 8 | form { 9 | display: flex; 10 | flex-direction: column; 11 | align-items: center; 12 | } 13 | 14 | body { 15 | padding: 32px 0px; 16 | padding-bottom: 128px; 17 | } 18 | 19 | body, 20 | h1, 21 | h2, 22 | h3, 23 | h4, 24 | p { 25 | margin: 0px; 26 | } 27 | a { 28 | 29 | } 30 | 31 | .button { 32 | background: #1DE9B6; 33 | padding: 8px 16px; 34 | color: white; 35 | font-weight: bold; 36 | font-family: inherit; 37 | letter-spacing: 0.3px; 38 | border-radius: 4px; 39 | border: none; 40 | cursor: pointer; 41 | outline: none; 42 | transition: 0.2s all; 43 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.00), 0 1px 2px rgba(0, 0, 0, 0.00); 44 | } 45 | 46 | a:hover { 47 | margin-top: -1px; 48 | margin-bottom: 1px; 49 | background: #64FFDA; 50 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.14); 51 | } 52 | 53 | a:active { 54 | background: #00bfa5; 55 | margin-top: 0px; 56 | margin-bottom: 0px; 57 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.00), 0 1px 2px rgba(0, 0, 0, 0.00); 58 | 59 | } 60 | 61 | form { 62 | padding-bottom: 16px; 63 | font-family: 'Poppins', sans-serif; 64 | background: white; 65 | border-radius: 8px; 66 | width: 100%; 67 | max-width: 600px; 68 | color: rgba(0, 0, 0, 0.9); 69 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.14); 70 | } 71 | 72 | .form__header { 73 | padding: 32px 0; 74 | width: 100%; 75 | text-align: center; 76 | border-bottom: 1px solid #eee; 77 | } 78 | 79 | .form__header h1 { 80 | font-size: 1.5rem; 81 | margin-bottom: 8px 82 | } 83 | 84 | .form__header p { 85 | font-size: 0.9rem; 86 | color: rgba(0, 0, 0, 0.5); 87 | } 88 | 89 | form h2 { 90 | margin-top: 24px; 91 | margin-bottom: 16px; 92 | width: 100%; 93 | font-size: 1.25rem; 94 | text-align: center; 95 | } 96 | 97 | form h3 { 98 | box-sizing: border-box; 99 | border-left: 3px solid transparent; 100 | margin-top: 24px; 101 | padding: 0px 32px; 102 | width: 100%; 103 | font-size: 1.10rem; 104 | text-align: left; 105 | } 106 | 107 | .form-group { 108 | box-sizing: border-box; 109 | width: 100%; 110 | padding: 24px 32px; 111 | border-left: 3px solid transparent; 112 | transition: 0.2s all; 113 | } 114 | 115 | .form-group:hover { 116 | border-left: 3px solid #64FFDA; 117 | } 118 | 119 | .form-date-group { 120 | display: flex; 121 | box-sizing: border-box; 122 | width: 100%; 123 | padding: 24px 32px; 124 | border-left: 3px solid transparent; 125 | transition: 0.2s all; 126 | } 127 | 128 | .form-date-group:hover { 129 | border-left: 3px solid #64FFDA; 130 | } 131 | 132 | .form-date-group .form-group { 133 | padding: 0px; 134 | } 135 | 136 | .form-date-group .form-group:hover { 137 | border-left: 3px solid transparent; 138 | } 139 | 140 | .form-group label { 141 | font-weight: bold; 142 | margin-bottom: 4px; 143 | font-size: 1rem; 144 | color: rgba(0, 0, 0, 0.7); 145 | display: block; 146 | } 147 | 148 | .form-group label span { 149 | color: red; 150 | } 151 | 152 | form .line-break { 153 | width: 100%; 154 | height: 1px; 155 | margin: 16px auto; 156 | border-bottom: 1px solid #eee; 157 | } 158 | 159 | input[type=text]::placeholder, 160 | input[type=password]::placeholder, 161 | input[type=email]::placeholder, 162 | input[type=date]::placeholder, 163 | textarea::placeholder { 164 | font-weight: 400; 165 | color: rgba(0, 0, 0, 0.4); 166 | } 167 | 168 | input[type=text], 169 | input[type=password], 170 | input[type=email], 171 | input[type=date], 172 | textarea { 173 | font-size: 1.05rem; 174 | font-weight: 600; 175 | font-family: inherit; 176 | box-sizing: border-box; 177 | padding: 8px 16px; 178 | border: 1px solid rgba(0, 0, 0, 0.1); 179 | border-radius: 4px; 180 | transition: 0.2s border; 181 | width: 100%; 182 | font-size: 1rem; 183 | } 184 | 185 | textarea { 186 | max-width: 533px; 187 | } 188 | 189 | input[type=text]:focus, 190 | input[type=date]:focus, 191 | input[type=email]:focus, 192 | input[type=password]:focus, 193 | textarea:focus { 194 | outline: none; 195 | border-color: #1DE9B6; 196 | } 197 | 198 | input[type=submit] { 199 | background: #1DE9B6; 200 | padding: 8px 16px; 201 | color: white; 202 | font-weight: bold; 203 | font-family: inherit; 204 | letter-spacing: 0.3px; 205 | border-radius: 4px; 206 | border: none; 207 | cursor: pointer; 208 | outline: none; 209 | transition: 0.2s all; 210 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.00), 0 1px 2px rgba(0, 0, 0, 0.00); 211 | } 212 | 213 | input[type=submit]:hover { 214 | margin-top: -1px; 215 | margin-bottom: 1px; 216 | background: #64FFDA; 217 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.14); 218 | } 219 | 220 | input[type=submit]:active { 221 | background: #00bfa5; 222 | margin-top: 0px; 223 | margin-bottom: 0px; 224 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.00), 0 1px 2px rgba(0, 0, 0, 0.00); 225 | 226 | } 227 | 228 | .error__input { 229 | border-color: red !important; 230 | } 231 | 232 | .error { 233 | color: red; 234 | } 235 | -------------------------------------------------------------------------------- /App/templates/create-resume.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | Fauna Resume Builder 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 | {% csrf_token %} 18 |
    19 | {% for message in messages %} 20 | {{ message }} 21 | {% endfor %} 22 |
23 |
24 |

25 | Build Your Resume 26 |

27 |

28 | Enter the fields below to generate a resume file. 29 |

30 |
31 |

32 | Personal Details 33 |

34 |
35 | 41 | 42 |
43 |
44 |
45 |
46 | 49 | 50 |
51 |
52 | 55 | 56 |
57 |
58 | 64 | 65 |
66 |
67 |
68 |
69 | 72 | 73 |
74 |
75 | 78 | 79 |
80 |
81 | 84 | 85 |
86 |
87 |
88 |

89 | Work Experience 90 |

91 |

92 | Most Recent Job 93 |

94 |
95 |
96 | 99 | 100 |
101 |
102 | 105 | 106 |
107 |
108 |
109 | 112 | 113 |
114 |
115 |
116 |

117 | Past Job 118 |

119 |
120 |
121 | 124 | 125 |
126 |
127 | 130 | 131 |
132 |
133 |
134 | 137 | 138 |
139 |
140 |
141 |

142 | Another Past Job 143 |

144 |
145 |
146 | 149 | 150 |
151 |
152 | 155 | 156 |
157 |
158 |
159 | 162 | 163 |
164 |
165 |
166 |
167 | 170 | 171 |
172 |
173 |
174 | 175 |
176 | Back to home 177 |
178 | 179 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /App/static/script.js: -------------------------------------------------------------------------------- 1 | const getState = () => { 2 | const $ = (element) => { 3 | return document.getElementById(element).value 4 | } 5 | 6 | const state = { 7 | name: $('name'), 8 | address: $('address'), 9 | phone: $('phone'), 10 | email: $('email'), 11 | about: $('about'), 12 | career: $('career'), 13 | education: $('education'), 14 | job1: { 15 | date: { 16 | start: $('job-1__start'), 17 | end: $('job-1__end') 18 | }, 19 | details: $('job-1__details') 20 | }, 21 | job2: { 22 | date: { 23 | start: $('job-2__start'), 24 | end: $('job-2__end') 25 | }, 26 | details: $('job-2__details') 27 | }, 28 | job3: { 29 | date: { 30 | start: $('job-3__start'), 31 | end: $('job-3__end') 32 | }, 33 | details: $('job-3__details') 34 | }, 35 | references: $('references') 36 | } 37 | return state 38 | } 39 | 40 | const buildResume = (state) => { 41 | const $ = (value) => { 42 | document.write(value) 43 | } 44 | 45 | const styleText = ` 46 | @import url('https://fonts.googleapis.com/css?family=Poppins:400,600&display=swap'); 47 | 48 | body { 49 | font-family: 'Poppins', sans-serif; 50 | background: #fafafa; 51 | color: rgba(0,0,0,0.75); 52 | } 53 | 54 | h1 { 55 | color: rgba(0,0,0,0.9); 56 | } 57 | 58 | h1, p { 59 | box-sizing: border-box; 60 | margin: 0px; 61 | padding: 0px 24px; 62 | } 63 | 64 | .line-break { 65 | width: 100%; 66 | height: 1px; 67 | margin: 16px auto; 68 | border-bottom: 1px solid #eee; 69 | } 70 | 71 | .resume { 72 | border-radius: 8px; 73 | box-sizing: border-box; 74 | display: flex; 75 | flex-direction: column; 76 | max-width: 800px; 77 | margin: 48px auto; 78 | padding: 16px 0px; 79 | background: white; 80 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.14); 81 | } 82 | 83 | .resume-group { 84 | box-sizing: border-box; 85 | padding: 8px 0px; 86 | width: 100%; 87 | display: flex; 88 | border-left: 3px solid transparent; 89 | transition: 0.2s; 90 | } 91 | 92 | .resume-group:hover { 93 | border-left: 3px solid #64FFDA; 94 | } 95 | 96 | .left-col { 97 | width: 35%; 98 | } 99 | 100 | .right-col { 101 | width: 65%; 102 | } 103 | 104 | .instructions { 105 | opacity: 0.5; 106 | text-align: center; 107 | font-size: 0.8rem; 108 | margin: 16px auto; 109 | } 110 | ` 111 | 112 | 113 | const createGroup = (left, right) => { 114 | $('
') 115 | $('
') 116 | $('

' + left + '

') 117 | $('
') 118 | $('
') 119 | $('

' + right + '

') 120 | $('
') 121 | $('
') 122 | } 123 | 124 | document.open() 125 | $('') 126 | $('' + state.name + "'s Resume ") 127 | $('') 128 | $('
') 129 | $('

' + state.name + '

') 130 | $('

' + state.email + '

') 131 | $('

' + state.phone + '

') 132 | $('

' + state.address + '

') 133 | $('
') 134 | createGroup('ABOUT ME', state.about) 135 | createGroup("CAREER OBJECTIVES", state.career) 136 | createGroup('EDUCATION', state.education) 137 | createGroup('EMPLOYMENT EXPERIENCE', '') 138 | createGroup(state.job1.date.start + ' to ' + state.job1.date.end, state.job1.details) 139 | createGroup(state.job2.date.start + ' to ' + state.job2.date.end, state.job2.details) 140 | createGroup(state.job3.date.start + ' to ' + state.job3.date.end, state.job3.details) 141 | createGroup('REFERENCES', state.references) 142 | $('
') 143 | $('
Right click the page and "Save As..." to make a copy of this resume
') 144 | $('') 145 | document.close() 146 | } 147 | 148 | 149 | 150 | const checkName = () => { 151 | const name = document.getElementById('name') 152 | const name_error = document.getElementById('name__error') 153 | const isValid = !!name.value 154 | if (!isValid) { 155 | name.classList.add("error__input") 156 | name_error.style.display = "block" 157 | name_error.innerHTML = "The name field is required" 158 | console.log("error") 159 | } else { 160 | name.classList.remove("error__input") 161 | name_error.style.display = "none" 162 | } 163 | return isValid 164 | } 165 | 166 | const checkEmail = () => { 167 | const email = document.getElementById('email') 168 | const email_error = document.getElementById('email__error') 169 | const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ 170 | const isValid = emailRegex.test(String(email.value).toLowerCase()) 171 | if (!email.value) { 172 | email.classList.add("error__input") 173 | email_error.style.display = "block" 174 | email_error.innerHTML = "The email field is required" 175 | } else { 176 | if (!isValid) { 177 | email.classList.add("error__input") 178 | email_error.style.display = "block" 179 | email_error.innerHTML = "The email entered is invalid" 180 | } else { 181 | email.classList.remove("error__input") 182 | email_error.style.display = "none" 183 | } 184 | } 185 | return isValid 186 | } 187 | 188 | const checkValidity = () => { 189 | const nameIsValid = checkName() 190 | const emailIsValid = checkEmail() 191 | if (!nameIsValid) { 192 | location.hash = "#name" 193 | } else if (!emailIsValid) { 194 | location.hash = "#email" 195 | } 196 | return nameIsValid && emailIsValid 197 | } 198 | 199 | document.getElementById('create-resume').addEventListener("click", (e) => { 200 | e.preventDefault() 201 | const isValid = checkValidity() 202 | if (isValid) buildResume(getState()) 203 | }) 204 | 205 | document.getElementById('name').addEventListener('blur', checkName) 206 | 207 | document.getElementById('email').addEventListener('blur', checkEmail) 208 | -------------------------------------------------------------------------------- /App/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render,redirect 2 | from django.contrib import messages 3 | from django.http import HttpResponseNotFound 4 | from faunadb import query as q 5 | import pytz 6 | from faunadb.objects import Ref 7 | from faunadb.client import FaunaClient 8 | import hashlib 9 | import datetime 10 | 11 | 12 | 13 | client = FaunaClient(secret="fnAE5xxjPIACWtFG3s-fqA99TA8L8hSi1NfeOmeQ") 14 | indexes = client.query(q.paginate(q.indexes())) 15 | 16 | # Create your views here. 17 | def index(request): 18 | return render(request,"index.html") 19 | 20 | 21 | def login(request): 22 | if request.method == "POST": 23 | username = request.POST.get("username").strip().lower() 24 | password = request.POST.get("password") 25 | 26 | try: 27 | user = client.query(q.get(q.match(q.index("users_index"), username))) 28 | if hashlib.sha512(password.encode()).hexdigest() == user["data"]["password"]: 29 | request.session["user"] = { 30 | "id": user["ref"].id(), 31 | "username": user["data"]["username"] 32 | } 33 | return redirect("App:index") 34 | else: 35 | raise Exception() 36 | except: 37 | messages.add_message(request, messages.INFO,"You have supplied invalid login credentials, please try again!", "danger") 38 | return redirect("App:login") 39 | return render(request,"login.html") 40 | 41 | 42 | def register(request): 43 | if request.method == "POST": 44 | username = request.POST.get("username").strip().lower() 45 | email = request.POST.get("email").strip().lower() 46 | password = request.POST.get("password") 47 | 48 | try: 49 | user = client.query(q.get(q.match(q.index("users_index"), username))) 50 | messages.add_message(request, messages.INFO, 'User already exists with that username.') 51 | return redirect("App:register") 52 | except: 53 | user = client.query(q.create(q.collection("Users"), { 54 | "data": { 55 | "username": username, 56 | "email": email, 57 | "password": hashlib.sha512(password.encode()).hexdigest(), 58 | "date": datetime.datetime.now(pytz.UTC) 59 | } 60 | })) 61 | messages.add_message(request, messages.INFO, 'Registration successful.') 62 | return redirect("App:login") 63 | return render(request,"register.html") 64 | 65 | def create_resume(request): 66 | if request.method=="POST": 67 | username=request.session["user"]["username"] 68 | full_name=request.POST.get("name") 69 | address=request.POST.get("address") 70 | phone=request.POST.get("phone") 71 | email=request.POST.get("email") 72 | about_you=request.POST.get("about") 73 | education=request.POST.get("education") 74 | career=request.POST.get("career") 75 | job_1__start=request.POST.get("job-1__start") 76 | job_1__end=request.POST.get("job-1__end") 77 | job_1__details=request.POST.get("job-1__details") 78 | job_2__start=request.POST.get("job-2__start") 79 | job_2__end=request.POST.get("job-2__end") 80 | job_2__details=request.POST.get("job-2__details") 81 | job_3__start=request.POST.get("job-3__start") 82 | job_3__end=request.POST.get("job-3__end") 83 | job_3__details=request.POST.get("job-3__details") 84 | references=request.POST.get("references") 85 | try: 86 | resume = client.query(q.get(q.match(q.index("resume_index"), username))) 87 | quiz = client.query(q.update(q.ref(q.collection("Resume_Info"),resume["ref"].id()), { 88 | "data": { 89 | "user":username, 90 | "full_name": full_name, 91 | "address": address, 92 | "phone": phone, 93 | "email":email, 94 | "about_you":about_you, 95 | "education":education, 96 | "career":career, 97 | "job_1__start":job_1__start, 98 | "job_1__end":job_1__end, 99 | "job_1__details":job_1__details, 100 | "job_2__start":job_2__start, 101 | "job_2__end":job_2__end, 102 | "job_2__details":job_2__details, 103 | "job_3__start":job_3__start, 104 | "job_3__end":job_3__end, 105 | "job_3__details":job_3__details, 106 | } 107 | })) 108 | messages.add_message(request, messages.INFO, 'Resume Info Edited Successfully. Download Resume Now') 109 | return redirect("App:create-resume") 110 | except: 111 | quiz = client.query(q.create(q.collection("Resume_Info"), { 112 | "data": { 113 | "user":username, 114 | "full_name": full_name, 115 | "address": address, 116 | "phone": phone, 117 | "email":email, 118 | "about_you":about_you, 119 | "education":education, 120 | "job_1__start":job_1__start, 121 | "job_1__end":job_1__end, 122 | "job_1__details":job_1__details, 123 | "job_2__start":job_2__start, 124 | "job_2__end":job_2__end, 125 | "job_2__details":job_2__details, 126 | "job_3__start":job_3__start, 127 | "job_3__end":job_3__end, 128 | "job_3__details":job_3__details, 129 | } 130 | })) 131 | messages.add_message(request, messages.INFO, 'Resume Info Saved Successfully. Download Resume Now') 132 | return redirect("App:resume") 133 | else: 134 | try: 135 | resume_info = client.query(q.get(q.match(q.index("resume_index"), request.session["user"]["username"])))["data"] 136 | context={"resume_info":resume_info} 137 | return render(request,"create-resume.html",context) 138 | except: 139 | return render(request,"create-resume.html") 140 | 141 | def resume(request): 142 | try: 143 | resume_info = client.query(q.get(q.match(q.index("resume_index"), request.session["user"]["username"])))["data"] 144 | context={"resume_info":resume_info} 145 | return render(request,"resume.html",context) 146 | except: 147 | return render(request,"resume.html") 148 | --------------------------------------------------------------------------------