Exemplo n.º 1
0
def process_picture(post, picture_name, picture):
    from frappe.templates.generators.website_group import clear_cache

    post.picture_url = save_file(picture_name,
                                 picture,
                                 "Post",
                                 post.name,
                                 decode=True).file_url
    frappe.db.set_value("Post", post.name, "picture_url", post.picture_url)
    clear_cache(website_group=post.website_group)
Exemplo n.º 2
0
	def on_update(self):
		from frappe.templates.website_group.post import clear_post_cache
		from frappe.templates.generators.website_group import clear_cache

		clear_cache(website_group=self.website_group)
		clear_post_cache(self.parent_post or self.name)

		if self.assigned_to and self.assigned_to != self.assigned_to \
			and frappe.session.user != self.assigned_to:

			# send assignment email
			sendmail(recipients=[self.assigned_to],
				subject="You have been assigned this Task by {}".format(get_fullname(self.modified_by)),
				msg=self.get_reply_email_message(self.name, get_fullname(self.owner)))
Exemplo n.º 3
0
def process_picture(post, picture_name, picture):
	from frappe.templates.generators.website_group import clear_cache

	post.picture_url = save_file(picture_name, picture, "Post", post.name, decode=True).file_url
	frappe.db.set_value("Post", post.name, "picture_url", post.picture_url)
	clear_cache(website_group=post.website_group)
Exemplo n.º 4
0
 def after_insert(self):
     clear_cache(path=self.parent_website_route)
Exemplo n.º 5
0
 def on_update(self):
     WebsiteGenerator.on_update(self)
     clear_cache(website_group=self.name)
Exemplo n.º 6
0
	def after_insert(self):
		clear_cache(path=self.parent_website_route)
Exemplo n.º 7
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		clear_cache(website_group=self.name)