@@ -1313,6 +1313,39 @@ def validate(self, context, data_dict, schema, action):
13131313 :rtype: (dictionary, dictionary)
13141314 '''
13151315
1316+ def prepare_dataset_blueprint (self , package_type , blueprint ):
1317+ u'''Update or replace dataset blueprint for given package type.
1318+
1319+ Internally CKAN registers blueprint for every custom dataset
1320+ type. Before default routes added to this blueprint and it
1321+ registered inside application this method is called. It can be
1322+ used either for registration of the view function under new
1323+ path or under existing path(like `/new`), in which case this
1324+ new function will be used instead of default one.
1325+
1326+ Note, this blueprint has prefix `/{package_type}`.
1327+
1328+ :rtype: flask.Blueprint
1329+
1330+ '''
1331+
1332+ def prepare_resource_blueprint (self , package_type , blueprint ):
1333+ u'''Update or replace resource blueprint for given package type.
1334+
1335+ Internally CKAN registers separate resource blueprint for
1336+ every custom dataset type. Before default routes added to this
1337+ blueprint and it registered inside application this method is
1338+ called. It can be used either for registration of the view
1339+ function under new path or under existing path(like `/new`),
1340+ in which case this new function will be used instead of
1341+ default one.
1342+
1343+ Note, this blueprint has prefix `/{package_type}/<id>/resource`.
1344+
1345+ :rtype: flask.Blueprint
1346+
1347+ '''
1348+
13161349
13171350class IGroupForm (Interface ):
13181351 u'''
@@ -1477,6 +1510,23 @@ def validate(self, context, data_dict, schema, action):
14771510 :rtype: (dictionary, dictionary)
14781511 '''
14791512
1513+ def prepare_group_blueprint (self , group_type , blueprint ):
1514+ u'''Update or replace group blueprint for given group type.
1515+
1516+ Internally CKAN registers separate blueprint for
1517+ every custom group type. Before default routes added to this
1518+ blueprint and it registered inside application this method is
1519+ called. It can be used either for registration of the view
1520+ function under new path or under existing path(like `/new`),
1521+ in which case this new function will be used instead of
1522+ default one.
1523+
1524+ Note, this blueprint has prefix `/{group_type}`.
1525+
1526+ :rtype: flask.Blueprint
1527+
1528+ '''
1529+
14801530 # End of hooks ############################################################
14811531
14821532
0 commit comments