Questions tagged [grok]

Grok is a web framework running atop of Zope application server written in Python with aim to make Zope technology more accessible to the masses as well as speed up the development process. Exploiting convention-over-configuration paradigm, Grok uses Zope Toolkit libraries and provides building blocks for your application along with the way to tie it all together.

Grok is a web framework running atop of Zope application server written in Python with aim to make Zope technology more accessible to the masses as well as speed up the development process.

Exploiting convention-over-configuration paradigm Grok uses Zope Toolkit libraries and provides building blocks for your application along with the way to tie it all together.

Visit grok to learn more.

486 questions
63
votes
1 answer

ZCML allowed_attributes corresponding method in five.grok

Is there a way to mark methods traversable in grok.CodeView classes, like you can do with Zope 3 BrowserView and allowed_attributes ZCML configuration directive? I found docs about grok.traversable() but it looks like such method does not exist in…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
12
votes
3 answers

Django vs. Grok / Zope3 vs. Pylons

I am a computer programmer by training but have been away from web development for a while. I am doing a little bit of background research on various Python web development frameworks. I understand that Django, Grok / Zope 3, and Pylons are all…
John Gu
  • 123
  • 1
  • 4
7
votes
3 answers

grok vs. django comparison

What are the smashing (pun intended) features of grok that makes it better than django? how do I know when my project needs grok+zope, or it can just be developed with django ?
Stefano Borini
  • 138,652
  • 96
  • 297
  • 431
6
votes
1 answer

Using multiple grok pattern to assign value to 1 field

My question is regarding how to use Grok pattern. I am aware that a given existing Grok pattern, I can use the following syntax to assign the values to a field: %{DATESTAMP_RFC822:timestamp} I also know that I can create my own custom pattern and…
javakurious
  • 487
  • 6
  • 13
5
votes
2 answers

Grok finding my static folder in a plone product

I discovered that in a Plone install, which had a 1.2.0 five.grok installed, I just had to have a "static" folder in my egg source, and grok would register it appropriately. When I moved to an environment with a 1.3.0 five.grok installed, this…
luke.tunmer
  • 183
  • 6
5
votes
3 answers

Logstash pattern for nginx error log

This is my sample error log: 2017/03/29 17:32:56 [error] 21924#21924: *212595 access forbidden by rule, client: 172.31.0.14, server: , request: "POST /app/etc/local.xml HTTP/1.1", host: "www.overcart.com" I want a grok pattern that matches this. I…
RedHead_121
  • 55
  • 1
  • 6
5
votes
1 answer

Plone 4.3 - How to build a Form package using Zc3.form without Grok?

I am trying to build a form package for a Plone website. I am currently working with Plone 4.3. Before I was using Dexterity with five.grok and grok libraries. But after reading the Plone 4.3 migration and five.grok dependency section of this…
Herr Josua
  • 453
  • 7
  • 19
4
votes
3 answers

AWS Glue Crawler - single record CSV

I have a bunch of files stored in S3 in CSV format (no header) but in many cases only one record per file. for example: "6ad0638e-e7d3-4c33-8271-5b3972c6155f",1532653200000 When I run crawler it creates for each file separated…
Vladimir Ilic
  • 71
  • 1
  • 7
4
votes
1 answer

Reasons to prefer zope 3 over grok

I am familiar with zope 2 and think that zope 3 is superior in many ways, as far as I've used it (i.e. primarily with Five). Now I'm considering to dive deeper into zope 3. Would you recommend going even one step further and use grok instead, and if…
Johannes Charra
  • 29,455
  • 6
  • 42
  • 51
4
votes
1 answer

Dynamic Source for Plone dexterity RelationList

I have a Plone (4.2) form that is grokked. I want to have a dynamic source for a specific field. The relevant part of the schema: from plone.directives import form from z3c.relationfield.schema import RelationList, RelationChoice from five import…
moestly
  • 1,681
  • 15
  • 19
3
votes
1 answer

If I have an @staticmethod in my python webapp, do I need to protect it with threading.RLock()?

I have a webapp built in python running off the paste server. If I have declared an @staticmethod that assigns state to method-scoped variables do I have to protect it with eg threading.RLock() (or is there a better way) in order to prevent multiple…
citronic
  • 9,868
  • 14
  • 51
  • 74
3
votes
1 answer

Grok equivalent for ZCML's "require" directive

I'm writing an add-view adapter and want to restrict its use to a specific permission. In ZCML I can do the following:
JC Brand
  • 2,652
  • 18
  • 18
3
votes
1 answer

Reuse the same template for different content types

I'm creating quite a few Dexterity content types (thanks zopeskel.dexterity devs!!) but even if I need them to be different content types (searches, collections...), some of them will be rendered equally. So, there's any way to reuse the same…
gforcada
  • 2,498
  • 17
  • 26
3
votes
1 answer

Is it possible to use five.grok to register portlets in Plone 4.1?

I looked into five.grok and found no reference to Portlets. Can it be done?
Noe Nieto
  • 2,521
  • 2
  • 17
  • 25
3
votes
0 answers

How to crawl files with special characters (more than 1) as delimiter, for aws glue?

I have this kind of data:- ColumnA~|~ColumnB~|~ColumnC xyz~|~1090~|~yes abc~|~1011~|~yes How to parse it through glue correctly without the delimiter ~|~ Tried using grok, but it was unable to parse
1
2 3
32 33