Blog Archives

plone.restapi common errors

when writing a test I was getting errors like this when running it: ConnectionError: HTTPConnectionPool(host=’nohost’, port=80): Max retries exceeded with url: /plone/@resultdbusers/noam (Caused by NewConnectionError(‘<requests.packages.urllib3.connection.HTTPConnection object at 0x7fd8f5469ad0>: Failed to establish a new connection: [Errno -2] Name or service not

Tagged with: , , , , ,
Posted in development, ploneCMS

How to create a branch in svn and how to merge (in short)

How to create a branch $ svn copy \ \ -m “Creating a private branch of /calc/trunk.” Committed revision 341. How to merge: $ pwd /home/user/my-calc-branch $ svn merge ^/calc/trunk — Merging r345 through r356 into ‘.’: U

Tagged with: , , , , ,
Posted in archtype, Ubuntu

find out how many open connection in mysql

mysqladmin –user=root –password=mysqlpass processlist -i 1 is a great thing 🙂 shows how many mysql connection/process open in server specially in python mysql you can get errors like this: OperationalError: (1040, ‘Too many connections’) this means you have many connection

Tagged with: , , , , ,
Posted in Linux, mysql, ploneCMS

plone: jq not defined

jq not defined saw this  u need to add a js file in any of the jsregistry in your plone. /* Provides globals jq and cssQuery; Both are deprecated and are provided only for backwards compatibility. DEPRECATION WARNING: The jq

Tagged with: , , , , , ,
Posted in AJAX, Javascript, jQuery, ploneCMS

Plone: run code as admin

need this first: from zope.component.hooks import getSite from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager from AccessControl.User import UnrestrictedUser as BaseUnrestrictedUser class UnrestrictedUser(BaseUnrestrictedUser): “””Unrestricted user that still has an id. “”” def getId(self): “””Return the ID of the

Tagged with: , , , , ,
Posted in archtype, Plone theme, ploneCMS, python, Tips And Tricks

Plone add a default timezone

Inspired by: Sometime you download a datafs from a server located in USA. but you are working in European timezone. to avoid confusion add the timezoneinfo in the buildout so server and your local has the same timezone. to do

Tagged with: , , , , , , ,
Posted in ploneCMS, python, Tips And Tricks, Zope

Plone querying the KeywordIndex

if you have a index in plone where you want to store a list type data then you should use keyword index. for example a index has value like [‘a’,’b’,’c’] want to search with catalog for ‘b’ or ‘c’

Tagged with: , , , , , , , ,
Posted in archtype, ploneCMS, python, Tips And Tricks
All content provided on this "" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
December 2017
« Apr    

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 23 other followers