Blog Archives

Learning SQLAlchemy – Quick references and notes for me

THIS IS JUST FOR MY PERSONAL LEARNING- so It is not detailed instruction. I am just keeping this for future quick reference http://docs.sqlalchemy.org/en/latest/orm/tutorial.html Connecting For this tutorial we will use an in-memory-only SQLite database. To connect we use create_engine(): >>>

Tagged with: ,
Posted in mysql, python, sqlalchemy

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: http://docs.webfaction.com/software/zope-and-plone/configuring.html 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

alt+tab not working in ubuntu

this link was helpful http://askubuntu.com/questions/126337/alt-tab-is-not-working-in-gnome-shell-at-ubuntu-12-04 open terminal and 1. sudo apt-get install compizconfig-settings-manager 2. ccsm ccsm will open and you go to “Window Management” there you check mark “Application Switcher” then close it hope this helps  

Tagged with: , , , ,
Posted in important links, Linux, python, Tips And Tricks, Ubuntu

Learning Sublime Text 3

how to install http://www.sublimetext.com/3 download and install Adding SVN in sublime text 3 1. https://sublime.wbond.net/ click install now 2. open ST3 press ctrl+` copy paste lines from Sublime Text 3 tab and press enter 3. then to open command pallate: ctrl+shift+p on Windows and

Tagged with: , , , ,
Posted in Linux, python, Tips And Tricks, Ubuntu

ImportError: Entry point (‘console_scripts’, ‘easy_install’) not found

found a solution here: http://stackoverflow.com/questions/18584055/problems-while-installing-python-mysql-package curl -O http://python-distribute.org/distribute_setup.py sudo python distribute_setup.py

Tagged with: , , , ,
Posted in python, Tips And Tricks, Ubuntu

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. http://developer.plone.org/searching_and_indexing/indexing.html#index-types 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
Disclaimer
All content provided on this "tareqalam.com" 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 [tareqalam.wordpress.com] 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.
August 2017
M T W T F S S
« Apr    
 123456
78910111213
14151617181920
21222324252627
28293031  

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

Join 23 other followers