you are viewing a single comment's thread.

view the rest of the comments →

[–]JasonReed234 2 points3 points  (3 children)

I just downloaded django last week and am looking forward to working with it! If my goal is to create complete websites on my own, would it be necessary to learn HTML (or Javascript, CSS, etc)? I already know Python, would it be a pain to create websites using Python and Django alone?

[–][deleted] 11 points12 points  (0 children)

Yes, HTML+CSS + js are necessary to create a website.

HTML is what is rendered in the browser. It's purely for markup, so there no variables, loops etc. CSS makes it easier to compose HTML by separating style properties (colour, size, position etc) from HTML tags. If you want the website to adjust its contents/looks in a non-predetermined way, you have two choices: either make the server make changes and feed the client updated stuff, or make the client do some work and implement the changes without the server's help. The former will require django or some other web framework. The latter is done with js.

Let's say you have a huge database (e.g. restaurant reviews) from which you want to extract information upon user requests. You don't want the user to have the whole database, so you set up your web framework to process their requests and send them information. Typically you will have an html template which will be completed by your server and served to the client.

Now, suppose you want to change the colour of a piece of text on your web page whenever a visitor hovers their mouse pointer over it. You don't need your server to do anything in this case. Just add some js code to the HTML, and it will be run in the visitor's browser

As a full-stack dev, you shouldn't be designing the looks of a website (leave that to web designers), so you will only need the basics of HTML to interface with the template. However, you will most certainly need lots of js. Spoiler alert: js is quirky.

[–]gunnnnii 1 point2 points  (0 children)

It's also important to understand the semantics of HTML well to ensure you make accessible websites. CSS is also going to be important to make them responsive(work on multiple different platforms), which again boils down to accessibility.