- Change your schema and templates and so forth to have
package_create
andpackage_update
store your domain field. - In your IDomainObjectNotification, you'll get an object called entity which is a package model from ckan/model/package.py
- You can find the groups for this package using get_groups()
- You can add the package to a group by calling add_package_by_name on the group object.
- If you find the domain property isn't available in package.extras.get('domain') then you may need to use notify_after_commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import event | |
@event.listens_for(Issue, 'after_insert') | |
def receive_after_insert(mapper, connection, target): | |
# Do something with target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "Running" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "192.168.33.33" | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] | |
vb.gui = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This issue is being closed as it is more than 12 months old. If you are | |
still experiencing this problem and wish to help investigate further, | |
please feel free to re-open it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
directions = { :N => lambda {y_coord++}, :S => lambda {y_coord--} } | |
directions[:N].call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_function | |
puts "Ross is very cool" | |
end | |
my_map = { :ross => method(:my_function) } | |
my_map[:ross].call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env elixir | |
defmodule Helper do | |
def title_case(str) do | |
{first, rest} = String.split_at(str, 1) | |
first <> String.downcase(rest) | |
end | |
end | |
defmodule XmlNode do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paster packagezip init -c $CKAN_INI | |
Traceback (most recent call last): | |
File "/home/co/ckan/bin/paster", line 9, in <module> | |
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')() | |
File "/home/co/ckan/local/lib/python2.7/site-packages/paste/script/command.py", line 103, in run | |
command = commands[command_name].load() | |
File "/home/co/ckan/local/lib/python2.7/site-packages/pkg_resources.py", line 2108, in load | |
entry = __import__(self.module_name, globals(),globals(), ['__name__']) | |
File "/vagrant/src/ckanext-packagezip/ckanext/packagezip/commands.py", line 10, in <module> | |
from ckan.lib.celery_app import celery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pylons | |
pylons.session['ckanext-persona-user'] = 'new-user-name' |