Monday, December 8, 2008

Adding Textile to Google App Engine

By default, App Engine includes a copy of Django that it pulls in components from. However, the integration points between App Engine and Django are fairly custom and not well documented. Trying to follow vanilla Django examples for installing Textile will not work in the context of App Engine. To get Textile to work will involve a number of steps.

To begin with, you will want to create a lib folder in your App Engine project's home directory.

~/Projects/Example$ mkdir lib

You will then want to download Textile and extract into your newly created lib folder.

~/Projects/Example$ cd lib
~/Projects/Example/lib$ curl -O http://pypi.python.org/packages/source/t/textile/textile-2.1.2.tar.gz
~/Projects/Example/lib$ tar xzf textile-2.1.2.tar.gz

The Django template library django.contrib.markup will attempt to import from the namespace textile. You need to let Python know to look inside directories in the lib directory for namespaces. To do this, you will need to modify your sys.path to include those directories. The way to do this is to add the following code to the top of the file or files that contain your main functions, such as main.py in some of the App Engine demos.

import os
import sys
import logging

DIR_PATH = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
LIB_PATH = os.path.join(DIR_PATH, "lib")
EXTRA_PATHS = []
for path in os.listdir(LIB_PATH):
fullpath = os.path.join(LIB_PATH, path)
if os.path.isdir(fullpath) and not path.startswith("."):
EXTRA_PATHS.append(fullpath)
sys.path = sys.path + EXTRA_PATHS

This will modify the sys.path and let Python know to look inside of your lib directory for namespaces to import.

Now that Textile is installed, you need to register the necessary Django template library with App Engine. To do this, you need to make the following call in your code before rendering a template. I put this call in my base controller, as the first line of my get and post functions.

def get(self):
template.register_template_library('django.contrib.markup.templatetags.markup')
# Do your template processing here.

At this point, you should be able to use the textile template tag in App Engine templates like so.

<span>{{someVar|textile}}</span>

