Description of the underlying object in Zope3

Source: Internet
Author: User
Keywords We some through save contain
Tags access aliyun application binary content content type control data

The Zope object can help us with different tasks, and different objects can handle different parts of the application. Some objects can hold content (text, spreadsheets, images, and so on); some objects can handle logical operations, such as receiving input from Web Forms or executing scripts, and some objects can control the display of content, such as displaying Web pages, messages, and so on.

Generally, the underlying Zope object has three categories:

Content objects: Content objects can hold various text binary data, in addition, content objects can access external data, such as system files and http://www.aliyun.com/zixun/aggregation/22.html "> relational database."

Display objects: Zope provides two kinds of objects to control the display of the site, one is dtml, the other is zpt. The difference between the two is that dtml simultaneously handles both display and logical relationships, and zpt can be separated from the presentation layer.

Logical processing objects: Zope provides tools to help us deal with business logic. There are three types of objects that can be handled for logical processing: Dtml,python Script,perl script. These objects allow us to change object properties, send messages and mails, test conditions, and dynamically feedback certain things. The classification of the Dtml object is somewhat ambiguous and can be used as a display object or as a logical processing object. We can also install a Third-party Zope object to extend the functionality of Zope. We usually call these objects "products."

Content object: Folders,files,and Images

Folders

The folder object for Zope is primarily used to contain other objects, including folder. The structure of a folder is important for security and display, and should be considered when it is established.

Files

Zope's Files object contains raw data, such as audio, video, and documentation. It can also save things that are not supported by files objects, such as flash files, Java applets, and so on. When the files object saves content without regard to the type of content, you can use the files object to hold any data.
Each file object has a property called content type that conforms to the MIME standard. such as: "FileType (plain Text)", "HTML (HTML format)", "Application/pdf (PDF format)". When you upload a file, Zope automatically assigns a MIME type to the content type attribute based on the filename.

Create and edit files

Select File from the list of objects in the upper-right corner of the Zmi and press Add. and fill "id" (required), "title" (optional). If you want to create a blank file, press "ADD" can be, if you want to upload a file, you can press the "Browse" button, from the local selection of a file upload. Once a file is established, it can be opened for content editing or modification of properties. You can also update it through a local file by using the "upload" feature.

Browse files

After editing and uploading the file, we can browse the contents of the file through the "View" tab. Of course, if Zope recognizes the file type, Zope pops up a download window asking you to download the file. You can also display the contents of the file directly through the browser, such as a test.pdf file placed in the root directory of Zope, just enter Http://localhost:8080/test.pdf in the browser!

Images

The image object contains files, such as the gif,jpeg,png format, that are similar to file objects, but the Image object contains proprietary properties, such as the width and high properties of the image.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.