
Create a Django project named code bot and an app called website, run migrations, and launch the local server to verify setup.
Set up version control with Git and GitHub for your Django project, initialize a repository, make the initial commit, rename master to main, and push code to GitHub.
Configure the Django project by updating settings and urls, add the website app to installed apps, create website.urls, and include it in the project urls for a working home page.
Create a reusable Django base template with bootstrap styling, using a base.html and a content block to propagate changes across all pages via extends.
Choose prism.js to style code blocks, set a dark theme, enable line numbers and copy-to-clipboard, and configure languages and plugins for seamless integration.
This lecture guides adding a django form under the code box using bootstrap form-control, including a post form with csrf token, a textarea named code, and a language select.
Design and implement an api request workflow using openai to fix code, with a home page posting language-specific prompts, handling errors, and returning code-only responses from the text-davinci-003 model.
Set up basic Django user authentication, enabling sign up, login, and logout, with URL routes and a sign up form to store each user's code in the database.
Create a Django signup form by extending user creation form, wiring in the Django user model, and collecting username, email, first name, last name, and password twice with Bootstrap styling.
Create a navigation bar that shows log out or log in and register based on user authentication, and add a login form tied to the login view to reflect user.is_authenticated.
Learn to fix login errors by creating a Django super user, logging into the admin, and testing login flows, including case sensitivity issues and updating login pages.
Create a Django code model linked to users, storing the question, AI code answer, and language; then create and run migrations to save responses.
In this course I'll teach you how to make web apps for Django and Python, and how to connect those apps to the OpenAI (makers of ChatGPT) Text Completion Artificial Intelligence API and have it fix code that you submit as well as write code that you ask it to write.
We'll use Python, Django, and the Bootstrap Framework to build a cool Coding website that connects to OpenAI.
You'll be able to:
Submit your Code and have the A.I. suggest fixes
Ask The A.I. To write code for you.
Choose from over a dozen programming languages
Save your code responses to the Database
View Past Code Responses from the Database
We'll use a database to save all of the code answers that you've received from the OpenAI API, and we'll query that database and output the answers on their own web page.
Finally, I'll discuss how to connect to OpenAI with an API Key, query the engine, and parse the responses in the correct way and output the answers to the homepage of your Django app.
If you've seen ChatGPT recently and want to learn how to use these tools programmatically, then this is the course for you!
We'll use the Bootstrap CSS Framework to make our Django web app look a little more modern and professional. This will allow us to make our site look great, very quickly and easily-- without knowing much about design.