Friday, November 27, 2015

Day 24

Django


The last thing we're learning in our Python stack is Django. Django is a high-level web framework that many app like Instagram and Pinterest uses. One of the cool things about Django is that it's very modular in the sense that you can quickly remove and input another application inside your project. However the con, for a developer building a project from scratch, is that there are many things to set up within your Django project. Such as:
  • Creating an application folder
  • Creating a url specifically for that app
  • Creating templates/static folders within that app
  • Add to projects urls routes that need to go thru each app
  • Add to settings the apps that are being used in the project.
Today was an easy day as we mostly just read through how Django works and did some basic routing and set up. Our last assignment of the day is the classic Disappearing Ninja where the primary goal is routing through all the different images on the urls page. Note, that Django does all of its variables in url with regex:
url(r'^(?P<question_id>\d+)/$', views.show, name='show')

No comments:

Post a Comment