Commit graph

40 commits

Author SHA1 Message Date
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache (#21282) 2023-06-08 11:47:17 +05:30
Ankush Menat
392a506a76 perf: Cache published web forms 2023-06-04 15:13:39 +05:30
Ankush Menat
c94c0591c3 perf: cache dynamic web pages 2023-06-04 15:13:39 +05:30
Ankush Menat
7c7c11b454 perf: Cache web view routes
Each call to evaluate if route is web view makes N queries where N = #
of web view doctypes. This entire computation can be definitely cached
for short duration.

- Added cache bursting in WebsiteGenerator doctype updates.
- Added 60 minutes TTL in case cache invalidation wasn't done reliably.
2023-06-04 15:13:39 +05:30
Ankush Menat
eb8da5fd59
fix!: Correct resolution order for template page (#20927)
Current resolution is confusing mess:

1. Evaluation is done in order of installed app, first install wins
2. Except frappe, frappe is treated as lowest priority.

Following same principle of "last write wins" everywhere similar to
previous PRs:

- https://github.com/frappe/frappe/pull/17869
- https://github.com/frappe/frappe/pull/20648
- https://github.com/frappe/frappe/pull/19653

Closes https://github.com/frappe/frappe/issues/20377
2023-05-07 13:19:23 +05:30
gavin
cd524135c0
fix: TemplatePage.can_render (#20257)
Don't render python executable/loadable files from TemplatePage
renderer. This restricts access to reading/downloading possibly
private Python source code from Frappe applications
2023-03-06 12:40:15 +05:30
mergify[bot]
3a130abfc5
fix: extension extracted if at least one dot, because if not dot (#19946) (#20142)
(cherry picked from commit 53c41e0ce6bf9985786a570c43fd32c79332c44c)

Co-authored-by: Jaime <developmentforpeople@gmail.com>
2023-02-23 15:03:11 +05:30
Shariq Ansari
abc5b51e57 fix: after login if redirect is used getting blank screen 2023-01-05 20:39:35 +05:30
PeterG
4ec7d2dbba
feat(minor): redirect after login from NotPermittedPage (#18946)
* redirect after login from NotPermittedPage
2022-11-21 14:56:18 +05:30
Ankush Menat
cc72dc47ab
fix: Show error page even when routing fails (#18437) 2022-10-17 19:52:37 +05:30
Ankush Menat
786df3fbeb perf: ~33% faster Desk response
- hardcode `/app` resolution
- use cached website settings everywhere. It was mixing cache and DB
  everywhere and re-quering same thing (why ?)
2022-08-21 17:35:07 +05:30
Shariq Ansari
a50e0ffa08
refactor: Webform (#17232) 2022-07-19 15:52:15 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Suraj Shetty
1431cb26d3 fix: Catch any expection and show proper error page
- Also, show title & message if it is defined in the exception class
2022-06-01 08:08:52 +05:30
Suraj Shetty
d23b293e1e fix(webform): Only show published web forms 2022-05-09 19:22:13 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Gavin D'souza
9dbaf252f0 fix: Check if binary file in Page Renderers
* Check if binary before rendering using StaticPage resolver
* Check if not binary before rendering using TemplatePage resolver
2022-01-19 19:30:45 +05:30
Faris Ansari
2c3b179197 fix: ability to disable safe_render for template pages 2021-08-03 11:57:42 +05:30
Gavin D'souza
c85ff679ef fix(NotFoundPage): Set default value for http_status_code 2021-07-16 12:02:13 +05:30
Suraj Shetty
508f47e871 fix: Minified js load 2021-07-03 14:13:02 +05:30
Suraj Shetty
02e735da8e fix: Do not set base template for resource 2021-07-01 22:06:26 +05:30
Suraj Shetty
e8d41c945c refactor: Use build_response in WebPage class 2021-06-24 18:01:09 +05:30
Suraj Shetty
57e41230b8 fix: Set source after updating context 2021-06-24 17:52:18 +05:30
Suraj Shetty
9e8aadf2f9 fix: Move context building to get_html 2021-06-24 15:19:48 +05:30
Suraj Shetty
2e21d1cb66 fix: Replace deprecated method 2021-06-24 12:01:49 +05:30
Suraj Shetty
2584b77cf1 fix: Do not cache csrf token 2021-06-24 10:24:47 +05:30
Suraj Shetty
0aabe737a3 fix: Cache document page as well 2021-06-24 10:24:20 +05:30
Suraj Shetty
9293807ef3 fix: Restore ability use get_context without params
- https://github.com/frappe/frappe/pull/12609

The feature got removed during the website routing
refactor https://github.com/frappe/frappe/pull/12334
2021-06-24 10:02:30 +05:30
Suraj Shetty
59be3afc2d fix: Only replace hyphen in file name 2021-06-17 15:30:27 +05:30
Suraj Shetty
1e926b55ce fix: Rename WebPage to BaseRenderer 2021-06-15 14:01:56 +05:30
Suraj Shetty
0387b8f027 fix: WebForm render 2021-06-04 14:25:48 +05:30
Suraj Shetty
63a42f54b2 fix: Deprecation warning 2021-05-31 14:55:23 +05:30
Suraj Shetty
369adf5a3a fix: Set default value as empty string 2021-05-27 14:44:47 +05:30
Suraj Shetty
c8749bcc72 fix: get_index_path_options method 2021-05-27 14:27:30 +05:30
Suraj Shetty
d13eac6f50 fix: Breadcrumbs for a page 2021-05-27 12:56:38 +05:30
Suraj Shetty
33a97196e1 fix: Init page properties in webpage 2021-05-26 11:51:34 +05:30
Suraj Shetty
e19c18e5a9 refactor: Move context value setting code to a separate function 2021-05-26 11:03:33 +05:30
Suraj Shetty
646612be09 fix: Colocated asset load 2021-05-26 10:40:16 +05:30
Suraj Shetty
86897c1808 refactor: Remove render.py and move all utility functions to utils.py
- Replace or remove all render imports
2021-05-25 10:53:35 +05:30
Suraj Shetty
8317e00712 refactor: Rename page_controllers folder to page_renderers 2021-05-25 09:27:26 +05:30