Personal tools
You are here: Home Feeds All Howtos and Tutorials

All Howtos and Tutorials

All Grok howtos and tutorials.

A real world example of Adaption
Imagine that you are about to give a presentation at a meeting. You've brought your laptop, and the room has a projector and a cable to plug your laptop into the projector. However, the cable you brought won't plug into the projector because your cable only interfaces with a DVI port, and the projector only interfaces with a VGA port.
Adapters from an MVC architecture perspective
How do Adapters compare to the MVC architecture?
Further Reading
There are some more documents that can help you grasping the concept of adaptation
Adapters in a Web Application
While using physical adapters to connect laptops is something that we can understand, where would using adapters in a web application make sense?
A Grok-Centric Explanation of Adaptation
Adaptation is a central concept in the Zope 3 Component Architecture. This explanation approaches it from a Grok perspective.
Understanding viewlets
Viewlets is a flexible way to compound html snippets. Learn what they are and how they work.
A Grok Application and a Grok Model
A Grok Application is something that can be installed. A Grok Model is an object that is saved in the Zope Object Database.
Writing tests, discovering and running them with grok.testing
Get started writing tests for your Grok project and use grok.testing to automatically discover the tests.
Use the same view in multiple models
If you have multiple models each with their own views, perhaps you want all views to have access to one view in common.
Discussion
The tutorial is deliberately short to make it more approachable but there are of course lots of other interesting options to consider.
Making a website that uses layers to enable a mobile enabled version of the site
As an example application we're going to develop a very simple site that uses macros and then later add a layer dedicated for mobile phone browsing without having to put in "if" statements in your templates to accommodate for the differences you'll want to apply.
Publishing the layer
Views are registered with layers and layers are published by skins.
Setting up the web page
We'll first write a normal Grok application from scratch that uses macros to put together the templates.
Set custom configurations on a system level that your application can use
Certain properties are best stored persistently inside your application. Other properties are more appropriate to store on a "system" level.
Using Viewlets for Layout
Viewlets can be used instead of macros to make a flexible layout. This howto shows how they can be used for this purpose.
Combine grokproject with the SVN trunk version of Grok
You want to use grokproject to set up a development environment but you also want to develop with the latest and greatest from the SVN trunk. We'll show how to do that.
Writing tests, discovering and running them with z3c.testsetup for dummies
This How-to shows you how to get started with writing tests for your Grok project and then use z3c.testsetup to discover the tests.
Defining 'all-purpose' macros
To define an 'all-purpose' macro, i.e. a macro, that can render objects of (nearly) any type and thus be accessed from any other page template, just set a very general context for your macro view:
Referencing a simple macro
How to reference a simple macro?
Defining a simple macro
In Grok macros are defined in usual views, where the associated page templates contain `metal`-statements to define the desired macros. Macros generally are attributes of the page template wherein they are defined, but to get them rendered, we usually use views.
Document Actions