<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns="http://purl.org/rss/1.0/">




    



<channel rdf:about="http://noenieto.com/blog/todos-los-blogs/RSS">
  <title>Tech Blog</title>
  <link>http://noenieto.com</link>

  <description>
    
      A techblog about Plone, Zope, Python, Ubuntu and OpenSource/Free Sfotware
    
  </description>

  

  
            <syn:updatePeriod>daily</syn:updatePeriod>
            <syn:updateFrequency>1</syn:updateFrequency>
            <syn:updateBase>2009-09-12T00:38:54Z</syn:updateBase>
        

  <image rdf:resource="http://noenieto.com/logo.png"/>

  <items>
    <rdf:Seq>
      
        <rdf:li rdf:resource="http://noenieto.com/blog/anouncing-public-alpha-for-eduintelligent-lcms"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/plone-and-security"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/theming-plone-4-part-2"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/theming-plone-4"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/the-perfect-buildout-plone-3.3.5-fss-relstorage"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/migrating-data-from-plone-3.2.1-to-plone-4.0b2"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/our-first-plone4-site-available-to-the-public"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/udev-en-linux"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/1-million-tux-lleguemos-al-millon-de-usuarios-de-gnu-linux"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/links-about-server-performance"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/mis-manas-para-debuggear-zope-plone"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/varios-efectos-de-jquery-que-se-ven-bien"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/unicode-y-utf-8-en-plone"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/lecciones-aprendidas-internacionalizacion-en-plone"/>
      
      
        <rdf:li rdf:resource="http://noenieto.com/blog/django-y-buildout"/>
      
    </rdf:Seq>
  </items>

</channel>


  <item rdf:about="http://noenieto.com/blog/anouncing-public-alpha-for-eduintelligent-lcms">
    <title>Anouncing public alpha for eduIntelligent LCMS</title>
    <link>http://noenieto.com/blog/anouncing-public-alpha-for-eduintelligent-lcms</link>
    <description>eduIntelligent-LCMS is a Learning Content Management System focused on creating course content but with the advantage of supporting SCORM and static content. It's all based on Plone 3.
</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div class="section" id="features">
<h3>Features</h3>
<blockquote>
<ul class="simple">
<li>Learning Content Management System based on Plone 3</li>
<li>Manage Courses, Lessons, Assignments and Exams.</li>
<li>Descriptive statistics analysis</li>
<li>Supports content in formats like OER, SCORM and IMS.</li>
<li>Content types for book bibliography and Glossary terms</li>
<li>General visit history for students.</li>
<li>Message system for portal users.</li>
</ul>
</blockquote>
</div>
<div class="section" id="status-of-the-project">
<h3>Status of the project</h3>
<p>eduIntelligent consist of several modules. We needed to modify some of them in order to make a public release. You might find a lot of errors. Please, bear wth us while we clean up the code and fix all the possible errors. Contributors are welcome.</p>
</div>
<div class="section" id="where-do-i-get-it">
<h3>Where do I get it?</h3>
<p>The source code and buildout are in GitHub:</p>
<p><a class="reference external" href="http://wiki.github.com/iservicesmx/eduintelligent-LCMS/">http://wiki.github.com/iservicesmx/eduintelligent-LCMS/</a></p>
<p>Kind Regards.</p>
<p>Noe Nieto
iServices de México
<a class="reference external" href="http://iservices.com.mx">http://iservices.com.mx</a></p>
</div>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2010-06-16T17:10:37Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/plone-and-security">
    <title>Plone and security</title>
    <link>http://noenieto.com/blog/plone-and-security</link>
    <description>My site has been experiencing some downtime this week. The reasons are various. I've heard that Plone is very secure, but ¿How secure it is and what can one do in order to avoid downtime, resist some attacks and so?</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<blockquote>
<p>-- UPDATE:
Tonight my account was suspended again. So far, I haven't seen anything that resembles an attack. What seems to be happening is that when my account is suspended it will also kill all my processes (Plone and friends included).</p>
<p>Last time i checked, instance-Z2.log 's size was over 50 MB (In less than 7 days). There are also some Plone errors on instance.log. I'll address that as soon as I can.</p>
</blockquote>
<p>This week, this blog experienced some downtime due to various reasons:</p>
<ul class="simple">
<li>I migrated my site from one location in the server to another.</li>
<li>I upgraded my site and Blog from Plone 3.2.3 to Plone 4.</li>
<li>Then my web hosting account got suspended 2 times due to excesive bandwidth. This domain served almost 2.5 GB in less than 4 days, which is something I was not expecting. I don't have excesive content in this site, just my blog.</li>
</ul>
<p>So that raised the following questions:</p>
<ul class="simple">
<li>Was that an attack (like a DOS?)?. I found that supervisor, varnish and plone were not running. Something or someone killed them!! Or they died!</li>
<li>Was that a bandwidth issue? When I had my site in the previuos location in the server, there was no bandwidth monitoring. Now there is. I increased the BW limit.</li>
</ul>
<p>If that was an attack, What do you guys usually do for securing yout Plone/zope installations?</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2010-05-28T21:45:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/theming-plone-4-part-2">
    <title>Theming Plone 4 - Part 2</title>
    <link>http://noenieto.com/blog/theming-plone-4-part-2</link>
    <description>On Part two, I am going to document how to take one template and "translate" it for Plone. I am using a very simple template from CSSTemplates.org. 

Finally, all the code I made will be uploaded to GITHUB</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<h2>On part 1...</h2>
<p>... I learned to prepare the system for buildout and Zope, I also learned to create a Plone 4
 instance from scratch and finally I learned to create and prepare a plone 
