I am a newbie coder and I just started the cs50 web programming course on edEX. I seemingly cannot get my code to save a .md (markdown file) in a directory. For now I am just trying to save the .md file, I am not yet looking to redirect to the new entry's page. Please find a screenshot of my code below, corrections are welcome :)
I don't think you need to edit your util.py the way you did (https://cs50.harvard.edu/web/2020/projects/1/wiki/ also says there is no need to do it), but anyway there is another problem in your code:
you are trying to validate the form with Django validation (form.is_valid()), but you don't actually have a form in your new_page function.
You should add it with something like
form = Your_New_Page_Form(request.POST)
and then you can validate it the way you did.
Hope I helped! Happy coding!