Instant Django 1.5 Application Development Starter

  1. Django is a high-level Python Web framework that encourages rapid
    development and clean, pragmatic design.

  2. Model: The application data

  3. View: which data is presented

  4. Template: How the data is presented

  5. A project is just a collection of settings organized in a defined folder
    structure to run an instance of Django and they can be auto generated using a
    Django-admin command offered by the Django package.

  6. The Django development server: python manage.py runserver

  7. The server runs by default on port 8000 and on the default local host IP
    127.0.0.01. you can change this by passing the port as the first argument of
    the runserver command.

  8. Each one of the Django apps included by default needs at least one
    database table that will be created when we run a Django management command
    called syncdb.

  9. A Django app is just a Python package with a certain structure located
    somewhere in your Python path.

  10. The models essentially represented the database layout with some
    additional metadata.

  11. The first thing that you should note is that each model is represented by
    a class that is a subclass of Django.db.models.Model.  the class
    variables in the models represent the database field.

  12. Each field is an istance of the Field class and tells Django what kind of
    data each field holds. Each field type can be easily understood by looking at
    the class names.

  13. The name of each field instance is the name that you will use in your
    Python code to reference the field as well as the column name in your
    database.

  14. Syncdb command an be called as many times as you like, it will only create
    the tables that do not exist in the database.

  15. In Django, a view is just a Python function that accepts a request
    object as the first parameter and returns a valid HttpResponse Object.

  16. When a Django page is requested the engine looks at the ROOT_URLCONF
    variable in the settings.py file to know which module is responsible for the
    routing in this module. Django expects to find a variable called urlpatterns,
    which is a sequence of tuples with following format: (regular expression,
    Python callback function [, optional directory])

  17. Django starts matching the requested URL against each regular expression
    in the list, and as soon as it finds one that matches it calls the callback
    Python function by passing an HttpRequest object as the first argument.

  18. HttpRequest.method: A string representing the HTTP method used in the
    request. This is guaranteed to be uppercase.

  19. HttpRequest.GET: a dictionary-like object containing all given HTTP GET
    parameters

  20. HttpRequest.POST: a dictionary-like object containing all given HTTP POST
    parameters

  21. HttpRequest.META: a standard dictionary Python dictionary containing all
    available HTTP headers.

  22. HttpRequest.user: A Django.contrib.auth.models.User object representing
    the currently logged-in user. If the user isn‘t currently logged in, the user
    object will be set to an instance of
    Django.contrib.auth.models.AnonymousUser

  23. HttpRequest.session: a readable-and-writable dictionary-like object that
    represents the current session. This is only available if your Django
    installation has session support activated.

Instant Django 1.5 Application Development Starter,布布扣,bubuko.com

时间: 2024-08-12 23:55:11

Instant Django 1.5 Application Development Starter的相关文章

Oracle Fusion Applications (11.1.8) Media Pack and Oracle Application Development Framework 11g (11.1.1.7.2) for Microsoft Windows x64 (64-bit)

Oracle Fusion Applications (11.1.8) Media Pack for Microsoft Windows x64 (64-bit) 重新搜索   常见问题    提示      查看自述文件可帮助确定需要下载的文件. 请打印包含可下载文件列表的页面.该页面包含部件号列表,以及在安装过程中可能需要参考的相应说明. endv 您好!单击下载按钮即表示您同意使用此门户 上的软件所适用的 Oracle 条款和条件.不是 endv?请勿下载此软件并 使用您的帐户登录.END

WEB Application Development Integrator : 应用设置

1.1.       系统安装 应用 Oracle EBS WEB Application Development Integrator WEB ADI在Oracle EBS 11.5.10.* 版本中,配置不同: WEB ADI在Oracle EBS R12.0.4版本中,默认安装: 职责 在Oracle EBS 11.5.10.2环境中,WEB ADI的职责名:Oracle Web ADI: 在Oracle EBS R12.0.4  环境中,WEB ADI的职责名:Desktop Integ

41889 - Application Development in the iOS Environment

Faculty of Engineering and Information TechnologySchool of Software41889 - Application Development in the iOS Environment42889 - iOS Application DevelopmentAutumn 2018Assessment Task 2Individual programming project: BubblePop GameDue 10 May 2019 at 1

Shiny for Interactive Application Development using R(转)

This slidify-based deck introduces the shiny package from R-Studio and walks one through the development of an interactive application that presents users with options to subset the iris dataset, generate a summary of the resulting dataset, and deter

【转】Android Application Development: 10 Tips for More Efficient Apps

The best recipe for becoming a complete flop in Google Play is to release an app that is battery and memory hungry with a slow interface. Most likely, these qualities will ensure negative reviews from users and result in a bad reputation, even if you

HTML5 web application development by example读书笔记

SPA:单页应用.retrieve:恢复,重新得到  infrastructure 基础设施,下部构造 本书第6章和第7章会讲述2个实例:piano man 和piano hero,看起来貌似很有趣.第8章做一个基于geography API的天气应用. 貌似还要安装Apache服务器,因为有些HTML5应用必须与服务器交互. Chapter 1:the task at hand.

Instant Buy Android API Tutorial

转自:https://developers.google.com/wallet/instant-buy/android/tutorial This tutorial guides you through integrating Instant Buy into a purchase flow, in the context of an example bike store. The tutorial provides details and complete source code to hel

[django] Deploy Django Applications Using uWSGI and Nginx on Ubuntu 14.04

关键点1:chmod-socket=666 (mysite_uwsgi.ini) 关键点2 : 工程目录和虚拟环境目录搞清楚 几个参考: http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-

微软职位内部推荐-Software Development Engineer II

微软近期Open的职位: SDE II Organization Summary: Engineering, Customer interactions & Online (ECO) is looking for a great "Software Development Engineer" to join our team. Customer support is a strategic differentiator for Microsoft and we are inve