👨💻 Learn How to Code with Private Classes - www.dorscodingschool.com/coachingplans ❓Having a hard time with CS50, FreeCodeCamp or Odin Project? Practice with our exclusive free coding platform: www.codingdors.com/ 🎯 Are You A Coding Expert? Take Our Free Quiz and Find Out - www.dorscodingschool.com/quiz
00:02 Overview of CS50 Web Programming Project 1 Wiki with Python and JavaScript 05:53 Converting Markdown to HTML and Working with Entries 11:48 Creating a Path for Encyclopedia Entry in Django 17:40 Handling Display and Hyperlinks in Django HTML Templates 23:34 Handling Search Queries and Form Submission in Django 29:28 Creating a Recommendation Page and Adding New Entries 35:22 Creating a New Page with HTML and Form 41:15 Working with Text Area and Post Method in Django 47:06 Creating an Edit Functionality for Entries 52:58 Creating and Rendering Entries, Random Page Functionality
I did it all by myself, but came across a bug problem i couldnt solve for a week, watching this video helped to find where was the issue so i could finally get over it. Like always it was a small thing that i missed. Thanks
21:30 they literally never explained this title=entry part of the URL tag in the lecture/notes, and you can try to read the Django docs but they're very difficult to understand. Idk how we were supposed to know how to do this.
It seems to me that the edit function can be simplified into a single function. When the edit button is clicked, a get request is sent and when the form is submitted, a post request is sent.
I'm having trouble with the url being case sensitive.. if I enter wiki/css in the url it will return an error message... only wiki/CSS will work... but yours seems to accept different cases.. appreciate if you could help me out. thanks
You should check what we did when in the functions. The util.get_entry is case insensitive and there are some cases where you need to convert the title to lowercase. If you want, you can join our Discord Community :) Check out: www.dorscodingschool.com/discord
Hi I'm almost finishing up the project but there is a bug , when i create a page with exist name but in lowercase it's also got saved, for example we have CSS in title but also when I try to create a new page with css title it's can be saved too! Please help I really haven't enough time , thanks a lot!
We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
First of all, thank you very much for all the work you do to help new programmers its amazing and clear. Now regarding the get_entry function being case sensitive, it just wouldn't work. the following was my approach, it work, however I feel like it can improve a lot, looks kinda forced would very much appreciate any input: def convert_md(title): content = util.get_entry(title) if content is None: content = util.get_entry(title.capitalize()) if content is None: content = util.get_entry(title.upper()) markdowner = Markdown() if content == None: return None else: return markdowner.convert(content)
I must use: urlpatterns = [ path("", views.index, name="index"), path("wiki//", views.entry, name="entry"), ] if I drop the / at the end it´s not working
I am facing problems in terminal because the vs is not recognizing the django module, neither the codespace nor the vs code desktop...trying to install it with pip install django in the terminal of vs code, gives me errors... can you please explain how you set up the environment and also how to submit the projects from vs code desktop? Many thanks in advance!
Sure! You can try to use the virtual environment. You can follow the steps in here until the section "Installing Django": dev.to/nagatodev/how-to-connect-django-to-reactjs-1a71
My project was almost completed but I checked your video to rectify a bug I was getting, but you did not have that bug. Could you please help me with that? My markdown library is returning None only.
Hello, I am having problems with the end block and block and extend commands appearing as just text on my webpage. I have installed Jinja and it doesn't work.
Hi there I have a problem when I go to edit it doesn't show the current entry and title and I don't know how to solve this even where is problem come from please help me
Are you sending the data when you click in the button and display the edit page? We’d love to help you more. Did you know you can join our Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
This can be caused by multiple problems. Do you have the index.html file? Do you have a path in your urls.py that indicates the index route? Do you have a function called index? Are you rendering the correct html file?
@@DorsCodingSchool how can you submit the project on vs code for desktop? In another tutorial you explained how to submit the projects on codespace and I am finding it difficult to submit it from the vscode desktop...
hi.i am having a major issue regarding the csrf token. when i write csrf then the tag wont show up in vs code or if i type it manually the csrf error still shows up. so basically the csrf tags arent working in vs code what should i do.
We’d love to help you more. Did you know you can join our Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
sorry but i was talking about that request.session thing at the end of the lecture which gives different user different pages something like that, do we have to do this in this project ?
Please, tell us : WHICH THEME ARE YOU USING ? I Love it ! where can we find it ? It's impressing at differencing any type of function for each word in the code. I would love to be able to use it.
Hahaha it’s the regular dark theme of VS Code. However, I’ve installed an extension to change the colors of the functions and variables. You should install the extensions of Django, html, css and Python :)
Check if the indentation is correct ;) We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
GET and POST are html control messages in python we need to type "GET" and "POST" not to confuse them with any user defined variables eg post or something
If you check, we compare the string by putting all of them in lower case, otherwise you might not find your entry :) We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
All the files are already created beside the HTML files you'll build during your solution. By the way, we have a Telegram Group to help people learn how to code and where you can connect with learners from all over the world. Over there you can ask any question about programming and you can easily get your questions answered within 24 hours. Besides that, you will have access to our membership with more than 400 problems made by us to ease your learning curve and 1 hour of group coaching every month! Check www.dorscodingschool.com/products
in my case I open for example CSS page, than press Edit. I edit something, again press edit button. After this im on edited page /save_edit. But if i try to edit page from this link it doesnt take any parameters to edit… if it makes sense what ive typed .. 😂👍
Hello, I am currently having problems with this project. Namely, the {% %} commands. For example {% block %} {% endblock %}. They do not function, when I run it in Chrome, it just appears as text. The difference also is that in this video, {% is in yellow, in my code it's blue. I tried to find the extensions to make it work but I can't. So what extension do I need for those commands to register? Thanks in advance
My Block Titles don't appear with the creation of new pages. Everything works - it's greyed out in the Inspector, although it has the correct title there "Coffee"
The only solution I could do was to go into each of the .MD files and delete th titles from there, since when I add {{title}} to the body of Entry.html it gives me two titles for the old ones that had the markdown files pre-created. Why is this not mentioned?
We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
Eu só fiquei com dúvida em relação aos métodos GET e POST. Não é uma boa prática colocar o GET em formulários de pesquisa, e quando se trata de manipulação de dados usar o POST ? Não entendi porque no vídeo você faz o contrário. Ou eu que estou equivocado ? Obrigado pela aula !!
O método GET é utilizado para renderizar o conteúdo de HTML na página (e assim podemos vê-la). Já o método POST é utilizado para guardar os dados do formulário :)
@@DorsCodingSchool Durante a aula do cs50 eu anotei isso: • Metódo Get • Um método utilizado que serve basicamente para escrever na URL, ou clicar em algum link pra ir pra outra página. • Metódo Post • Usado toda vez que estivermos mandando dados que tem o potencial de mudar o estado do app, por exemplo, adicionar um item em uma lista. Com isso, entendi que quando estivermos tratando com URL, como por exemplo o formulário de busca, utilizaríamos o método 'GET', até porque se o usuário enviar esse link de busca pra alguém, a URL vai manter a busca que o mesmo fez. Aí no vídeo vi que você fez o contrário, algum motivo específico ? Desculpe o questionamento, é porque realmente estou com dúvida nisso kkk, já fiz várias pesquisas, mas estão diferentes umas das outras.
I have a doubt regarding recording and uploading videos. Is it mandatory to upload videos on RUclips and share the link? In these videos, we want to provide explanations with a voiceover.
I'm having problems edditing the styles.css, django don't recognize the changes, do you have any idea about what could it be? I even tried delete the file and run ctrl+F5, but the page still use the old CSS deleted. Also, the page is occupying more than the viewport, the scrollbar is always present and I don't know how to solve it (this problem it's present since the beginning)
Same here, whhe I changed the view field for the textarea to 50 nothing changed. I'm also having problems with my headers appearing on new pages that are created, they're greyed out but the backend all works. Some reason they're set to 'display none' when I view the header under inspector.
{% load static %} {% extends "encyclopedia/layout.html" %} ... {% block title %} Encyclopedia {% endblock %} {% block body %} ... {% csrf_token %} are not working, how can I solve these problems?
Thank you very much....Although You could have done the markdown to html conversion by yourself using regular expression. I don't know maybe that would have made the video a bit longer. Anyways Thank you very much!!!
@@DorsCodingSchool Really cool! Smart and pretty , all in one girl! Great job. I am doing the same course at the moment, hopefully I will become as knowledgeable as you at some point!
I have an issue with "get_entry": "content = util.get_entry(title)" , that line by itself, only returns 'None'. I think it may be because the URL is never capitalized, but then I don't understand how my "get_entry" is going to be any different from anybody else's. 🥲
You should add the title of your markdown content, not the URL, when calling the util.get_entry(title). By the way, we have a Telegram Group to help people learn how to code and where you can connect with learners from all over the world. Over there you can ask any question about programming and you can easily get your questions answered within 24 hours. Besides that, you will have access to our membership with more than 400 problems made by us to ease your learning curve and 1 hour of group coaching every month! Check www.dorscodingschool.com/products
def entry(request, title): entry = convert(title) if entry == None: return render(request, "encyclopedia/error.html" "error": "the page you are looking for was n }) else: return render(request, "encyclopedia/TITLE.html" "entry": entry, "title": title }) make sure this part is correct
👨💻 Learn How to Code with Private Classes - www.dorscodingschool.com/coachingplans
❓Having a hard time with CS50, FreeCodeCamp or Odin Project? Practice with our exclusive free coding platform: www.codingdors.com/
🎯 Are You A Coding Expert? Take Our Free Quiz and Find Out - www.dorscodingschool.com/quiz
00:02 Overview of CS50 Web Programming Project 1 Wiki with Python and JavaScript
05:53 Converting Markdown to HTML and Working with Entries
11:48 Creating a Path for Encyclopedia Entry in Django
17:40 Handling Display and Hyperlinks in Django HTML Templates
23:34 Handling Search Queries and Form Submission in Django
29:28 Creating a Recommendation Page and Adding New Entries
35:22 Creating a New Page with HTML and Form
41:15 Working with Text Area and Post Method in Django
47:06 Creating an Edit Functionality for Entries
52:58 Creating and Rendering Entries, Random Page Functionality
The best tutorial on RUclips. Period.
Thank you!
I did it all by myself, but came across a bug problem i couldnt solve for a week, watching this video helped to find where was the issue so i could finally get over it. Like always it was a small thing that i missed. Thanks
21:30 they literally never explained this title=entry part of the URL tag in the lecture/notes, and you can try to read the Django docs but they're very difficult to understand. Idk how we were supposed to know how to do this.
This channel deserves more attention
Thank you!
It seems to me that the edit function can be simplified into a single function. When the edit button is clicked, a get request is sent and when the form is submitted, a post request is sent.
I'm having trouble with the url being case sensitive.. if I enter wiki/css in the url it will return an error message... only wiki/CSS will work... but yours seems to accept different cases.. appreciate if you could help me out. thanks
You should check what we did when in the functions. The util.get_entry is case insensitive and there are some cases where you need to convert the title to lowercase.
If you want, you can join our Discord Community :)
Check out: www.dorscodingschool.com/discord
As I insert a second path program, for the wiki/title , VS code , does not seem to register the program as valid, rather as an error.
You should do wiki/str
Hi I'm almost finishing up the project but there is a bug , when i create a page with exist name but in lowercase it's also got saved, for example we have CSS in title but also when I try to create a new page with css title it's can be saved too! Please help I really haven't enough time , thanks a lot!
We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
First of all, thank you very much for all the work you do to help new programmers its amazing and clear.
Now regarding the get_entry function being case sensitive, it just wouldn't work. the following was my approach, it work, however I feel like it can improve a lot, looks kinda forced would very much appreciate any input:
def convert_md(title):
content = util.get_entry(title)
if content is None:
content = util.get_entry(title.capitalize())
if content is None:
content = util.get_entry(title.upper())
markdowner = Markdown()
if content == None:
return None
else:
return markdowner.convert(content)
that's really very guiding...thanks...
amazing work!
I must use:
urlpatterns = [
path("", views.index, name="index"),
path("wiki//", views.entry, name="entry"),
]
if I drop the / at the end it´s not working
I am facing problems in terminal because the vs is not recognizing the django module, neither the codespace nor the vs code desktop...trying to install it with pip install django in the terminal of vs code, gives me errors... can you please explain how you set up the environment and also how to submit the projects from vs code desktop? Many thanks in advance!
Sure! You can try to use the virtual environment. You can follow the steps in here until the section "Installing Django": dev.to/nagatodev/how-to-connect-django-to-reactjs-1a71
Just wanted to understand which extension ur using to run the website, I'm using live server, but it's no really working
You do not use any extension, you are supposed to run it with django
My project was almost completed but I checked your video to rectify a bug I was getting, but you did not have that bug.
Could you please help me with that?
My markdown library is returning None only.
Sure, if you want our help you can join our Free Discord Community: www.dorscodingschool.com/discord
Hello, I am having problems with the end block and block and extend commands appearing as just text on my webpage. I have installed Jinja and it doesn't work.
I have a issue in saving my entry on a create new page
Thank you for helping me understand!
Happy to help!
Just spent an hour debugging my code just for there to be a missing indent......... yes mom I love programming!
Hi there I have a problem when I go to edit it doesn't show the current entry and title and I don't know how to solve this even where is problem come from please help me
Are you sending the data when you click in the button and display the edit page?
We’d love to help you more. Did you know you can join our Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
thank you very much for all the work. if you shared URL bar with us it would be better :)
I'm having a problem with rendering the index page, it always gives me the Django default template.
This can be caused by multiple problems. Do you have the index.html file? Do you have a path in your urls.py that indicates the index route? Do you have a function called index? Are you rendering the correct html file?
Are you using Codespace or Visio studio desktop?
You can use both. I prefer using VSCode for Desktop
@@DorsCodingSchool how can you submit the project on vs code for desktop? In another tutorial you explained how to submit the projects on codespace and I am finding it difficult to submit it from the vscode desktop...
hi.i am having a major issue regarding the csrf token. when i write csrf then the tag wont show up in vs code or if i type it manually the csrf error still shows up. so basically the csrf tags arent working in vs code what should i do.
We’d love to help you more. Did you know you can join our Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
do we have to manage session in this project?
Yes, you have a manage.py file that is the root file for your Django project. However, you should not change this file :)
sorry but i was talking about that request.session thing at the end of the lecture which gives different user different pages something like that, do we have to do this in this project ?
Please, tell us :
WHICH THEME ARE YOU USING ?
I Love it ! where can we find it ?
It's impressing at differencing any type of function for each word in the code.
I would love to be able to use it.
Hahaha it’s the regular dark theme of VS Code. However, I’ve installed an extension to change the colors of the functions and variables. You should install the extensions of Django, html, css and Python :)
Thank you so much!!! i am subscribing
Thank you too!
Edit page returns "None" in the textarea, can you help me out?
Check if the indentation is correct ;)
We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
thank you so much.
Hi, pls, why the function search is case-sensitive?
Hi, I wanted to know, did you put something like an .upper() or something? My GET only works if I give the exact string
GET and POST are html control messages in python we need to type "GET" and "POST" not to confuse them with any user defined variables eg post or something
If you check, we compare the string by putting all of them in lower case, otherwise you might not find your entry :)
We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
I don't see where shes is converting the strings to lowercase. Did you figure this out?
thanx a lot
u r a gr8 teacher
all this files are already created or you create them one by one ? i found this hard one to do ):
many thanks
All the files are already created beside the HTML files you'll build during your solution. By the way, we have a Telegram Group to help people learn how to code and where you can connect with learners from all over the world. Over there you can ask any question about programming and you can easily get your questions answered within 24 hours.
Besides that, you will have access to our membership with more than 400 problems made by us to ease your learning curve and 1 hour of group coaching every month!
Check www.dorscodingschool.com/products
good as always❤❤✌✌
it gives to me ( MultiValueDictKeyError at /edit/ ) when i edit coffee page could you help me pls ?
Sure, if you want our help you can join our Free Discord Community: www.dorscodingschool.com/discord
There is a bug if you try to edit the page from /save_edit
Can you give us more details? Because for us it seems to be working ;)
in my case I open for example CSS page, than press Edit. I edit something, again press edit button. After this im on edited page /save_edit. But if i try to edit page from this link it doesnt take any parameters to edit… if it makes sense what ive typed .. 😂👍
Hello, I am currently having problems with this project. Namely, the {% %} commands. For example {% block %} {% endblock %}. They do not function, when I run it in Chrome, it just appears as text. The difference also is that in this video, {% is in yellow, in my code it's blue. I tried to find the extensions to make it work but I can't. So what extension do I need for those commands to register?
Thanks in advance
Try to install the Jinja template engine to have your template tags to work
@@tedeye9542 it is not working.
My Block Titles don't appear with the creation of new pages.
Everything works - it's greyed out in the Inspector, although it has the correct title there "Coffee"
It says
display none
In the inspector under box properties. o.0
I'm also getting "Style sheet could not be loaded at stackpath/bootstrap bla bla .scss" right above my inspector.
The only solution I could do was to go into each of the .MD files and delete th titles from there, since when I add {{title}} to the body of Entry.html it gives me two titles for the old ones that had the markdown files pre-created.
Why is this not mentioned?
Just finished, great video, took me hours to do.. Feel like an idiot.
What if the whole project is complete but I get 404 error
We’d love to help you more. Did you know you can join our Free Discord Group and get help from me and from people around the world that are also learning how to code? dorscodingschool.com/discord
@@DorsCodingSchool yeah i will love to join the community.. form will be filled by tomorrow 😊
Thank you so much pls complete 💞😊
You're welcome! We will be doing all the projects again and uploading here :)
Eu só fiquei com dúvida em relação aos métodos GET e POST. Não é uma boa prática colocar o GET em formulários de pesquisa, e quando se trata de manipulação de dados usar o POST ? Não entendi porque no vídeo você faz o contrário. Ou eu que estou equivocado ? Obrigado pela aula !!
O método GET é utilizado para renderizar o conteúdo de HTML na página (e assim podemos vê-la). Já o método POST é utilizado para guardar os dados do formulário :)
@@DorsCodingSchool
Durante a aula do cs50 eu anotei isso:
• Metódo Get
• Um método utilizado que serve basicamente para escrever na URL, ou clicar em algum link pra ir pra outra página.
• Metódo Post
• Usado toda vez que estivermos mandando dados que tem o potencial de mudar o estado do app, por exemplo, adicionar um item em uma lista.
Com isso, entendi que quando estivermos tratando com URL, como por exemplo o formulário de busca, utilizaríamos o método 'GET', até porque se o usuário enviar esse link de busca pra alguém, a URL vai manter a busca que o mesmo fez. Aí no vídeo vi que você fez o contrário, algum motivo específico ?
Desculpe o questionamento, é porque realmente estou com dúvida nisso kkk, já fiz várias pesquisas, mas estão diferentes umas das outras.
THANK YOU!!!
I have a doubt regarding recording and uploading videos. Is it mandatory to upload videos on RUclips and share the link? In these videos, we want to provide explanations with a voiceover.
yeah its mandatory unfortunaly, but i guess you dont need to voice over the video, you only demonstrate the project working as long as I know
Hey, your visuals for html are amazing, can you tell about your respective extensions ?
I've downloaded the html snippets, css snippets and javascript snippets ;)
what debugger is she using
Thank you!
I'm having problems edditing the styles.css, django don't recognize the changes, do you have any idea about what could it be? I even tried delete the file and run ctrl+F5, but the page still use the old CSS deleted. Also, the page is occupying more than the viewport, the scrollbar is always present and I don't know how to solve it (this problem it's present since the beginning)
Same here, whhe I changed the view field for the textarea to 50 nothing changed.
I'm also having problems with my headers appearing on new pages that are created, they're greyed out but the backend all works. Some reason they're set to 'display none' when I view the header under inspector.
You need to clear the cache of the browser. I had the same problem and after clearing it everything worked.
Weird, I had the same problem but CTRL+F5 worked.
Você é brasileira ? Tem um sotaque muito parecido. Thanks for the class!
Sou sim. Obrigada!
46:03
I love you
{% load static %}
{% extends "encyclopedia/layout.html" %}
...
{% block title %}
Encyclopedia
{% endblock %}
{% block body %}
...
{% csrf_token %}
are not working, how can I solve these problems?
You should add {% csrf_token %} in the form that You are sending (in the search form) like this:
{% csrf_token %}
Whenever i click on the new page button, it doesnt do anything even tho i checked everything and it was right, can someone help me out?
you're amazing
You’re saying too many “okay”.. it’s annoying..( but the explanation is good
Thank you very much....Although You could have done the markdown to html conversion by yourself using regular expression. I don't know maybe that would have made the video a bit longer. Anyways Thank you very much!!!
I'm not sure why but my random.choice doesn't work. It keeps show an AttributeError "'function' object has no attribute 'choice'"
Did you import random?
@@DorsCodingSchool Yes but I then tried using "from random import choice" and it fixed it
Are you Romanian?
No, Brazilian :)
@@DorsCodingSchool Really cool! Smart and pretty , all in one girl! Great job. I am doing the same course at the moment, hopefully I will become as knowledgeable as you at some point!
I have an issue with "get_entry": "content = util.get_entry(title)" , that line by itself, only returns 'None'. I think it may be because the URL is never capitalized, but then I don't understand how my "get_entry" is going to be any different from anybody else's. 🥲
You should add the title of your markdown content, not the URL, when calling the util.get_entry(title). By the way, we have a Telegram Group to help people learn how to code and where you can connect with learners from all over the world. Over there you can ask any question about programming and you can easily get your questions answered within 24 hours.
Besides that, you will have access to our membership with more than 400 problems made by us to ease your learning curve and 1 hour of group coaching every month!
Check www.dorscodingschool.com/products
I have the same issue, I tried with .capitalize() but it stop working with titles like CSS or HTML. 😥
def entry(request, title):
entry = convert(title)
if entry == None:
return render(request, "encyclopedia/error.html"
"error": "the page you are looking for was n
})
else:
return render(request, "encyclopedia/TITLE.html"
"entry": entry,
"title": title
})
make sure this part is correct
thank you very much