product for the new theme I am going to make.</p>
<p>It's time to continue to choose with some details before starting the modification of colors, images, and so on.</p>
<p><a class="external-link" href="theming-plone-4">&nbsp;Go to part 1</a></p>
<h2>Choosing the CSS theme template<br /></h2>
I choosed the "<a class="external-link" href="http://www.freecsstemplates.org/preview/hanging/">Hanging</a>" template from FreeCSSTemplates.com. I'ts perfect because it has three columns and fixed width to 1024x768 monitors, which is the minimum standard in 2010.
<p>&nbsp;</p>
<p>So, after downloading and unpacking the template I get a very clean and basic theme, Good!!</p>
<img class="image-inline" src="../recursos/PantallazohangingNavegadordearchivos.png/image_preview" alt="Navegando el tema" />
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The original template, looks like this:</p>
<p>&nbsp;</p>
<img class="image-inline image-inline" src="../recursos/Pantallazo.png/image_preview" alt="Template original de hanging" />
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Theming tools</h2>
<p>These are the tools we are going to use to make our theme:</p>
<ul><li>Firefox and Firebug (On Lucid, the package is xul-ext-firebug)</li><li>Gedit (make sure you install gedit-plugins package)</li></ul>
<p>&nbsp;</p>
<p>Additionally, on other templates I had to use:</p>
<ul><li>gimp. For editing logos an some images.<br /></li><li>Photoshop. Sometimes Gimp does not properly open PSD templates. You'll need someone that exports the template to jpeg, png or something similar so you can open the templates in gimp and cut as needed.<br /></li><li>Komodo Edit (Very good editor)</li></ul>
<p>¿Any other? ¿Other tools on other OS?</p>
<p>&nbsp;</p>
<h2>The Deco.gs system</h2>
SunBurst, the Plone 4 default theme uses the <a class="external-link" href="http://deco.gs/">Deco.gs</a> system, which can be defined as a "lightweight"&nbsp; grid framework. As some will already know, there are some very popular grid systems.
<p>&nbsp;</p>
I came to understand the grid system when I saw the <a class="external-link" href="http://www.gridsystemgenerator.com/">Grid System Generator</a>. So, in general, the Sunburst theme uses the Deco.gs system and has 12 columns for horizontal layout/positioning and has no horizontal layout/positioning. So this is as basic as it can get.
<p>&nbsp;</p>
Ther is a talk from Alexander Limi, the creator of Deco.gs on<a class="external-link" href="http://blip.tv/file/3020558"> blip.tv</a>. He explains very clearly why he created yet another one grid system.
<p>&nbsp;</p>
<p>So, now that we know that deco.gs exists, we only need to pay attention to these css styles:</p>
<ul><li>row<br /></li><li>cell </li><li>width-full </li><li>width-1:2 </li><li>position-0</li><li>position-1:4</li><li>position-3:4</li></ul>
<p>&nbsp;</p>
<h2>Plone's Layout</h2>
<p>&nbsp;</p>
Plone's layout is made of viewlet managers that contains another viewlet
 manager or viewlets.&nbsp; On a vanilla Plone site, there are 8 main viewlet managers: plone.portaltop, plone.abovecontent, plone.contentviews, plone.abovecontenttitle, plone.belowcontenttitle, plone.abovecontentbody, plone.belowcontentbody and plone.belowcontent. Not all viewlet managers (or it's contents) are displayed at the same time.
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>This is a screenshot firebug showing the structure of the @@manage-portlets view:</p>
<img class="image-inline" src="../recursos/Pantallazo2.png/image_large" alt="Estructura manage-portlets" />
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The viewlet manager plone.portaltop renders, #portal-top,&nbsp; plone.belowcontent renders #portal-footer, #portal-colophon and #portal-siteactions. The template main.pt is the one that renders #portal-columns directly and inside it, it renders the content of some other viewlet-managers.</p>
<p>&nbsp;</p>
<p>There are other good documentation resources for plone theming:</p>
<a class="external-link" href="https://www.packtpub.com/Professional-Plone-web-applications-CMS/book">Professional Plone Development</a>
<p> (Martin Aspelli), chapter 8</p>
<a class="external-link" href="https://www.packtpub.com/plone-3-theming-create-flexible-powerful-professional-templates/book">Plone 3 Theming</a>
<p> (Veda Williams)</p>
<a class="external-link" href="http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-3-x-to-4.0/updating-add-on-products-for-plone-4.0/updating-plone-3-themes-for-plone-4/">Updating Plone 3 themes for Plone 4</a>
<p> (Alexander Limi)</p>
<a class="external-link" href="http://plone.org/documentation/topic/Visual+Design#creating-theme-products">Plone.org Documentation</a>
<p> (Various authors)</p>
<p>&nbsp;</p>
<h2>Copying stylesheets to the Sunburst theme</h2>
<p>Setting the theory aside, we need to copy some stylesheets from the sunburst theme. Some of the stylesheets of Sunburst are empty, and some others don't really need customization.</p>
<p>&nbsp;</p>
<p>First, we need to find out the location of the plonetheme.sunburst egg. I use the following trick:</p>
<pre>#on our buildout directory (e.g. ~/plone4b3)

sunburst=`cat bin/instance | grep "plonetheme.sunburst" | cut -d \' -f2`/plonetheme/sunburst/skins/sunburst_styles/

hanging=src/plonetheme.hanging/plonetheme/hanging/skins/hangingtheme_styles/</pre>
<p>&nbsp;</p>
<p>Now that we have the location of both directories, we only need to copy three files:</p>
<p>&nbsp;</p>
<pre>cp $sunburst/base_properties.props $hanging</pre>
<pre>cp $sunburst/ploneCustom.css.dtml $hanging</pre>
<pre>cp $sunburst/public.css $hanging</pre>
<p>&nbsp;</p>
<p>These three files will be all we need to edit in order to change colors and so on.</p>
<p>&nbsp;</p>
<h2>Copy images from the template to our theme</h2>
<p>&nbsp;</p>
This is just a reminder to copy all the images from the Hanging theme to the directory: src/plonetheme.hanging/plonetheme/hanging/skins/hangingtheme_images/ (hangingtheme_images/
<p> from now on)</p>
<p>&nbsp;</p>
<h2>Hands on with our theme</h2>
<p>We already have our filesystem-based theme and we have also installed it on a Plone instance. We already know of the existence of the Deco.gs System and, in general, how Plone visual building blocks are laid out on top each other (by using portlet managers). We also have three files on src/plonetheme.hanging/plonetheme/hanging/skins/hangingtheme_styles/ (hangingtheme_styles/ from now on), and all the needed images in hangingtheme_images/&nbsp; So we have everything we need to start.</p>
<p>&nbsp;Let's use a top-bottom aproach while aplying styles to the plone theme. That means: I open two tabs and firefox and start copying styles from the &lt;body&gt;, then I move to #visual-portal-wrapper, and so on.</p>
<p>&nbsp;For those like me who needs a photo for everything, that's what are we going to do:</p>
<p><img class="image-inline image-inline" src="../recursos/copystyles.jpg/image_large" alt="Copying theme styles" /></p>
<p>&nbsp;</p>
If I documented every step by now, this post would be unfinishable, so I just will list the modifications I made. The details of each modification are broken into small commits on the <a class="external-link" href="http://github.com/tzicatl/plone4andtheme">git repository.</a>
<p>&nbsp;</p>
<p>&nbsp;</p>
Feel free to clone the project buildout and walk trough the log (hopefully it is not very long).
<p>&nbsp;</p>
<p>These are the steps I did to finish the theme:</p>
<p>&nbsp;</p>
<ul><li>Style the body html element</li><li>Center #visual-portal-wrapper and use 60em width</li><li>Change the plone logo. It was transparent for white background. Now it's transparent for any background. I took it from the official plone logo pack.</li><li>Style #portal-globalnav</li>
<ul><li>The navigation bar in hanging and plone are alike, but not equal. I also had to adjust the sizes, margin and padding.</li></ul>
<li>Style the columns</li>
<ul><li> This was trickier than the previuous commits. I had to create a special background for #portal-columns with some transparent pixels so I could align the header and the columns. Also, the portlet columns background won't take all the vertical space. ¿What should I do? Anyway, this is the best I can do in less than 1 hour.</li></ul>
<li>Override the Footer viewlet and style it.</li><li>Style the plone content. I use the test_rendering template as a guide (i.e. http://localhost:8080/Plone/test_rendering).</li><li>Add styles for headers and paragraphs.</li><li>Add styles for links</li><li>Adjust minor details</li></ul>
<p>&nbsp;</p>
<p>After some hours of hacking (I'm slooow), this is how it looks:</p>
<p><img class="image-inline image-inline" src="../recursos/WelcometoPloneSitio_1274394828518.png/image_preview" alt="Template hanging final" /></p>
<h2>Wrap up</h2>
<p>On part 1 of this post, I learned to prepare the system for buildout and Zope, I created a Plone 4
 instance from scratch and finally I learned to create and prepare a 
plone 
product for the new theme.</p>
<p>On this second part, I briefly described the Deco.gs grid framework and that we should pay attention to it. I also described Plone's html and CSS Layout and some very rough notes on the process of changing the stylesheets adding images or even adapting images for the plone theme.</p>
<p>While doing this theme I made every commit to git as small as possible. I hope that, if someone else (or me), walks trough the git log, he or she can learn about the theming process.</p>
<p>Finally, there are some issues with the theme, tough. Mainly with the columns. For example, the portlet columns may not fill up all the vertical space. I hope to find a trick to make them work. ¿Or should I start to theme sites using deliverance?</p>
<p>&nbsp;</p>
<p>Thanks for reading my bad english so far!!</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Buildout</dc:subject>
    
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Frameworks</dc:subject>
    
    
      <dc:subject>Diseño web</dc:subject>
    
    
      <dc:subject>Web y Web 2.0</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-05-20T22:45:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/theming-plone-4">
    <title>Theming Plone 4 - Part 1</title>
    <link>http://noenieto.com/blog/theming-plone-4</link>
    <description>Lately I've been doing themes for Plone 4. I forget things, so these notes serve as documentation for some tricks I usally do for theming. There might be better ways to do some of  them, so your comments are greatly appreciated.

The audience is for anyone who has previous experience with buildout, Plone, Plone theming and related technologies like JavaScript, HTML, CSS and so on.

UPDATE: Part 2 is now available.

This is the Part 1.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<h2>Intro</h2>
<p><b>UPDATE: Part 2 is now available:</b> <a href="http://www.noenieto.com/blog/theming-plone-4-part-2"> here</a></p>

<p>Lately I've been doing themes for Plone 4. I forget things, so these notes serve as documentation for some tricks I usally do for theming. There might be better ways to do some of&nbsp; them, so your comments are greatly appreciated.</p>
<p>The audience is for anyone who has previous experience with buildout, Plone, Plone theming and related technologies like JavaScript, HTML, CSS and so on.</p>
<h2>Setting up the environment.</h2>
<p>I will use pastescript and buidlout on linux. On a clean install of Ubuntu Lucid Lynx, I did:</p>
<pre>$ sudo aptitude install build-essential python-dev python-pip python-pastescript python-setuptools
</pre>
<pre>$ sudo pip install zopeskel</pre>
<h2>Create the buildout<br /></h2>
<p>Now, let's create a buildout:</p>
<pre>$ <strong>paster create -t plone3_buildout</strong>
Selected and implied templates:
&nbsp; ZopeSkel#plone3_buildout&nbsp; A buildout for Plone 3 installation

Enter project name: <strong>plone4b3</strong>
Variables:
&nbsp; egg:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plone4b3
&nbsp; package:&nbsp; plone4b3
&nbsp; project:&nbsp; plone4b3

**************************************************************************
**&nbsp;&nbsp; *** NOTE: You probably don't want to use this template!

**&nbsp; Since Plone 3.1, the preferred way to get a buildout-based setup
**&nbsp; for Plone is to use the standard installer for your operating
**&nbsp; system (the Windows installer, the Mac installer, or the Unified
**&nbsp; Installer for Linux/Unix/BSD). These give you a best-practice,
**&nbsp; widely-used setup with an isolated Python and a well-documented
**&nbsp; buildout. This template is here for older versions of Plone and
**&nbsp; for experts who explicitly want a raw, non-installer-based
**&nbsp; installation.

**&nbsp; (This message is particularly aimed at people following out-of-
**&nbsp; date books/documentation that suggest this is the right way to get
**&nbsp; a Plone-based buildout. This is no longer the case.)
**************************************************************************

Expert Mode? (What question mode would you like? (easy/expert/all)?) ['easy']: easy
Plone Version (Plone version # to install) ['3.3.4']: 4.0b3
Zope2 Install Path (Path to Zope2 installation; leave blank to fetch one!) ['']: 
Plone Products Directory (Path to Plone products; leave blank to fetch [Plone 3.0/3.1 only]) ['']: 
Initial Zope Username (Username for Zope root admin user) ['admin']: 
Initial User Password (Password for Zope root admin user) ['']: secret
HTTP Port (Port that Zope will use for serving HTTP) ['8080']: 
Debug Mode (Should debug mode be "on" or "off"?) ['off']: 
Verbose Security? (Should verbose security be "on" or "off"?) ['off']: 
Creating template plone3_buildout
Creating directory ./plone4b3
&nbsp; Copying README.txt to ./plone4b3/README.txt
&nbsp; Copying bootstrap.py to ./plone4b3/bootstrap.py
&nbsp; Copying buildout.cfg_tmpl to ./plone4b3/buildout.cfg
&nbsp; Recursing into products
&nbsp;&nbsp;&nbsp; Creating ./plone4b3/products/
&nbsp;&nbsp;&nbsp; Copying README.txt to ./plone4b3/products/README.txt
&nbsp; Recursing into src
&nbsp;&nbsp;&nbsp; Creating ./plone4b3/src/
&nbsp;&nbsp;&nbsp; Copying README.txt to ./plone4b3/src/README.txt
&nbsp; Recursing into var
&nbsp;&nbsp;&nbsp; Creating ./plone4b3/var/
&nbsp;&nbsp;&nbsp; Copying README.txt to ./plone4b3/var/README.txt

**************************************************************************
**&nbsp;&nbsp; Generation finished.

**&nbsp; You probably want to run python bootstrap.py and then edit
**&nbsp; buildout.cfg before running bin/buildout -v".

**&nbsp; See README.txt for details.
**************************************************************************
</pre>
<p>And finally, let's run bootstrap and buildout to download Plone3.</p>
<pre>tzicatl@tzicatl-lynx:~/plone4b3$ python bootstrap.py 
Creating directory '/home/tzicatl/plone4b3/bin'.
Creating directory '/home/tzicatl/plone4b3/parts'.
Creating directory '/home/tzicatl/plone4b3/eggs'.
Creating directory '/home/tzicatl/plone4b3/develop-eggs'.
Generated script '/home/tzicatl/plone4b3/bin/buildout'.
tzicatl@tzicatl-lynx:~/plone4b3$ bin/buildout 
.....
$
</pre>
<h2>Create theme product and add it to the buildout<br /></h2>
<p>Now, let's create the theme. We are going to base our design on <a class="external-link" href="http://www.freecsstemplates.org/preview/hanging/">this template</a> from FreeCSSTemplates.org:</p>
<pre>$ cd plone4b3/src

$ paster create -t plone3_theme
Selected and implied templates:
&nbsp; ZopeSkel#basic_namespace&nbsp; A basic Python project with a namespace package
&nbsp; ZopeSkel#plone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A project for Plone products
&nbsp; ZopeSkel#plone3_theme&nbsp;&nbsp;&nbsp;&nbsp; A theme for Plone 3

Enter project name: plonetheme.hanging&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Variables:
&nbsp; egg:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plonetheme.hanging
&nbsp; package:&nbsp; plonethemehanging
&nbsp; project:&nbsp; plonetheme.hanging
Expert Mode? (What question mode would you like? (easy/expert/all)?) ['easy']: easy
Skin Name (Name of the theme (human facing, added to portal_skins)) ['']: FreeCSSTemplates.org Hanging 
Empty Styles? (Override default public stylesheets with empty ones?) [False]: 
Include Documentation? (Include in-line documentation in generated code?) [True]: False
Version (Version number for project) ['1.0']: 
Description (One-line description of the project) ['An installable theme for Plone 3']: An Installable theme for Plone 4&nbsp;&nbsp;&nbsp; 
Creating template basic_namespace
Creating directory ./plonetheme.hanging

....</pre>
<p>Now it's time to modify buildout.cfg in order to add the new created theme product. So it's also time to do some extra modifications, these include:</p>
<ul><li>Remove all coments</li><li>Move eggs and zml declarations from [instance] section to [buildout] section</li><li>Add PIL and plonetheme.hanging to the eggs section</li><li>Add ZCML slug for plonetheme.hanging<br /></li></ul>
<p>&nbsp;</p>
<h2>Fine tune the theme package<br /></h2>
<p>Before running buildout, we are going to "fine tune" the theme package.</p>
<p>Lets start with src/plonetheme.hanging/setup.py</p>
<ul><li>Add author and author e-mail</li><li>Change url from <a class="external-link" href="http://svn.plone.org/svn/collective/">http://svn.plone.org/svn/collective/</a>&nbsp; to <a class="external-link" href="http://github.com/tzicatl/plone4andtheme">http://github.com/tzicatl/plone4andtheme</a></li><li>Change licens from "GPL" to "Creative Commons Attribution 3.0 Unported" (I'm not a lawyer so i don't know if i'm doing it right)</li><li>Modify README to include credits and description.</li><li>Rename docs/LICENSE.GPL to LICENSE.CC and paste the CC license contents.</li><li>Edit src/plonetheme.hanging/plonetheme/hanging/configure.zcml and delete the line:</li>
<ul><li>&nbsp; &lt;i18n:registerTranslations directory="locales" /&gt;</li><li>This is because we are not doing locales on this theme, but we can.</li></ul>
<li>I don't like the long names that paster creates for the folders inside skins directory. So usually change them to something shorter. In order to do that:</li>
<ul><li>Rename the directory, for example: rename from plonetheme_hanging_custom_images to hangingtheme_images.</li><li>Change the corresponding name in skins.zcml and profiles/default/skins.xml (working from src/plonetheme.hanging/plonetheme/hanging).</li><li>Note 1: Using your editor's "Search &amp; Replace" is a good idea.</li><li>Note 2: You can add another extra skin layers by adding directories and editing the two above files.</li></ul>
<li>Change the base theme from "Plone Default" to "Sunburst Theme" by editing profiles/default/skins.xml.<br /></li>
<ul><li>Open the file and look for this line: "&lt;skin-path name="FreeCSSTemplates.org Hanging" based-on="Plone Default"&gt;"</li><li>Change the based-on parameter from "Plone Default"&nbsp; to "Sunburst Theme"</li><li>This step is important in order to get all the new plone4 look &amp; feel and change it to suit our needs.</li></ul>
</ul>
<p>&nbsp;</p>
<p>Now, we are ready to run the buildout process.</p>
<p>First, run bootstrap.py if you haven't already done so</p>
<pre>$ python bootstrap.py</pre>
<p>&nbsp;</p>
<p>The buildout process will thake some minutes depending on the speed of your computer and mainly your network bandwidth.</p>
<p><br /></p>
<pre>$bin/buildout</pre>
<p>You might see some warnings but you should not see any error.</p>
<h2>Start plone instance</h2>
<p>&nbsp;</p>
<p>If the buildout process was sucessful, now you will be able to start your plone instance in foreground mode</p>
<pre>tzicatl@tzicatl-lynx:~/plone4b3$ bin/instance fg
2010-05-19 18:02:43 INFO ZServer HTTP server started at Wed May 19 18:02:43 2010
&nbsp;&nbsp;&nbsp; Hostname: 0.0.0.0
&nbsp;&nbsp;&nbsp; Port: 8080
2010-05-19 18:02:53 WARNING ZODB.FileStorage Ignoring index for /home/tzicatl/plone4b3/var/filestorage/Data.fs
2010-05-19 18:02:53 WARNING ZODB.blob (10127) Blob dir /home/tzicatl/plone4b3/var/blobstorage/ has insecure mode setting
2010-05-19 18:03:12 INFO Zope Ready to handle requests</pre>
<p>&nbsp;</p>
<p>Create a site and install the newly created theme. You should see a site equal to plone4's SunBurst Theme</p>
<p><img class="image-inline" src="../recursos/Pantallazo1.png/image_large" alt="Our plone theme" /></p>
<h2>Wrap up<br /></h2>
<p>&nbsp;</p>
<p>On this installment we learned (or I hope so) to prepare our system for buildout and Zope, we learned to create a Plone 4 instance from scratch and also learned to create and prepare a plone product for the new theme we are going to make.</p>
<p>&nbsp;</p>
<p>That's all for now. Wait for the Part 2.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Buildout</dc:subject>
    
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Internet Explorer 6</dc:subject>
    
    
      <dc:subject>Web y Web 2.0</dc:subject>
    
    
      <dc:subject>Diseño web</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-05-19T23:30:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/the-perfect-buildout-plone-3.3.5-fss-relstorage">
    <title>A buildout for Plone 3.3.5+fss+relstorage</title>
    <link>http://noenieto.com/blog/the-perfect-buildout-plone-3.3.5-fss-relstorage</link>
    <description>This is an uncommon Plone buildout. There is no ZODB. Instead, we use FileSystemStorage for files, images, and so on, and RelStorage for storing everything else in a relational DB.

Edit: Changed the title because it can confuse new users that this is the "standard" way to setu-up plone.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<h2>Intro</h2>
<div>On <a class="external-link" href="http://iservices.mx">iServices</a>, we used the Plone+FileSystemStorage+RelStorage bundle for several reasons that I don't remember well. If I have to answer why did we used that combination, I'd probably pass this question to <a class="external-link" href="http://twitter.com/erik_river">@erik_rive</a>r to answer it. He was the first one who made it work.</div>
<div>&nbsp;</div>
<div>So, I mantain all these sites, and over time we had some different ways to integrate the software bundle. Recently I had to upgrade <a class="external-link" href="http://www.amc-depresionyansiedad.com.mx/">this site</a> to Plone 3.3.5 and resolved to make a definitive buildout recipe. And thanks to the help of the guys at the <a class="external-link" href="https://mail.zope.org/pipermail/zodb-dev/2010-April/013254.html">ZODV-dev</a> mailing list I give you my ultimate Plone+FileSystemStorage+Relstorage buildout recipe.</div>
<div>&nbsp;</div>
<div>Note: Read the <a class="external-link" href="http://pypi.python.org/pypi/RelStorage">RelStorage</a> documentation</div>
<h2>The buildout recipe</h2>
<div>&nbsp;</div>
<pre>[buildout]
parts =
    zope2
    productdistros
    instance
    fss
    zopepy

extends = 
    http://dist.plone.org/release/3.3.5/versions.cfg
versions = versions

find-links =
    http://dist.plone.org/release/3.3.5
    http://dist.plone.org/thirdparty
    http://packages.willowrise.org

# Add additional eggs here
eggs =
#...System
    elementtree
    psycopg2
    PILwoTK
#...plone
    RelStorage
    Plone
    iw.fss
    
develop =

zcml =
    iw.fss
    iw.fss-meta
    
rel-storage = 
    type postgresql
    dbname plone335_zodb
    user zope
    password s3cr3t
    host localhost
    
[versions]
plone.recipe.zope2instance = 3.6
#ZODB3 = 3.7.3-polling
ZODB3 = 3.8.3-polling

[zope2]
recipe = plone.recipe.zope2install
fake-zope-eggs = true
url = ${versions:zope2-url}


[productdistros]
recipe = plone.recipe.distros
urls =
nested-packages =
version-suffix-packages =

[instance]
recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
user = admin:admin
http-address = 8080
#debug-mode = on
#verbose-security = on
eggs =  ${buildout:eggs}
zcml =  ${buildout:zcml}
rel-storage= ${buildout:rel-storage}
products =
    ${buildout:directory}/products
    ${productdistros:location}


[fss]
recipe= iw.recipe.fss
zope-instances = ${instance:location}
storages = 
    files / flat

[zopepy]
recipe = zc.recipe.egg
eggs = ${instance:eggs}
interpreter = zopepy
extra-paths = ${zope2:location}/lib/python
scripts = zopepy</pre>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Frameworks</dc:subject>
    
    
      <dc:subject>Programacion</dc:subject>
    
    
      <dc:subject>Diseño web</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-04-27T18:25:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/migrating-data-from-plone-3.2.1-to-plone-4.0b2">
    <title>Migrating data from Plone 3.2.1 to Plone 4.0b2</title>
    <link>http://noenieto.com/blog/migrating-data-from-plone-3.2.1-to-plone-4.0b2</link>
    <description>These are my notes about the process for migrating data from Plone 3 to Plone4. </description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<h3>Intro</h3>
<p>One of our customers wanted to renew the look&amp;feel of his website. His website ran Plone 3.2.1 with a custom skin (One of the first ones made by me, and one that I'am NOT very proud of).</p>
<p>We decided to do a clean Plone4 installation with a custom theme and mount a <a class="external-link" href="http://demo.sofomanec.com.mx/">beta site</a>. The resulting site looks considerably better that the previous one.&nbsp;We've been updating the site every time a new plone4 release comes out to the public, so at the time of writing of this post, Plone 4 was still in beta2.</p>
<h3>Migrating Data</h3>
<p>Some considerations:</p>
<p>&nbsp;</p>
<ul><li>Our customer's plone install didn't had very much customizations. We only had a couple of custom themes, <a class="external-link" href="http://plone.org/products/cachefu">CacheFu</a> and <a class="external-link" href="http://plone.org/products/carousel/">Products.Carousel</a>.</li><li>ChacheFu does not work with Plone 4 (by now).</li><li>Products.Carousel works very well with Plone 4 as of version 1.1</li><li>We wanted to "copy" only selected parts of the old site to the new site. The best way to do this is by exporting Plone content using zexp.</li></ul>
<p>&nbsp;</p>
<p>&nbsp;Given the above considerations, these are the steps I took for migrating data from one site to another.</p>
<p>&nbsp;</p>
<ul><li>Prepare a Plone 3 buildout with a copy of the zodb of the live site.</li><li>Deactivate/clean/uninstall our custom themes and CacheFu</li><li>Delete the "leftovers" of the uninstalled themes on portal_skins</li><li>Clear and Rebuild the entire catalog (just in case).</li><li>Pack the ZODB (Size decreases from 2GB to 760 MB)</li><li>Upgrade the Plone3 Buildout to Plone</li><li>Upgrade to Plone 3.3.5</li><li>Prepare Plone 4 buildout (in another folder) with a copy of the zodb of the Plone 3 site.</li><li>Upgrade to Plone 4</li></ul>
<p>&nbsp;</p>
<p>An that's it. Exporting content from the Plone 4 buildout to the new site works like a charm.&nbsp;</p>
<p>&nbsp;</p>
<p>P.D. I uploaded a copy of my dual buildout to git. <a class="external-link" href="http://github.com/tzicatl/Plone-3-to-Plone-4-buildout">Get it</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Web y Web 2.0</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-04-23T21:57:49Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/our-first-plone4-site-available-to-the-public">
    <title>Our first Plone4 site available to the public</title>
    <link>http://noenieto.com/blog/our-first-plone4-site-available-to-the-public</link>
    <description>This is what I did to integrate a Plone 4 site. It features: Plone4, webcoturier.dropdownmenu, Products.Carousel and Products.Collage
</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<h2>Intro</h2>
<p>One of our customers requested a Plone CMS. We decided to use Plone 4 when it was on alpha version, so I had to figure out a couple of extra stuff.</p>
<p>So we decided to go for this software bundle:</p>
<ul><li>Plone 4. We always try to upgrade to the latests release. We had to use some components directly from SVN (like&nbsp;plone.app.jquerytools).</li><li>Products.Collage. Latest from SVN.</li><li>Products.Carousel. Latest stable release was 1.1</li><li>webcoturier.dropdownmenu. SVN revision&nbsp;114137</li></ul>
<p>The mr.developer buildout extension was very helpful here.</p>
<p>We also made a custom theme to accomodate all the changes needed.</p>
<h2>Products.Collage</h2>
<p>Products.Collage received a little facelift from our custom theme's stylesheets. There were some issues with collage, since it's starting to provide plone4 support.</p>
<h2>Products.Carousel</h2>
<p>We did some rather extensive modifications to Products.Carousel.&nbsp;Carousel is very flexible, so we could&nbsp;almost completely rewrite the css to bend it to our needs.&nbsp;</p>
<p>I also needed to relocate the Carousel's viewlet from the plone.abovecontent manager to plone.portalheader. This was easily done with some zcml.</p>
<p>Finally, the carousel template was overriden so we could inser some more decorations.</p>
<h2>webcoturier.dropdownmenu</h2>
<p>&nbsp;</p>
<p>Initially, we did not experienced any extraordinary problem while customizing the dropdownmenu template (to hide the types icons) and adequating our css so the menu looks pretty. But when we started to test the menues with Internet Explorer, we realized that the work was not over.</p>
<p>So I had to read some more about IE and dropdownmenu and I write it here so that anyone who wants to do the same, don't have to waste time trying to figure out how to make them work with IE.</p>
<p>First of all: webcoturier.dropdownmenu uses the very famous <a class="external-link" href="http://www.htmldog.com/articles/suckerfish/dropdowns/">Son of Suckerfish</a> technique to make dropdown menues.&nbsp;So, It is important to read the original article in order to understand why are things done like that.</p>
<p>Then I had a problem with IE making a mess with the z-index css properties.&nbsp;</p>
<p>Basically, when Internet Explorer relatively positions an element, it defaults its z-index to 0. That should not happen.</p>
<p>So I had to be very careful to assign adequate z-index whenever was necesary. Also I had to clean up the css in order to avoid bogus or incorrect z-index or inadequate positioning.</p>
<p>The guys at <a class="external-link" href="http://groundwire.org/">GroundWire</a> had already figured this out.</p>
<p>A good live example of the IE z-index bug is <a class="external-link" href="http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html">here</a>. Also make sure you visit <a class="external-link" href="http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html">QuirksMode</a>'s bug report and read the comments.</p>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>The site is up an running&nbsp;<a class="external-link" href="http://demo.sofomanec.com.mx">here</a>.&nbsp;</p>
<p>Currently we have some buggy issues with plone's javascript code in IE6 and IE, but i had not the time to look at them.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>JQuery</dc:subject>
    
    
      <dc:subject>Web y Web 2.0</dc:subject>
    
    
      <dc:subject>JavaScript</dc:subject>
    
    
      <dc:subject>Internet Explorer 6</dc:subject>
    
    
      <dc:subject>Programacion</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-04-10T00:40:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/udev-en-linux">
    <title>udev en linux</title>
    <link>http://noenieto.com/blog/udev-en-linux</link>
    <description>Estoy haciendo una investigación de udev en linux. He aquí algunas ligas a información útil así como un acordeón con las reglas de los archivos .rules</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<h2 style="text-align: left;">Links a udev</h2>
<ul><li>Detectando memorias USB en Linux: Los servicios HAL y D-BUS</li>
<ul><li><a class="external-link" href="http://en.wikipedia.org/wiki/Udev">http://blog.pucp.edu.pe/item/88256</a></li></ul>
<li>Escribiendo archivos con reglas para udev (En inglés)</li>
<ul><li><a class="external-link" href="http://www.reactivated.net/writing_udev_rules.html">http://www.reactivated.net/writing_udev_rules.html</a></li></ul>
<li>Udev en la wikipedia</li>
<ul><li><a class="external-link" href="http://en.wikipedia.org/wiki/Udev">http://en.wikipedia.org/wiki/Udev</a></li></ul>
</ul>
<p>&nbsp;</p>
<h2>Acordeón de tipos de reglas para udev</h2>
<div>&nbsp;</div>
<table style="text-align: center;" class="invisible">
<tbody>
<tr>
<td><a title="Acordeón de reglas de udev en formato ODG" class="internal-link" href="../recursos/acordeon-de-reglas-de-udev-en-formato-odg">Bajar en formato ODG</a>&nbsp;</td>
<td><a title="Acordeón de reglas de udev en formato PDF" class="internal-link" href="../recursos/acordeon-de-reglas-de-udev-en-formato-pdf">Bajar en formato PDF</a>&nbsp;</td>
<td><a title="Acordeón de reglas de udev en formato JPG" class="internal-link" href="../recursos/acordeon-de-reglas-de-udev-en-formato-jpg">Bajar en formato JPG&nbsp;</a></td>
</tr>
</tbody>
</table>
<div style="text-align: center;">&nbsp;</div>
<p style="text-align: center;"><img class="image-inline" src="../recursos/acordeon-de-reglas-de-udev-en-formato-jpg/image_preview" alt="Acordeón de reglas de udev en formato JPG" /></p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>udev</dc:subject>
    
    
      <dc:subject>Linux</dc:subject>
    
    <dc:date>2010-04-07T17:37:46Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/1-million-tux-lleguemos-al-millon-de-usuarios-de-gnu-linux">
    <title>1 Million Tux !! (Lleguemos al millón de usuarios de GNU/Linux)</title>
    <link>http://noenieto.com/blog/1-million-tux-lleguemos-al-millon-de-usuarios-de-gnu-linux</link>
    <description>La página 1milliontux.org ha puesto la meta de conseguir nada más ni nada menos que 1.000.000 de personas que utilicen GNU/Linux.
http://1milliontux.org</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>La página <strong>1milliontux.org</strong> ha puesto la meta de conseguir nada más ni  nada menos que <strong>1.000.000</strong> de personas que utilicen GNU/Linux.</p>
<p>Para registrarse solo hace falta nombre de usuario, distribución,
gui, sitio web (opcional), cuenta de twitter/identi.ca (opcional) y el
código de pais (indicado por el top-level-domain, para Argentina sería
AR).</p>
<p>Ojalá  les guste la propuesta y se sumen: <a href="http://1-million-tux.linux-befehle.org/indexes.php" target="_blank">http://1milliontux.org</a></p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Linux</dc:subject>
    
    <dc:date>2010-03-25T01:48:13Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/links-about-server-performance">
    <title>Links about server performance </title>
    <link>http://noenieto.com/blog/links-about-server-performance</link>
    <description>I'm gathering different links to server performance. This is in strong bias to Plone, Zope and Python web servers.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<h3><a class="external-link" href="http://nichol.as/benchmark-of-python-web-servers">Benchmark of Python Web Servers&nbsp;By Nicholas Piël | March 15, 2010</a></h3>
<div>&nbsp;</div>
<p>&nbsp;</p>
<p>It has been a while since the Socket Benchmark of Asynchronous server. That benchmark looked specifically at the raw socket performance of various frameworks. Which was being benchmarked by doing a regular HTTP request against the TCP server. The server itself was dumb and did not actually understand the headers being send to it. In this benchmark i will be looking at how different WSGI servers perform at exactly that task; the handling of a full HTTP request.</p>
<div><a class="external-link" href="http://nichol.as/benchmark-of-python-web-servers">Link</a></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h3><a class="external-link" href="http://nichol.as/asynchronous-servers-in-python">Asynchronous Servers in Python&nbsp;Nicholas Piël | December 22, 2009</a></h3>
<div>
<div>&nbsp;</div>
</div>
<p>&nbsp;</p>
<p>There has already been written a lot on the C10K problem and it is known that the only viable option to handle LOTS of concurrent connections is to handle them asynchronously. This also shows that for massively concurrent problems, such as lots of parallel comet connections, the GIL in Python is a non-issue as we handle the concurrent connections in a single thread.</p>
<p>&nbsp;</p>
<p>In this post i am going to look at a selection of asynchronous servers implemented in Python.</p>
<div>
<div>&nbsp;</div>
<div><a class="external-link" href="http://nichol.as/asynchronous-servers-in-python">Link</a></div>
<div>&nbsp;</div>
<h3><a class="external-link" href="http://www.uie.com/articles/download_time/">The Truth About Download Time&nbsp;By CHRISTINE PERFETTI AND LORI LANDESMAN</a></h3>
<div>&nbsp;</div>
<div>We hear all the time from web designers that they spend countless hours and resources trying to speed up their web pages' download time because they believe that people are turned off by slow-loading pages. Their concerns have been amplified by experts like Jakob Nielsen who asserts that users become frustrated after waiting too long for pages to load. It makes sense that a slow loading page is unusable. We know that if a page takes 2 hours to load, chances are people will abandon their tasks. But when does download time go from too slow to fast enough?</div>
</div>
<div>
<div>&nbsp;</div>
<div><a class="external-link" href="http://www.uie.com/articles/download_time/">Link</a></div>
<div>&nbsp;</div>
</div>
<h3><a class="external-link" href="http://eleddy.com/blog/2008/05/on-web-application-scaling.html">&nbsp;I Poop on Designing for Scalability &nbsp;by Elizabeth Leddy</a></h3>
<div>
<div>&nbsp;</div>
<div>Some randome notes about programming for scalability.</div>
<div>&nbsp;</div>
<div><a class="external-link" href="http://eleddy.com/blog/2008/05/on-web-application-scaling.html">Link</a></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</div>
<h3><a class="external-link" href="http://maurits.vanrees.org/weblog/archive/2009/10/unloading-plone-approaching-scalability-in-integrated-plone-systems">Elizabeth Leddy: Unloading Plone: Approaching Scalability in Integrated Plone Systems by&nbsp;Maurits van Rees&nbsp;</a></h3>
<div>
<div>&nbsp;</div>
</div>
<p>&nbsp;</p>
<p>While there is an abundance of documentation on ways to achieve better performance with Plone, there is nothing quite like actually doing it, especially with other system components getting in the way. This case based look at the performance and scaling of Plone as part of an integrated system will cover perceived front-end latency, system stability as related to Plone responsiveness, and how to set up a hardware forward architecture. This talk is meant for designers and integrators of large Plone installations.</p>
<div>
<div>&nbsp;</div>
<div><a class="external-link" href="http://maurits.vanrees.org/weblog/archive/2009/10/unloading-plone-approaching-scalability-in-integrated-plone-systems">Link</a></div>
<div>&nbsp;</div>
<h3><a class="external-link" href="http://scalingplone.pbworks.com/">Plone Scaling and Performance (Work in Progress)</a></h3>
<div>
<div>&nbsp;</div>
<div>This is an informal place to organize thoughts and ideas about scaling plone (including performance). I wanted to have a workspace where people can freely contribute and once things are more solidified then I'll take the time to format into one cohesive "thing" and publish on plone.org/documentation. Feel free to contribute wherever you would like, big or small, and make sure to pimp yourself in the contributors section.&nbsp;</div>
<div>&nbsp;</div>
<div><a class="external-link" href="http://scalingplone.pbworks.com/">Link</a></div>
</div>
<h3><a class="external-link" href="http://www.slideshare.net/eleddy/unloading-plone">Unloading Plone by Elizabeth Eddy (Slides in slideshare)</a></h3>
<div>
<div>&nbsp;</div>
<div>These are the slides form Elizabeth Leddy's &nbsp;talk in Plone Conf.</div>
<div><a class="external-link" href="http://www.slideshare.net/eleddy/unloading-plone">Link</a>&nbsp;</div>
<div>&nbsp;</div>
</div>
<h3><a class="external-link" href="http://plone.blip.tv/file/3042000/">Unloading Plone by Elizabeth Eddy (Video from PloneConf 2009)</a></h3>
<div>
<div>This is the video from Elizabeth Leddy's talk in PloneConf 2009.</div>
<div><a class="external-link" href="http://plone.blip.tv/file/3042000/">Link</a></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</div>
</div>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Varnish</dc:subject>
    
    
      <dc:subject>Diseño web</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-03-16T20:52:29Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/mis-manas-para-debuggear-zope-plone">
    <title>Mis mañas para debuggear Zope/Plone</title>
    <link>http://noenieto.com/blog/mis-manas-para-debuggear-zope-plone</link>
    <description>Pongo un par de mañas que uso para depurar y desarrollar aplicaciones Zope y Plone</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>No hay nada como usar un buen depurador para desarrollar programas o para depurarlos. Después de un año de experiencia con Plone y Zope me atreví a aprender a usar las herramientas de ayuda que trae por default.</p>
<p>&nbsp;</p>
<p>Aquí en iServices usamos buildout para desarrollar y desplegar nuestras aplicaciones. Buildout se encarga de agrupar utilerias debajo de scripts que residen en ./bin. Dos de ellos son:</p>
<pre>./bin/zopepy</pre>
<pre>./bin/instance</pre>
<p>&nbsp;</p>
<p>./bin/zopepy te entrega un shell de python en un entorno igual al que corren las aplicaciones de Plone.</p>
<p>./bin/instance es una navaja suiza. Nos ofrece diferentes opciones:</p>
<p>&nbsp;</p>
<pre>$ bin/instance
program: /home/tzicatl/plone4a3/parts/instance/bin/runzope
daemon manager not running
zopectl&gt; help

Documented commands (type help &lt;topic&gt;):
========================================
EOF      debug       help       logtail  restart  show    stop
adduser  fg          kill       quit     run      start   wait
console  foreground  logreopen  reload   shell    status

Undocumented commands:
======================
reopen_transcript  test

zopectl&gt;</pre>
<p>&nbsp;</p>
<p>Y aqui el link donde viene cómo preparar adecuadamente el shell de debug</p>
<p>&nbsp;</p>
<p><a class="external-link" href="http://stackoverflow.com/questions/279119/how-do-i-search-for-unpublished-plone-content-in-an-ipython-debug-shell/427914">http://stackoverflow.com/questions/279119/how-do-i-search-for-unpublished-plone-content-in-an-ipython-debug-shell/427914</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Web y Web 2.0</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-03-15T17:55:47Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/varios-efectos-de-jquery-que-se-ven-bien">
    <title>Varios efectos de JQuery que se ven bien</title>
    <link>http://noenieto.com/blog/varios-efectos-de-jquery-que-se-ven-bien</link>
    <description>Me encontre en http://www.geektantra.com varios efectos de Jquery que pueden quedar bien en algunos sitios de Plone.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<div>&nbsp;</div>
<h2>JQuery MegaMenu</h2>
<div>Este menú te muestra un buen resumen (Al estilo sitemap) del contenido de un tab.</div>
<div><a class="external-link" href="http://www.geektantra.com/projects/jquery-megamenu/">http://www.geektantra.com/projects/jquery-megamenu/</a></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<h2>JQuery Live Form Validation</h2>
<div>Esta versión de validación de formularios se ve muy simple y muy agradable. Le indica al usuario qué campos no ha llenado (duh!) Pero&nbsp;también&nbsp;indica qué campo ya llenó o cuál esta editando.</div>
<div><a class="external-link" href="http://www.geektantra.com/projects/jquery-form-validate/">http://www.geektantra.com/projects/jquery-form-validate/</a></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>JQuery Sliding Menu</div>
<div>Este efecto de jquery hace que el menú seleccionado se anime de una manera muy peculiar.&nbsp;</div>
<div><a class="external-link" href="http://www.geektantra.com/projects/jquery-sliding-menu/">http://www.geektantra.com/projects/jquery-sliding-menu/</a></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>El blog original es:</div>
<div><a class="external-link" href="http://www.geektantra.com">http://www.geektantra.com</a>/</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>JQuery</dc:subject>
    
    
      <dc:subject>Diseño web</dc:subject>
    
    <dc:date>2010-03-01T22:29:47Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/unicode-y-utf-8-en-plone">
    <title>Unicode y UTF-8 en Plone</title>
    <link>http://noenieto.com/blog/unicode-y-utf-8-en-plone</link>
    <description>Notas acerca de errores con acentos y eñes y etc etc. Y aún no entiendo bien por qué truena.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>Tengo este producto de plone que trae buenos links (bueno, un solo link bueno):</p>
<p><a class="external-link" href="http://plone.org/products/unicodeerrordetector">http://plone.org/products/unicodeerrordetecto</a>r&nbsp;</p>
<p>Recomienda este articulo de Joel On software: <a class="external-link" href="http://www.joelonsoftware.com/articles/Unicode.html">http://www.joelonsoftware.com/articles/Unicode.html</a></p>
<p>Ahora, <a class="external-link" href="http://twitter.com/erik_river">Erik</a> opina esto:</p>
<p>Dentro de un <a class="external-link" href="http://www.buildout.org/">buildout</a> de plone:</p>
<pre>$ cd parts/zope2/lib/python</pre>
<p>Crear, en ese directorio, un archivo con el nombre&nbsp;<strong>sitecustomize.py</strong> que contenga lo siguiente</p>
<pre>import sys
sys.setdefaultencoding('utf-8')</pre>
<p>Esto es porque, en eduIntelligent, tenemos un problema con Products.PloneGlossary. Y el problema dice así (<a class="external-link" href="http://pypi.python.org/pypi/Products.PloneGlossary/1.4.0#plone-unicode-issue">link</a>):</p>
<pre>Plone Unicode issue
<span class="Apple-style-span">===================

If you use an old version of Plone (&lt; 3.2), you'll encounter `this issue
&lt;http://dev.plone.org/plone/ticket/7522&gt;`_: using non ASCII characters in
your glossary requires to change the default encoding of your Zope.


To do this, add a `sitecustomize.py` file to your $SOFTWARE_HOME with
these two lines::

  import sys
  sys.setdefaultencoding('utf-8')

Then replace "utf-8" above with the value of the "default_charset" property
in your "portal_properties/site_properties".</span></pre>
<p>&nbsp;</p>
<p>Y, además, en&nbsp;zope.conf tweaks, tenemos:</p>
<pre>If the Plone sites of your instance use another charset, or if you
need another batch size, you might append this to your `zope.conf`::

  &lt;product-config ATFlashMovie&gt;
    charset utf-8 # Or iso-8859-15
  &lt;/product-config&gt;</pre>
<div>&nbsp;</div>
<p><strong>Esto pinta como para hacer un buen documento de las cosas que no deben hacerse al desarrollar productos en plone. Cosas que se rompen cuando le pones acentos a las cosas.</strong></p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Programacion</dc:subject>
    
    
      <dc:subject>Plone</dc:subject>
    
    
      <dc:subject>Software Libre</dc:subject>
    
    <dc:date>2010-02-01T18:23:14Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/lecciones-aprendidas-internacionalizacion-en-plone">
    <title>Lecciones aprendidas: internacionalizacion en plone</title>
    <link>http://noenieto.com/blog/lecciones-aprendidas-internacionalizacion-en-plone</link>
    <description>Este es un resumen de lo que he aprendido acerca de cómo se hacen las traducciones tanto para productos de terceros, mis propios productos y hasta completar o cambiar algunas traducciones del mismo plone.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<h2>Intro</h2>
<p>En este documento intento concentrar lo poco que he aprendido acerca del proceso de internacionalización en productos en Plone.</p>
<h2>Casos de uso</h2>
<p>El componente de software encargado de administrar todas las traducciones de las docenas de diferentes paquetes o huevos que componen Plone se llama <a class="external-link" href="http://plone.org/products/pts">Placeless Translation Service</a>. Se encuentra dentro del Panel de control de Zope (No de Plone). &nbsp;Por ejemplo : http://localhost:8080/Control_Panel/TranslationService/manage_main</p>
<p>Encuentro varios casos en la que es necesario tomar ventaja de la maquinaria de traducción de Plone:</p>
<ul><li>Se ha integrado un CMS Plone con productos de terceros y alguno de esos productos no tiene traducción al español.</li><li>Alguno de los productos tiene traducción deficiente o incompleta. Por deficiente quiero decir que lo que ya está traducido expresa conceptos muy técnicos, rebuscados o abstractos que hacen que la experiencia del usuario sea difícil.<br /></li><li>Partes de plone no están traducidas o la traducción no se ajusta a las necesidades del usuario final.</li></ul>
<p>&nbsp;</p>
<p>También puedo listar, ahora de manera mas técnica, los casos de traducción:</p>
<p>&nbsp;</p>
<ul><li>Traducir mensajes de las plantillas de Plone</li><li>Traducir mensajes de archivos de python (Restricted Python)</li><li>Traducir mensajes de archivos de python</li>
<ul><li>Schemas y Archetypes</li><li>Todo lo demás<br /></li></ul>
<li>Traducir ZCML <br /></li>
<ul><li>User actions</li><li>Archetypes</li><li>Workflows</li></ul>
</ul>
<p>&nbsp;</p>
<p>Lo que aprendí en <a class="external-link" href="http://maurits.vanrees.org/weblog/archive/2007/09/i18n-locales-and-plone-3.0">este post</a> de <a class="external-link" href="http://maurits.vanrees.org/">Maurits van Rees</a> es el por qué se usan los directorios <strong>i18n</strong> y <strong>locales</strong> y cuál es la diferencia entre usar uno u otro.&nbsp;Después de leer esto presento mis 2 centavos con los scripts que uso para mantener múltiples idiomas de las traducciones.</p>
<h2>Internacionalización en iServices</h2>
<p>En <a class="external-link" href="http://iservices.com.mx">iServices</a> nos dedicamos principalmente, al e-Learning. Hemos escogido a Python como nuestra plataforma de desarrollo. Plone es usado como la base para el LCMS eduintelligent y hay planes para liberarlo al mundo pero aún hay mucho código que depurar y mejorar antes de liberarlo.</p>
<p>&nbsp;</p>
<p>Por lo que he visto, la manera de añadir traducciones a un determinado producto es, a groso modo:</p>
<ul><li>Identificar y marcar las cadenas candidatas a traducción. El lenguaje que se usa en código fuente es inglés y después se traduce al español, que es el idioma que maneja la vasta mayoría de nuestros clientes.<br /></li><li>Se usó un script para extraer las cadenas de traducción por primera vez, y después se fueron añadiendo y manteniendo a mano.</li><li>Hay muchas veces que se escribe contenido y/o mensajes en español y las cadenas no se marcan para traducción o símplemente no se traducen. No estoy condenando, yo mismo lo he hecho ante la presión de las fechas de entrega o simplemente por que el programador fué perezoso o por alguna extraña razón, a Plone o a Zope, no le dió la gana tomar las traducciones.</li></ul>
<p>&nbsp;</p>
<h3>
<h2><span class="Apple-style-span"><strong>Haciendo uso de i18ndude</strong></span></h2>
</h3>
<p><a class="external-link" href="http://pypi.python.org/pypi/i18ndude">i18ndude</a> es la herramienta preferida para extraer cadenas de traducción de los productos de plone (de terceros o propios). Se puede instalar a nivel de sistema o mediante <a class="external-link" href="http://www.buildout.org/">buildout</a>. Aquí muestro una receta para usar i18ndude desde buildout:</p>
<pre>[buildout]
parts =
    ...
    i18ndude

...

[i18ndude]
recipe = zc.recipe.egg
eggs = i18ndude</pre>
<p>Al añadir lo de arriba a buildout.cfg y después de ejecutar bin/buildout, encontraremos la orden bin/i18ndude lista para ser usada y de manera independiente del sistema.</p>
<p>Ahora, para poder usar i18ndude, dentro de nuestros productos,&nbsp;modifiqué un script que&nbsp;tomé de <a class="external-link" href="http://pypi.python.org/pypi/p4a.video/">p4a.video</a>. Luce así:</p>
<pre>#!/bin/bash 

DOMAIN="edutrainingcenter"
DOMAIN_PLONE="plone"
I18NDUDE=../../bin/i18ndude
# If you want to add another language create folders and empty file:
#   mkdir -p locales/&lt;lang_code&gt;/LC_MESSAGES
#   touch locales/&lt;lang_code&gt;/LC_MESSAGES/$DOMAIN.po
# and run this script
# Example: locales/hu/LC_MESSAGES/$DOMAIN.po

touch locales/$DOMAIN.pot
$I18NDUDE rebuild-pot --pot locales/$DOMAIN.pot --create $DOMAIN ./
$I18NDUDE rebuild-pot --pot locales/$DOMAIN-$DOMAIN_PLONE.pot --create $DOMAIN_PLONE ./

# sync all locales
find locales -depth -type d   \
     | grep -v .svn \
     | grep -v LC_MESSAGES \
     | sed -e "s/locales\/\(.*\)$/\1/" \
     | xargs -I % $I18NDUDE sync --pot locales/$DOMAIN.pot locales/%/LC_MESSAGES/$DOMAIN.po

# sync all locales
find locales -depth -type d   \
     | grep -v .svn \
     | grep -v LC_MESSAGES \
     | sed -e "s/locales\/\(.*\)$/\1/" \
     | xargs -I % $I18NDUDE sync --pot locales/$DOMAIN-$DOMAIN_PLONE.pot locales/%/LC_MESSAGES/$DOMAIN-$DOMAIN_PLONE.po</pre>
<p>&nbsp;</p>
<h2>Diferentes datos (sin orden aparente)</h2>
<p>Aquí agrupo diferentes datos que he encontrado que estan relacionados con este tema, pero que no he encontrado alguna forma de estructurar.</p>
<h3>El origen de la directiva registerTransations</h3>
<p>&nbsp;El origen de la directiva:</p>
<pre>&lt;i18n:registerTranslations directory="locales" /&gt;</pre>
<p>Probablemente viene de aqui:</p>
<p>https://mail.zope.org/pipermail/zope3-dev/2006-May/019494.html</p>
<h3>Notas de internacionalización con PTS en el wiki de zope</h3>
<p>Aquí:&nbsp;<a class="external-link" href="http://wiki.zope.org/zope2/HowToInternationaliseWithPTS">http://wiki.zope.org/zope2/HowToInternationaliseWithPTS</a></p>
<h3>Problema al traducir actions.xml</h3>
<p>Me puse a traducir actions.xml que puse dentro de un tema. Pero lo primero que ocurrió es que habia fallos al instalar el tema. Al final del traceback teniamos esto:</p>
<pre>BadRequest: The property i18n_domain does not exist</pre>
<p>Esto fue por que al añadir el soporte de internacionalizacion, especifique el dominio en el sitio equivocado. Osea que fue así:</p>
<pre><em> &lt;object name="user" meta_type="CMF Action Category"
         </em><strong><em>i18n:domain="iservicestheme.domain"</em></strong><em>&gt;</em>
  &lt;property name="title"&gt;&lt;/property&gt;
  &lt;object name="perfil" meta_type="CMF Action" &gt;
   &lt;property name="title" i18n:translate=""&gt;Profile&lt;/property&gt;
   &lt;property name="description" i18n:translate=""&gt;Access to my profile&lt;/property&gt;
   &lt;property name="url_expr"&gt;string:${member/absolute_url}&lt;/property&gt;
   &lt;property name="icon_expr"&gt;&lt;/property&gt;
   &lt;property name="available_expr"&gt;python:member is not None&lt;/property&gt;
   &lt;property name="permissions"/&gt;
   &lt;property name="visible"&gt;True&lt;/property&gt;
  &lt;/object&gt;
&lt;/object&gt;</pre>
<p>
Pero la manera correcta es así:</p>
<pre> &lt;object name="user" meta_type="CMF Action Category"&gt;
  &lt;property name="title"&gt;&lt;/property&gt;
  <em>&lt;object name="perfil" meta_type="CMF Action" </em><strong><em>i18n:domain="iservicestheme.domain"</em></strong><em>&gt;</em>
   &lt;property name="title" i18n:translate=""&gt;Profile&lt;/property&gt;
   &lt;property name="description" i18n:translate=""&gt;Access to my profile&lt;/property&gt;
   &lt;property name="url_expr"&gt;string:${member/absolute_url}&lt;/property&gt;
   &lt;property name="icon_expr"&gt;&lt;/property&gt;
   &lt;property name="available_expr"&gt;python:member is not None&lt;/property&gt;
   &lt;property name="permissions"/&gt;
   &lt;property name="visible"&gt;True&lt;/property&gt;
  &lt;/object&gt;
&lt;/object&gt;</pre>
<p>Y la solucion la pude encontrar gracias a esta página:</p>
<p><a class="external-link" href="http://banyan.usc.edu/log/plone-old/plone-logs">http://banyan.usc.edu/log/plone-old/plone-logs</a></p>
<h2>Eso es todo</h2>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Plone</dc:subject>
    
    <dc:date>2010-02-01T18:07:26Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noenieto.com/blog/django-y-buildout">
    <title>django y buildout (Parte 1)</title>
    <link>http://noenieto.com/blog/django-y-buildout</link>
    <description>Esta es la primera parte de las notas que escribo acerca de cómo usar Django con buildout.

Esto fué realizado en una instalación limpia de Ubuntu Karmic 9.10

</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>Esta es una guía de instalación de Django que es diferente a la que se anuncia en la página web de Django. Usaremos buildout, que es una interesante manera de replicar en entorno de desarrollo en producción y viceversa.</p>
<p>Una de las principales ventajas de usar buildout para nuestros proyectos en python es que es posible crear un entorno independiente de las librerías del sistema. En la práctica esto significa que se puede replicar las mismas condiciones que hay en el servidor en nuestro entorno de desarrollo.</p>
<p>&nbsp;</p>
<p>Comencemos.</p>
<h2>Paso 1 - Instalación de distribute y PIP</h2>
<p>&nbsp;Primero, algunas notas:</p>
<ul><li>Python usa <em>distutils</em> para manejar sus librerías.</li><li>Después del lanzamiento de distutils, emergió el sistema <em>setuptools</em> para automatizar el manejo de dependencias y el manejo de paquetes. Según <a class="external-link" href="http://ziade.org/">Tarek Ziade</a>, en su libro <a title="Expert Python Programming: Learn best practices to designing, coding, and distributing your Python software" href="http://my.safaribooksonline.com/9781847194947">Expert Python Programming: Learn best practices to designing, coding, and distributing your Python software</a>, <em>setuptools</em> es a Python lo que <em>apt</em> es a Debian/Ubuntu.</li><li>Las librerías de python se distribuyen en un formato común, que en la comunidad python les han llamado huevos (<em>eggs</em>). Un huevo de python es un archivo <em>zip</em>, pero con la extensión <em>.egg</em>.<br /></li><li>El <em>PyPi</em> (Python Package Index) es el lugar principal donde se concentran la mayoría de los huevos de Python. Existen otros índices, tales como el índice de productos de Plone. El PyPi viene siendo a Python, como los repositorios de paquetes a Debian/Ubuntu.</li><li><em>setuptools</em> ha estado envejeciendo y en base a eso, Tarek Ziade decidió hacer un<a class="external-link" href="http://tarekziade.wordpress.com/2009/07/19/the-strange-world-of-packaging-forking-setuptools/"> fork de <em>setuptools</em></a> llamado <strong>distribute</strong> (<a class="external-link" href="http://pypi.python.org/pypi/distribute">http://pypi.python.org/pypi/distribute</a>)<br /></li><li><em>PIP</em> es el reemplazo de <em>easy_install</em>.</li></ul>
<p>Todo este cambio se resume en la siguiente imagen:</p>
<img class="image-inline image-inline" src="../recursos/pip_distribute.png/image_preview" alt="pip-distribute" />
<p>&nbsp;</p>
<p>&nbsp;Una vez terminado el intento de explicación, pongámonos manos a la obra. Aquí está una lista de instrucciones necesarias para instalar <em>distribute</em> en una máquina limpia. Se instalará <em>distribute</em>, <em>pip</em> y <em>pastescript</em>.</p>
<pre>tzicatl@hormiga-negra:~ $ wget http://python-distribute.org/distribute_setup.py
tzicatl@hormiga-negra:~ $ sudo python distribute_setup.py 
tzicatl@hormiga-negra:~ $ sudo easy_install pip
tzicatl@hormiga-negra:~ $ sudo pip install PasteScript</pre>
<p>Ahora, probando paster:</p>
<pre>tzicatl@hormiga-negra:~/Descargas$ paster create --list-templates
Available templates:
  basic_package:  A basic setuptools-enabled package
  paste_deploy:   A web application deployed through paste.deploy
tzicatl@hormiga-negra:~/Descargas$</pre>
<p>Funciona!!.</p>
<p>El siguiente paso es instalar las plantillas necesarias para que <em>paster</em> genere todo el esqueleto de nuestro proyecto con <em>Django</em>.</p>
En PyPi hay dos huevos con recetas para crear projectos con Django y Buildout,
<ul><li><a class="external-link" href="http://pypi.python.org/pypi/fez.djangoskel/">&nbsp;http://pypi.python.org/pypi/fez.djangoskel/</a></li>
<ul><li>Contiene plantillas para crear esqueletos de código y construir una instancia de django usando buildout.</li></ul>
<li><a class="external-link" href="http://pypi.python.org/pypi/djangorecipe">http://pypi.python.org/pypi/djangorecipe</a></li>
<ul><li>Descarga Django y lo instala en un lugar independiente de las liberías que tiene el sistema.<br /></li></ul>
</ul>
<p>&nbsp;</p>
Comenzamos por instalar <em>fez.djangoskel<span class="Apple-style-span">:</span></em>
<pre>tzicatl@hormiga-negra:~$ sudo pip install fez.djangoskel</pre>
Ahora paster tiene las siguientes opciones:
<pre>tzicatl@laptop:~ $ paster create --list-templates
Available templates:
  basic_package:             A basic setuptools-enabled package
  django_app:                Template for a basic Django reusable application
  django_buildout:           A plain Django buildout
  django_namespace_app:      Template for a namespaced Django reusable application
  django_namespace_project:  Template for a namespaced Django project
  django_project:            Template for a Django project
  paste_deploy:              A web application deployed through paste.deploy
tzicatl@laptop:~ $</pre>
<h2>Paso 2 - Crear un buildout para django</h2>
<p>&nbsp;</p>
<pre>tzicatl@laptop:~/programar$ paster create -t django_buildout
Selected and implied templates:
  fez.djangoskel#django_buildout  A plain Django buildout

Enter project name: my_djangobuildout
Variables:
  egg:      my_djangobuildout
  package:  my_djangobuildout
  project:  my_djangobuildout
Enter django_version (Django version to fetch, the default is 1.0.2) ['1.0.2']: <strong>1.1.1</strong>
Enter django_project_name (Name of the main Django project folder) ['project']: projects
Creating template django_buildout
Creating directory ./my_djangobuildout
  Copying README.txt to ./my_djangobuildout/README.txt
  Copying bootstrap.py to ./my_djangobuildout/bootstrap.py
  Copying buildout.cfg_tmpl to ./my_djangobuildout/buildout.cfg
  Copying devel.cfg_tmpl to ./my_djangobuildout/devel.cfg
-----------------------------------------------------------
Generation finished
You probably want to run python bootstrap.py and then edit
buildout.cfg before running bin/buildout -v

See README.txt for details
-----------------------------------------------------------
tzicatl@laptop:~/programar$</pre>
<p>Con esta instrucción se ha creado un directorio my_djangobuildout que contiene los archivos necesarios para arrancar nuestra buildout. Veamos qué archivos contiene:</p>
<pre>tzicatl@laptop:~/programar$ cd my_djangobuildout/
tzicatl@laptop:~/programar/my_djangobuildout$ ls
bootstrap.py  buildout.cfg  devel.cfg  README.txt 
tzicatl@laptop:~/programar/my_djangobuildout$</pre>
<p>&nbsp;Tenemos 3 archivos:</p>
<ul><li><em>bootstrap.py</em></li>
<ul><li>Ejecuta este archivo para crear un directorio <em>bin/</em> con los diferentes scripts que se han configurado en <em>buildout.cfg</em>.<br /></li></ul>
<li><em>buildout.cfg</em></li>
<ul><li>Es el archivo de configuración principal. Aquí se instruye a buildout sobre qué scripts ejecutar. También aquí controlaremos qué librerías extras se instalaran en nuestro entorno.<br /></li></ul>
<li><em>devel.cfg</em></li>
<ul><li>Opciones de configuración extras para el modo de depurado.<br /></li></ul>
<li><em>README.txt</em></li>
<ul><li>Archivo README ;)</li></ul>
</ul>
<p>&nbsp;</p>
<p>Ahora modificamos <em>buildout.cfg</em> para que todo se ejecute con <em>python2.6</em> y se instalen 2 librerías extra de manera independiente del sistema. El <em>buildout.cfg</em> original es este:</p>
<pre>[buildout]
parts = django

[django]
recipe = djangorecipe
version = 1.1.1
project = projects
wsgi=true
settings=production</pre>
<p>Y completadas las modificaciones queda así:</p>
<pre>executable=/usr/bin/python2.6
parts = 
    zlib
    PIL
    django

eggs = 
    PIL

[django]
recipe = djangorecipe
version = 1.1.1
project = projects
wsgi=true
settings=production

# Build zlib for PIL, and PIL so we don not rely on something in the system
[zlib]
recipe = hexagonit.recipe.cmmi
url = http://www.zlib.net/zlib-1.2.3.tar.gz
configure-options = --shared
 
[PIL]
recipe = zc.recipe.egg:custom
egg = PIL
find-links = http://dist.repoze.org/
include-dirs = ${zlib:location}/include
library-dirs = ${zlib:location}/lib
rpath = ${zlib:location}/lib</pre>
<p>&nbsp;</p>
<p class="callout">Nota1: Este es el momento perfecto para añadir los archivos que estan dentro del buildout a un repositorio git o SVN.</p>
<p class="callout">Nota 2: Ahora es momento de configurar ~/.buildout/default.cfg para designar un directorio común de cache de huevos de python (.egg). (<a class="external-link" href="http://plone.org/documentation/manual/developer-manual/managing-projects-with-buildout/creating-a-buildout-defaults-file">Link hacia la documentación de Plone</a>).</p>
<p>&nbsp;</p>
<p>Ejecutamos bootstrap.py</p>
<pre>tzicatl@laptop:~/programar/my_djangobuildout$ python2.6 bootstrap.py 
Creating directory '/home/tzicatl/programar/my_djangobuildout/bin'.
Creating directory '/home/tzicatl/programar/my_djangobuildout/parts'.
Creating directory '/home/tzicatl/programar/my_djangobuildout/develop-eggs'.
Generated script '/home/tzicatl/programar/my_djangobuildout/bin/buildout'.
tzicatl@laptop:~/programar/my_djangobuildout$</pre>
<p>Ahora ya podemos ejecutar el buildout que automaticamente bajará, compilará e instalará Django, Zlib y PIL en un entorno aislado del sistema.&nbsp; Lo que se va a ver en la consola será algo como esto:</p>
<pre>tzicatl@laptop:~/programar/my_djangobuildout$ bin/buildout 
Unused options for buildout: 'download-directory'.
Installing django.
Getting distribution for 'zc.buildout'.
Got zc.buildout 1.4.2.
Generated script '/home/tzicatl/programar/my_djangobuildout/bin/django'.
Generated script '/home/tzicatl/programar/my_djangobuildout/bin/django.wsgi'.
tzicatl@laptop:~/programar/my_djangobuildout$</pre>
<p>Examinemos el directorio. Ahora el contenido del directorio lucirá así:</p>
<pre>tzicatl@laptop:~/programar/my_djangobuildout$ ls
bin  bootstrap.py  buildout.cfg  devel.cfg  develop-eggs  parts  projects  README.txt
tzicatl@laptop:~/programar/my_djangobuildout$ ls bin/
buildout  django  django.wsgi
tzicatl@laptop:~/programar/my_djangobuildout$ ls develop-eggs/
tzicatl@laptop:~/programar/my_djangobuildout$ ls parts/
django
tzicatl@laptop:~/programar/my_djangobuildout$ ls projects/
development.py  __init__.py  media  production.py  settings.py  templates  urls.py
tzicatl@laptop:~/programar/my_djangobuildout$</pre>
<p>A continuación se explicará cáda uno de los directorios y archivos</p>
<ul><li>bin/</li>
<ul><li>El directorio donde residen los programas y scripts para construir una instancia de django y controlarla.<br /></li></ul>
<li>develop-eggs/</li>
<ul><li>Aquí se depositan huevos de python<br /></li></ul>
<li>parts/</li>
<ul><li>Si existe alguna librería de python que no esté empaquetada como huevo (por ejemplo, zlib), este será el lugar donde residirán esas librerías.<br /></li></ul>
<li>projects/</li>
<ul><li>Aquí es donde depositaremos nuestro código que conformará nuestra aplicación de Django.<br /></li></ul>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Hasta aquí la primera entrega de mis Notas.</p>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Noe Misael Nieto Arroyo</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>Toolkits</dc:subject>
    
    
      <dc:subject>Python</dc:subject>
    
    
      <dc:subject>Django</dc:subject>
    
    
      <dc:subject>Web y Web 2.0</dc:subject>
    
    
      <dc:subject>Diseño web</dc:subject>
    
    <dc:date>2010-01-18T23:12:59Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>





</rdf:RDF>
