Zope
  Home arrow Zope arrow Flat User Management in Zope
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ZOPE

Flat User Management in Zope
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 9
    2005-02-07


    Table of Contents:
  • Flat User Management in Zope
  • Registration
  • Login
  • Verification

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Flat User Management in Zope
    ( Page 1 of 4 )

    Many applications are surprisingly easy to create in Zope. This article will teach you how to create a simple user database using Zope objects for data storage.

    Introduction

    Today, many websites feature a database of users. Viewers can register accounts required to access privileged areas of the website. For example, a clan could reserve pages on game tactics for members of the clan, rather than anyone and everyone who just might happen to come across their page.

    This article will teach you how to create a simple user database using Zope objects for data storage rather than a relational database. You will learn how to create a registration system, a login system and a verification system to handle access to privileged pages. We will use Zope Page Templates and Python to do this.

    The Blueprints

    First, we will build a registration system. Users will access the registration Zope Page Templates and fill out a form with their desired username and password. After submitting the form, the data will be handled by a Script ( Python ) object. The script will check to see if the username submitted already exists. If it doesn't, a file will be created with the user's username as the filename. A password property will be added to the file containing their hashed password.

    A login system will then need to be built. Users will access the login Zope Page Template and enter their username and password in a form. When they submit the form, their username and password will be sent to a Script ( Python ) object, which will try it against the username's file. If the correct password is provided, two cookies will be set: a cookie containing the user's username and a cookie containing the user's hashed password.

    When a user attempts to access a private page, the username and password provided in their cookies will be tried against the username's file. If the password matches, the user will be permitted to access the file.



     
     
    >>> More Zope Articles          >>> More By Peyton McCullough
     

       

    ZOPE ARTICLES

    - Creating Zope Products
    - Plone Content Types With Archetypes
    - Flat User Management in Zope
    - Creating Basic Zope Applications
    - Getting started with Zope for Linux and Sola...
    - ZPT Basics (part 4)
    - ZPT Basics (part 3)
    - ZPT Basics (part 2)
    - ZPT Basics (part 1)
    - Exception Handling In DTML
    - DTML Basics (part 4)
    - DTML Basics (part 3)
    - DTML Basics (part 2)
    - DTML Basics (part 1)
    - Using Zope With Apache





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek