If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

From Python to HTML, CSS, and Django

Started by tucsons, Jun 24, 2023, 12:14 AM

Previous topic - Next topic

tucsonsTopic starter

Hi there!

I am a non-technical person in management but I have recently developed a strong interest in learning Python after reading various resources and articles. I have chosen Python due to its low entry threshold and high demand in the job market. However, I am unsure about which direction to take in terms of training as I am not from a technical background.

My ultimate goal is to change my career path and become a professional programmer. After analyzing different strategies from similar topics, I realized that the ideal option for me would be to acquire the necessary skills on my own and secure a job in junior positions in small firms. This will not only speed up my learning process but also provide practical experience. However, due to work and financial constraints, I cannot leave my current job until September 2015.

With this in mind, I have a few questions:

- What book should I choose for studying Python? (I'm currently considering Programming in Python)
- Since I can't install an interpreter at work, is Python Fiddle a good option for training? I plan to study PyCharm at home.
- In what order should I combine the course of study at Codecademy?
- What other languages or frameworks do I need to learn alongside Python for better job prospects (such as HTML, CSS, Django, etc.)?
- Which books are worth studying after completing "Programming in Python"?
- What is the best way to practice and where can I find coding problems to solve?

I know that these questions have been asked before, but I would appreciate any personal experiences, answers, or constructive criticism. Thank you for your help!
  •  


EOJeffrey

To do web development, it's recommended to have knowledge of HTML, CSS, and JavaScript. One can grasp the basics of HTML and CSS within a few days. However, expertise is not mandatory but desirable. I've encountered programmers who aren't skilled in the layout department despite having basic knowledge.

If we're discussing web development, Django is undoubtedly the most widely used platform, and it's worth learning.

Learning Git is also beneficial, but if you're a novice, you can learn it while working. Additionally, you'll need familiarity with either MySQL or Postgres relational databases.

To practice web development, attempt to create a practical project such as a blog, online store, forum, Twitter-like platform, Instagram-like app, or anything else that interests you. Create a task that's enjoyable and engaging to complete.
  •  

Eluslyenumren

To get started with the Linux console (bash) and understand the principles of the Linux file system, it is recommended to become familiar with the basic concepts. Access rights and masks are vital aspects that one should keep in mind. Additionally, understanding the command line in Windows is also necessary, even if it's not powershell. The ability to work with redirects and other features is supported in Windows.

Python, like many other languages, works closely with databases. Therefore, it is essential to have a fundamental understanding of SQL to retrieve data through requests or JSON. To execute even a basic query, one should be familiar with the basics of SQL.

Version control systems are also crucial for python programmers, and git is the preferred choice among them. It allows developers to manage, track changes, and collaborate on their code effortlessly.
  •  

gulshan212

Hello this is Gulshan Negi
Well, if you are looking to learn Python then I will recommend that you to read two book and these books I am suggesting you on behalf of my experience.
1. Python Crash Course by Eric Mattews.
2. Head First Python by Paul Barry.
Thanks                                     
I am an Engineer. I completed my engineering in Computer Science & Engineering. I am a Web & App Developer. I like playing cricket and volleyball.
  •  

AnnyJones01

If you already have experience with Python and want to expand your skills to include HTML, CSS, and Django, here's a suggested learning path:

HTML and CSS:

Start by learning the basics of HTML (Hypertext Markup Language), which is used for structuring the content of web pages.
Move on to CSS (Cascading Style Sheets), which is used for styling and formatting web pages.
Practice building simple web pages using HTML and CSS. There are plenty of online tutorials and resources available to help you get started.
JavaScript (Optional):

Consider learning JavaScript, as it is widely used for adding interactivity and dynamic elements to web pages.
JavaScript is often used in conjunction with HTML and CSS to create more interactive and responsive web applications.
Django Framework:

Django is a powerful web framework written in Python. It follows the Model-View-Controller (MVC) architectural pattern and simplifies the process of building web applications.
Start by understanding the basics of Django, including its core concepts, such as models, views, and templates.
Learn how to set up a Django project, define models to represent your data, create views to handle user requests, and use templates to generate dynamic HTML pages.
Explore Django's built-in features like user authentication, database integration, and URL routing.
Practice building small projects using Django to gain hands-on experience.
Integrating Python with HTML and CSS:

As you progress with Django, you'll learn how to integrate Python code with HTML templates to create dynamic web pages.
Django's template engine allows you to combine HTML and CSS with Python code to generate dynamic content.
Understand how to pass data from views to templates and render it dynamically in the HTML pages.
Advanced Django Concepts:

Once you have a good grasp of the fundamentals, you can dive deeper into advanced Django concepts and features.
Learn about handling forms, managing user authentication and authorization, working with databases, handling file uploads, and implementing APIs.
Explore third-party libraries and extensions that can enhance your Django projects.
Practice and Build Projects:

The best way to solidify your skills is through practice and building real-world projects.
Start with small projects and gradually move on to more complex ones.
Use your Python knowledge to handle backend logic and integrate it with HTML, CSS, and Django to create fully functional web applications.
Remember to utilize online tutorials, documentation, and communities like Django's official website and forums, as well as resources like books, video courses, and coding platforms to aid your learning journey.
  •  
    The following users thanked this post: Sevad

sophiaWindsor02

"Automate the Boring Stuff with Python" is a great introductory book.
Python Fiddle is a good option for practicing at work.
Start with Python at Codecademy, then HTML/CSS, and Django.
Alongside Python, HTML/CSS and Django are important.
"Python Crash Course" is a good follow-up.
Websites like LeetCode, HackerRank provide coding problems for practice.
  •  

sinelogixweb

That's awesome to hear that you have decided to venture into learning Python and ultimately towards becoming a professional programmer. Here are my suggestions:

What book should I choose for studying Python?
Consider starting with "Python Crash Course: A Hands-On, Project-Based Introduction to Programming" by Eric Matthes. This book starts from very basics and gradually gets deeper into Python. Once you're comfortable with its content, if you want to get a more depth understanding of Python language specifics, "Fluent Python" by Luciano Ramalho is also a good choice.

Since I can't install an interpreter at work, is Python Fiddle a good option for training? I plan to study PyCharm at home.
Yes, Python Fiddle and similar solutions like Repl.it, are excellent ways to practice coding when you don't have access to a more typical development setup. These tools run your code in a virtual environment, so you don't have to worry about installing any software. PyCharm is a professional IDE (Integrated Development Environment) which can be studied at home to get comfortable with a more professional level of software development.

In what order should I combine the course of study at Codecademy?
Codecademy is a great resource for learning Python. It breaks down each concept into manageable chunks. They have a pretty set path, so you'd start with their Python course and follow it through to completion. Once you're done with the fundamental Python course, it would be beneficial to look at their other offerings such as data science or web development, depending on your interest and career goals.

What other languages or frameworks do I need to learn alongside Python for better job prospects (such as HTML, CSS, Django, etc.)?
Depending on what you wish to do with Python, you may need to learn corresponding tools/frameworks. If you're interested in web development, Django and Flask are the most widely used Python frameworks, and learning HTML, CSS, and JavaScript will be crucial as these are the foundational technologies of the Web. If you're considering data analysis or machine learning, then you might want to learn libraries like NumPy, Pandas, Matplotlib, Scikit-learn, and TensorFlow.

Which books are worth studying after completing "Programming in Python"?
After feeling comfortable with Python fundamentals, consider:

"Effective Python: 90 Specific Ways to Write Better Python" by Brett Slatkin
"Python for Data Analysis" by Wes McKinney, if you're interested in data analysis
"Django for Professionals: Production websites with Python & Django" by William S. Vincent, if you're leaning towards web development.
What is the best way to practice and where can I find coding problems to solve?
Many online platforms provide practice problems such as HackerRank, LeetCode, Exercism and Codewars. Project Euler is also a great place with a twist of mathematical problem solving. Applying what you learn continuously by building your own small projects can be a helpful way to solidify what you've learned (e.g. simple utilities, web applications, small data analysis projects). Participating in open source projects or contributing to Python community will give you a feel of real-world coding when you feel ready.

 Here are additional suggestions that might be helpful:

Seek community help and mentorship: Sites like Stack Overflow and forums such as coding communities of Reddit (for example, /r/learnpython) could be very useful when you're stuck with problems or code errors. Try to join a local coding meetup or groups (Meetup.com usually have lots of these). There, you could find mentors and pair programming opportunities.

Online Courses: In addition to Codecademy, there are many online courses that could be of help. edX and Coursera offer online Python courses from universities. Coursera's "Python for Everybody" is a very popular course for beginners. Udemy also offers Python courses at various levels.

Familiarize yourself with Git and GitHub: Learning how to use version control systems, especially Git, is pretty much essential when you want to become a professional developer. GitHub is commonly used for hosting code, managing projects, and building software alongside millions of other developers.

Learn concepts of Testing: It's very crucial to understand different types of testing such as unit testing, integration testing, and regression testing. Python provides built-in libraries like unittest for testing your code.

Dive into Algorithms and Data Structures: Understanding these concepts will dramatically improve your problem-solving ability. Book like "Grokking Algorithms" by Aditya Bhargava can help introduce these concepts in a friendly way.

Focus on one area after basic Python: Depending on your interest, you may want to specialize in one area. It could be Data Science, Web Development, Scripting/Automation or Machine learning. Each of these areas have their own set of tools and libraries that you may need to get more familiar with.

Understand the use of Python in different domains: Python is widely used in areas ranging from Web and Internet Development, Scientific and Numeric applications, Education, Desktop GUIs, Software Development, Business applications. Knowing which domain your interest lies in, will make your learning more streamlined and you can advance in your career in that particular domain.

Learning HTML, CSS, and Django after Python is a great sequencing for someone who is interested in web development. Python is a versatile language used in a wide set of applications, while HTML, CSS, and Django are used more specifically in the field of web development. Here's why each is important, along with resources to learn more:

HTML (HyperText Markup Language):

What it is: This is the most basic building block of the web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a webpage's appearance/presentation (CSS) or functionality/behavior (Javascript).
How to learn more: Mozilla Developer Network (MDN) has excellent guides and tutorials on HTML. W3Schools is also a good resource for beginners.
CSS (Cascading Style Sheets):

What it is: CSS is a stylesheet language used to describe the look and formatting of a document written in HTML. CSS deals with the look and feel part of a web page. Using CSS, you can control the color of text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, and more.
How to learn more: MDN and W3Schools both have comprehensive learning resources on CSS.
Once you feel comfortable with HTML and CSS, you can dive into Django:

Django:
What it is: Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the Model-View-Controller (MVC) architectural pattern and provides a powerful and flexible toolkit to build web applications.
How to learn more: The official Django website has a tutorial for beginners that teaches you the basics. Django for Girls also provides a very beginner-friendly one-day workshop/tutorial on Django. For a more in-depth study, you can refer to the book "Two Scoops of Django".

HTML and CSS:
HTML is used to structure a web document by using tags around content. For example:

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>
CSS, on the other hand, is used to select HTML tags and then style them. Here's a basic example:

body {
    background-color: lightblue;
}

h1 {
    color: white;
    text-align: center;
}

p {
    font-family: verdana;
    font-size: 20px;
}
This CSS will make the background of the web page light blue, align any <h1> headings to the center and make them white, and style any <p> paragraphs with a specific font and size.

Django:
Django is quite comprehensive and is designed to help developers take applications from concept to completion as quickly as possible. Most importantly, Django is a Python web framework, which means you'll be able to use your Python skills to interact with it. Here's a very high-level overview of what a Django application might look:

You would define your database models, basically what kind of data you are storing (Users, Posts, Comments, etc). Django uses an ORM (Object-Relational Mapping) that lets you interact with your database, like you would with SQL. In other words, it's a way to create, retrieve, update and delete records in your database using Python.
from django.db import models

class Blog(models.Model):
    title = models.CharField(max_length=200)
    pub_date = models.DateField()
Django uses URL routing, so you can design human-readable URLs. You would write URL routes so Python knows what code to run when the user visits a certain page.
from django.urls import path

from . import views

urlpatterns = [
    path('articles/2003/', views.special_case_2003),
    path('articles/<int:year>/', views.year_archive),
]
Write Views to handle the business logic and load the data needed for you to serve a response.
from django.http import HttpResponse
from django.shortcuts import render
from .models import Blog

def archive(request):
    blog_posts = Blog.objects.all()
    return render(request, 'blog/archive.html', {'blog_posts': blog_posts})
Django supports HTML templates with variables. The variables are replaced with actual data when the template is rendered.
<!DOCTYPE html>
<html>
<body>
    <h1>Welcome to my blog!</h1>
    {% for post in blog_posts %}
        <h2>{{ post.title }}</h2>
        <p>{{ post.content }}</p>
    {% endfor %}
</body>
</html>

Resources:
HTML/CSS: The MDN's HTML and [CSS](https://developer.mozilla.org/en-US


  •  



If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...