Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to transition from PHP to Python Django?

Tags:

python

php

django

Here's my background: Decent experience with PHP/MySql. Beginner's experience with OOP

  1. Why I want to learn Python Django? I gave in, based on many searches on SO and reading over some of the answers, Python is a great, clean, and structured language to learn. And with the framework Django, it's easier to write codes that are shorter than with PHP

  2. Questions

    1. Can i do everything in Django as in PHP?

    2. Is Django a "big" hit in web development as PHP? I know Python is a great general-purpose language but I'm focused on web development and would like to know how Django ranks in terms of web development.

    3. With PHP, PHP and Mysql are VERY closely related, is there a close relation between Django and Mysql?

    4. In PHP, you can easily switch between HTML, CSS, PHP all in one script. Does Python offer this type of ease between other languages? Or how do I incorporate HTML, CSS, javascript along with Python?

like image 216
ggfan Avatar asked Jan 21 '23 23:01

ggfan


1 Answers

Can i do everything in Django as in PHP?

Always

Is Django a "big" hit in web development as PHP?

Only time will tell.

With PHP, PHP and Mysql are VERY closely related, is there a close relation between Django and Mysql?

Django supports several RDBMS interfaces. MySQL is popular, so is SQLite and Postgres.

In PHP, you can easily switch between HTML, CSS, PHP all in one script.

That doesn't really apply at all to Django.

Or how do I incorporate HTML, CSS, javascript along with Python?

Actually do the Django tutorial. You'll see how the presentation (via HTML created by templates) and the processing (via Python view functions) fit together. It's not like PHP.

like image 115
S.Lott Avatar answered Jan 25 '23 23:01

S.Lott