88 comments:

  1. Thanks for your informative post. Your info graphic helped me to create my first blog on blogger platform. Please assist me whether my blog on Web designing course in Chennai is eligible for AdSense.

    ReplyDelete
  2. Responsive desing can yield a very good revenue to a business. It has been discovered since the usage of multiple devices increase. The content furnished above too tells the same. Thanks for sharing this information in here. Please keep bloging content like this.

    Web designing course in chennai | Web designing course | PHP Training in Chennai

    ReplyDelete
  3. Wonderful data. Thank you intended for delivering you a really helpful data. Continue the favorable do the job in addition to keep on delivering you additional quality data from time to time.Home Textile

    ReplyDelete
  4. Nice blog....

    Buzz Applications for your website service, designs and application....

    ReplyDelete
  5. Very nice blog post ! wonderful devices to increase on content thanks for sharing. safety training|Industrial safety college| fire and safety course training chennai|Iosh ms course training in chennai|nebosh course in India keep post this is nice blogger platform .

    ReplyDelete
  6. WE are offering ios 7 app design in affordable price for your Products and much more......

    ReplyDelete
  7. IVR (Interactive Voice Response) administration is intended to diminish the expenses of work, build operations proficiency, and enhance the administration that your clients experience when they call. It can likewise cooperate with different frameworks and utilize this to give continuous data to guests.

    Hosted IVR

    ReplyDelete
  8. HTML5 is the recently arrived most trending technology that has bright future. If you are interested in studying HTML5 training visit this website.
    html5 training in chennai | html5 training chennai | html5 course in chennai

    ReplyDelete
  9. Nice post you have done here. I am really very happy to read this. This is a very informative topic that you are chosen.wp plugin

    ReplyDelete

  10. To keep ourselves up to date with the current trend is not an easy task in IT. But we can, through quality and worth able content like this. Thanks for sharing this web page. Please write more articles like this in future.
    PHP training in Chennai | PHP course in Chennai

    ReplyDelete

  11. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The angular js programming language is very popular which are most widely used.
    AngularJS Training in Chennai | Angularjs training Chennai

    ReplyDelete
  12. PHP provides the best option to build the website where we can design our website in a very interactive manner that provides better functioning in data management.
    PHP Training in Chennai | PHP course in Chennai

    ReplyDelete
  13. Thanks Admin for sharing such a useful post, I hope it’s useful to many individuals for whose looking this precious information to developing their skill.
    Regards,
    php course|PHP Training|PHP Training in Chennai

    ReplyDelete
  14. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    Ethical hacking Course in Chennai | Ethical hacking Training in Chennai

    ReplyDelete
  15. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The python programming language is very popular and most widely used.
    Python Training in Chennai | Python Course in Chennai

    ReplyDelete
  16. Updating with the latest technology and implementing it is the only way to survive in our niche. Thanks for making me this article. You have done a great job by sharing this content in here. Keep writing article like this.
    SAS Training in Chennai | SAS Course in Chennai

    ReplyDelete
  17. شركة تنظيف بالمدينة المنورة
    تعد المدينة المنورة من ارقى مناطق المملكة و تتميز بالطابع الدافئ والتواصل بين سكانها واجتماعهم في المناسبات المختلفه من هنا جاءت اهمية شركة تنظيف بالمدينة المنورة لتقديم خدمات التنظيف للبيوت والمنازل والفلل والقصور
    ولاننا ندرك بان المنازل تحتاج الى عمالة مدربة على تنظيف الاماكن الواسعة فالاول لمهارة عمالها تعد افضل شركة تنظيف منازل بالمدينة المنورة تتميز بسرعة اداء عمالها في تقديم خدمة تنظيف منازل بالمدينة المنورة نتميز باننا افضل شركات تنظيف الفلل بالمدينة المنورة
    افضل شركة رش مبيدات بالمدينة المنورة
    وكثيرا ما تحتوى المنازل على عدة خزانات فلابد من الاستعانة بافضل شركة تنظيف خزانات بالمدينة المنورة فهى تستخدم افضل منظفات الخزانات والمطهرات نتميز باننا احسن شركة غسيل خزانات بالمدينة المنورة نغسل كافة انواع خزانات مياه الشرب بالمدينة
    ولاننا افضل شركة تنظيف شقق بالمدينة المنورة نقدم افضل خدمة تنظيف شقق بالمدينة المنورة بالاعتماد على افضل منظفات الكنب والستائر بالبخار
    _______________________________
    وكثيرا ما يحتاج سكان المدينة المنورة الى شركة نقل اثاث لنقل الاثاث من المدينة المنورة الى اى مكان داخل او خارج المملكة من هنا جاءت اهمية افضل شركة نقل اثاث بالمدينة المنورة تستخدم افضل سيارات نقل العفش المخصصة لهذا الغرض من هنا استحقت الاول افضل شركة نقل عفش بالمدينة المنورة
    شركة تنظيف شقق بالقطيف

    شركة نقل اثاث بينبع -
    شركة عزل خزانات بالرياض
    شركة عزل الاسطح بالمدينة المنورة
    ____________________________________

    تعتبر تسربات المياه من احد المشكلات التى لابد ان نقوم بحلها على الفور لان تسربات المياه تؤدى الى عدد كبير من المشكلات نحن فى غنى عنها فالاول شركة كشف تسربات المياه بالمدينة المنورة تعتمد على افضل الاجهزه والالات المخصصه باعمال الكشف عن تسربات المياه فلا داعى للقلق من شان التسربات على الاطلاق فتذكر عزيزى العميل ان شركة كشف تسربات المياه بالمدينة المنورةعلى اتم استعداد للوصول الى اى مكان بالمدينة او خارج المدينة للقيام بالكشف عن تسربات المياه

    ReplyDelete
  18. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Web Designing Course in Chennai | web designing training in chennai

    ReplyDelete
  19. Very interesting content which helps me to get the in depth knowledge about the technology. To know more details about the course visit this website.
    Digital marketing course in Chennai | Digital marketing training in Chennai

    ReplyDelete
  20. Updating with the latest technology and implementing it is the only way to survive in our niche. Thanks for making me this article.
    SAS Training in Chennai | SAS Training Institute in Chennai

    ReplyDelete
  21. Here we present to introduce to all visitors in this great blog. and thank you for allowing me .

    cara menggugurkan kandungan
    obat aborsi
    tanda tanda kehamilan

    ReplyDelete
  22. The information you have deliver here is really useful to make my knowledge good. Thanks for your heavenly post. It is truly supportive for us and I have accumulated some essential data from this blog.
    Best JAVA Training institute in Chennai|JAVA Training in Chennai|JAVA Training

    ReplyDelete
  23. Thanks for sharing these niche piece of knowledge. Here, I had a solution for my inconclusive problems & it’s really helps me a lot keep updates…
    Big Data Hadoop Training in Chennai|Hadoop Course in Chennai

    ReplyDelete
  24. Interesting post with the recent updates that are available in the information technology that helped me to get update according to the recent trends.
    Java training institute in Chennai

    ReplyDelete
  25. dự án chung cư vinhomes nguyễn trãi là một quần thể đô thị hiện đại chung cu vinhomes nguyen trai được trang bị nội thất tinh tế thiết kế vinhomes nguyễn trãi sang trọng vinhomes nguyen trai đẳng cấp kết hợp cùng tiện nghi vinhome nguyen trai cao cấp vinhome nguyễn trãi là điểm đến lý tưởng vincom nguyen trai đầy đủ cho người tiêu dùng vincom nguyễn trãi có bán giày nam các loại giày da nam đẹp nhất, giày lười nam đẹp.Công ty thiết kế nội thất hàng đầu tại hà nội, chuyên thiet ke noi that

    ReplyDelete
  26. شركة صيانة مكيفات بالرياض
    تواجه مشاكل مع مكيف الهواء الخاص بك؟ العديد من المشاكل التي لديك مع مكيف الهواء الخاص بك قد تحل ببساطة تفعل ذلك بنفسك خطوات الصيانة التي يمكنك اتخاذها. القول المأثور "يبقيه بسيط غبي" يقطع شوطا طويلا. قبل افتراض أن لديك مشكلة تقنية الرئيسية التي يتطلب اصلاح مكيف لإصلاحها بعد اتهام لك ثروة، تبدأ من خلال القيام ببعض الخطوات البسيطة صيانة أجهزة تكييف الهواء وفحص بعض المشاكل واضحة.
    شركة صيانة مكيفات بالرياض
    شركة صيانة مكيفات سبليت
    أولا عليك دائما أن تكون على يقين لديك فلتر الهواء النقي في النظام الخاص بك. إذا كنت وحدة لم التبريد وهل لاحظت تراكم الجليد أو حول وحدتك في الأماكن المغلقة أو في الهواء الطلق يجب إيقاف مكيف الهواء وإيقاف المروحة على لمدة 6-8 ساعات للسماح الجليد لذوبان الجليد. تذكر الجليد ترى من خارج النظام الخاص بك ليست سوى جزء صغير منه. معظم البناء الجليد حتى على المبخر أو لفائف داخل عمل القناة الخاص بك ان كنت لا تستطيع رؤية ذلك تأكد من السماح لها ذوبان الجليد لمدة 6-8 ساعات قبل ان يتحول حدتك مرة أخرى. بمجرد تحويله يعود على يقين الفلتر نظيف، جميع سجلات مفتوحة، والمنطقة المحيطة عن العرض والعودة السجلات هو واضح. إذا كان النظام يتجمد مرة أخرى بمجرد تشغيله سوف تحتاج إلى استدعاء المؤهلين اصلاح مكيف الهواء. يمكن أن النظام الخاص بك تكون منخفضة على الفريون. إذا يضيف الفريون ولكن غير قادر على تحديد موقع تسرب يمكنك محاولة "الفريون طقم إصلاح تسرب" تباع عبر الإنترنت التي هي سهلة لوضعها في النظام الخاص بك.
    شركة تنظيف مكيفات
    شركة تنظيف مكيفات بالرياض
    شركة تنظيف مكيفات اسبليت

    ReplyDelete
  27. Excellent post. I have read your blog it's very interesting and informative. Keep sharing.
    erp in chennai

    ReplyDelete
  28. This is a comprehensive post. I recommend this topic.This site has lots of interest concepts.MCSE Training Institute in Chennai | MCSE Training Institute in Velachery.

    ReplyDelete
  29. This is a very good article material and it is very useful for us all. thank you . cara menggugurkan kandungan

    ReplyDelete

  30. شركة كشف تسربات المياه بالرياض
    شركة البيت السعيد
    طرق الشركة في كشف تسربات المياه
    و عزل التسربات :
    إذا كانت تسربات المياه من الخزانات فإن شركة البيت السعيد شركة كشف تسربات المياه بالرياض
    لديها الكثير من المواد التي تستخدمها، ومن أكثرها استعمالًا مادة البيتومين ومادة الإيبوكسي، وهما ليس لهما أي أضرار على صحة الإنسان.
    إذا كانت تسربات المياه في الحمامات فإن شركة البيت السعيد شركة كشف تسربات المياه بالرياض تعتمد على مادة الإيبوكسي في علاج أماكن التسرب، حيث إن مادة الإيبوكسي من المواد شديدة العزل للمياه 
    شركة كشف تسربات المياه

    البيت السعيد
    للاستفسار عن جميع خدمات البيت السعيد عزل مائي و عزل حراري و عزل اسطح و عزل خزانات و عزل فوم وجميع انواع العوازل و رش مبيد و مكافحة حشرات و تسليك مجاري و شركة كشف تسربات المياه
    و فحص فلل
    و صيانة مباني و ترميم منازل و نقل عفش و اثاث بالرياض يرجي الاتصال على 0543578920
    او زورو موقعنا على الانترنت

    http://www.elbaytelsaeed.com/2017/07/25/%d8%a3%d9%81%d8%b6%d9%84-%d8%b4%d8%b1%d9%83%d8%a9-%d9%83%d8%b4%d9%81-%d8%aa%d8%b3%d8%b1%d8%a8%d8%a7%d8%aa-%d8%a7%d9%84%d9%85%d9%8a%d8%a7%d9%87-%d8%a8%d8%a7%d9%84%d8%b1%d9%8a%d8%a7%d8%b6/ 

    ReplyDelete
  31. Be charming and grin a considerable measure. Try not to speak down about anything. Mobile App Developers

    ReplyDelete
  32. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Java Project Center in Chennai | Best Java Projects in Velachery

    ReplyDelete
  33. Your post has everything that is obtained complete and really useful. It's a beautiful...Mobile Computing Projects Center in Chennai | Mobile Computing Projects Center in Velachery

    ReplyDelete
  34. a pride for me to be able to discuss on a quality website because I just learned to make an article on
    cara menggugurkan kandungan

    ReplyDelete


  35. نستخدم افضل ادوات تنظيف و غسيل الخزانات لاننا افضل شركة تنظيف خزانات بالمدينة المنورة و عمال مدروبون وحاصلون على شهادة صحية فقط اتصل بنا لتحصل على افضل خدمة تنظيف خزانات بالمدينة المنورة


    ReplyDelete
  36. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    java training in bangalore

    ReplyDelete
  37. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.

    java training in bangalore

    ReplyDelete
  38. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.selenium training in bangalore

    ReplyDelete
  39. Nice post. I have been reading a lot of stuff on this topic in the last few months, but this article stands out with its simplicity & authenticity. Every passage made profound sense. Thanks a lot for this.
    MCA Project Center in Chennai | MCA Project Center in Velachery

    ReplyDelete
  40. I and my friends were going through the nice, helpful tips from the blog then the sudden came up with an awful suspicion I never expressed respect to the website owner for those secrets.

    big data training in bangalore

    ReplyDelete
  41. This comment has been removed by the author.

    ReplyDelete
  42. Nice information About Search engine...Wonderful Article and very useful.. thanks for sharing....
    VMware Training Institute in Chennai | VMware Training Institute in Velachery

    ReplyDelete
  43. Those rules moreover attempted to wind up plainly a decent approach to perceive that other individuals online have the indistinguishable enthusiasm like mine to get a handle on incredible arrangement more around this condition
    Big Data Training in Marathahalli

    ReplyDelete
  44. I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
    dotnet training in bangalore

    ReplyDelete

  45. I am commenting to let you know what a terrific experience my daughter enjoyed reading through your web page. She noticed a wide variety of pieces, with the inclusion of what it is like to have an awesome helping style to have the rest without hassle grasp some grueling matters.

    Selenium Training in Chennai

    ReplyDelete
  46. I am really happy to read your blog..It was very informative article.keep updating regularly.Java Project Center in Chennai | Java Project in Velachery

    ReplyDelete
  47. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    big-data-hadoop-training-institute-in-bangalore

    ReplyDelete
  48. It’s too informative blog and I am getting collection of info. Thanks for sharing; I would like to see your updates regularly so keep blogging. Best CCNA Training Institute in Chennai | Best CCNP Training Institute in Chennai | Hardware & Networking Training in Chennai

    ReplyDelete
  49. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    oracle training in Bangalore

    ReplyDelete
  50. Its very nice article and informative article. Thanks for sharing.Austere Technolgoies is Best cloud solutions service company

    ReplyDelete
  51. good content and thanks for giving nice information to read your blog. we are provide wonderful serivce mobile application development please visit for more information Hi Thanks for the nice information its very useful to read your blog. We provide best Mobile application development Services

    ReplyDelete
  52. good content and thanks for giving nice information to read your blog. we are provide wonderful serivce mobile application development please visit for more information Mobile application development Services

    ReplyDelete
  53. Very good informative article. Thanks for sharing such nice article, keep on up dating such good articles.

    NO.1 APP DEVELOPMENT SERVICES | MASSIL TECHNOLOGIES

    ReplyDelete
  54. Impressive blog with unique content...Thanks for sharing and keep updating.Python Training Institute in Chennai | Python Training Institute in Velachery

    ReplyDelete
  55. This comment has been removed by the author.

    ReplyDelete
  56. REALLY VERY EXCELLENT INFORMATION. I AM VERY GLAD TO SEE YOUR BLOG FOR THIS INFORMATION. THANKS FOR SHARING. KEEP UPDATING.
    Best IT Security Services | Austere Technologies

    ReplyDelete
  57. Nice to read this article.... Thanks for sharing this information.....
    Best Summer Courses in Chennai|Best Summer Courses in Velachery

    ReplyDelete
  58. Ciitnoida provides Core and java training institute in noida. We have a team of experienced Java professionals who help our students learn Java with the help of Live Base Projects. The object-oriented, java training in noida , class-based build of Java has made it one of most popular programming languages and the demand of professionals with certification in Advance Java training is at an all-time high not just in India but foreign countries too.

    By helping our students understand the fundamentals and Advance concepts of Java, we prepare them for a successful programming career. With over 13 years of sound experience, we have successfully trained hundreds of students in Noida and have been able to turn ourselves into an institute for best Java training in Noida.

    java training institute in noida
    java training in noida
    best java training institute in noida
    java coaching in noida
    java institute in noida

    ReplyDelete