Starting in Python Django [closed]

-3

I am a web programmer working with ZendPhp OS linux Ubuntu and I decided to migrate to python. I have some doubts. Python is an interpreted language! what server will I have to install to make everything work perfectly, does it seem like python already comes with your server, is this already indicated for the final job?

Looking over the language I saw that it has a pre-defined admin that I did not like very much, can I make my layout totally different from the idea of django?

Ex .. first screen

  • menus and home with the company logo.
  • Navigating in mine and choosing an option (Product registration)
  • the system sends the user to the product listing
  • in the list will have a table containing the records and on the same line the icons that would be actions (see, change, delete).

How the database is made, I was kind of lost in that part. I'm used to modeling my postgres database and only then go to the system part doing the crud, but all the examples I found were with django itself creating the database based on my classes.

Note: I did not do anything in the language and I do not know it correctly so I am 100% lay in the subject.

    
asked by anonymous 25.02.2016 / 14:46

1 answer

3

Your question is not entirely on-topic - but come on:

  

I'm a web programmer working with ZendPhp OS Linux Ubuntu and I've solved   migrate to python. I have some doubts. Python is a language   interpreted   "Half truth" is very easy to say that Python is an interpreted language - and people attribute a number of characteristics falsely because of this.   Python is a dynamic, strongly typed, and compiled language for ByteCode - this ByteCode is interpreted in a virtual machine - these characteristics are the same for example in Java, which is a language that people do not associate with being "interpreted".

     

Which server will I have to install to make everything work   perfectly, it seems that python already comes with its server this is already   indicated for the final work?   The Web server that "looks" at the internet, is most often a consolidated general purpose HTTP server - such as Apache or Nginx. These servers bridge the Python application. Depending on the set of technologies you choose within Python, you can expose a Python server directly on the Internet (Tornado, API-Hour, uWSGI, etc ...) - but this is not relevant to the beginning of the work.

     

Looking over the vi language it has a pre-defined admin that   I did not like it very much, I can make my layout totally different   from the idea of django?

Django Admin is one more tool, which allows the application to work with a set of CRUD screens (creation, editing, deletion of elements) as soon as you define your templates. No application is required to use the Django-admin screens.
If it covers all the functionality you need, yes, it's possible to put different themes in it to look different - but most applications and sites define distinct views, made completely separate from django-admin.

  

Ex .. first screen

     

menus and home with the company logo. Navigating in mine and choosing one   option (Product Master) the system sends the user to the list   of products in the listing will have a table containing the records and in the   same line as the icons that would be actions (see, change, delete).

The presentation, and which views your system will have, you define the measure you develop. If you follow a common django tutorial, you will have demos of how to develop the views.

  

As the database is made, I was a little lost in that part. I am   accustomed to modeling my bank postgres and only then to go to the part   of the system doing the crud, but all the examples I found were   with django itself creating the database based on my classes.

Django has its own, very simple-to-use ORM (Object-Relational Adapter), which in most cases does not allow you to create things directly in the database. You can model all your data models directly with Python classes, which inherit from the Model class defined in Django. The set of tools that accompanies this framework specifically generates SQL for you. If this is the case, you can optionally edit this generated SQL before it is automatically executed in the database (for example, to add options in creating tables that can lead to higher performance for your application). In general this step is not necessary.

Django is one of the web frameworks available for Python, and one of the most complete - following a good tutorial, it can serve to get you started and become proficient more or less quickly. Just be careful not to neglect learning the language itself - I've seen a lot of people following a Django tutorial, make their application a little copy and paste from the examples in the tutorial, and keep developing without having much idea of what they are doing . To learn Python, one of the best requests is the tutorial available on the language site itself - link

Other frameworks are smaller, and allow for component exchange - for example, it is easier to store the data in a NoSQL database if you are using Flask (another framework) than using Django - there the data persistence layer is completely pluggable.

    
25.02.2016 / 20:55