Generate CV to PDF
To set up Django for your project, follow these steps:
-
Make sure you have Python installed on your system. You can check by running the following command in your terminal:
python --version
If Python is not installed, you can download it from the official Python website: https://www.python.org/downloads/
-
Install Django using pip, which is the package installer for Python. Run the following command in your terminal:
pip install django
This will install the latest version of Django.
-
Create a new Django project by running the following command in your terminal:
django-admin startproject project_name
Replace
project_name
with the desired name for your project. -
Change into the project directory by running the following command:
cd project_name
-
Run the development server to verify that your Django installation is working correctly:
python manage.py runserver
This will start the development server on
http:https://localhost:8000/
. You should see a "Congratulations!" message in your browser.
Congratulations! You have successfully set up Django for your project.
from django.db import models
class YourModel(models.Model): # Define your model fields here field1 = models.CharField(max_length=100) field2 = models.IntegerField() field3 = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.field1
python manage.py makemigrations
python manage.py migrate
pip install pdfkit
brew install Caskroom/cask/wkhtmltopdf
https://wkhtmltopdf.org/downloads.html
python manage.py createsuperuser
Now that you have Django set up, you can start building your web application. Refer to the Django documentation for more information on how to get started: https://docs.djangoproject.com/
Happy coding!