Commit graph

164 commits

Author SHA1 Message Date
sokumon
767099268a fix: consider default workspace after login 2026-04-20 01:29:22 +05:30
sokumon
0ea047a776 fix: reroute portal users correctly 2025-12-19 20:34:28 +05:30
sokumon
46f6c7481f feat: introduce /portal 2025-12-15 10:55:33 +05:30
sokumon
1dece29b80 fix: reroute system user to desktop page 2025-12-14 20:25:47 +05:30
sokumon
581d5891c5 fix: change encoding to add support for more characters 2025-12-08 11:29:16 +05:30
Sagar Vora
b3e1eda4c8
feat: global frappe.in_test flag (#32960)
* feat: global `frappe.in_test` flag

* feat: helper utility to toggle `frappe.in_test`

* fix: use `toggle_test_mode` util

* fix: use `frappe.in_test`

* chore: add comment explaining global `in_test`

* chore: ignore commit replacing flag usage

* test: temporarily disable `frappe.in_test`

this worked earlier because flag was set in werkzeug.local which was separate for API test client

* test: add comment explaining change
2025-06-17 19:19:31 +05:30
Sagar Vora
cb0d06455b chore: use frappe._dev_server instead of local.dev_server 2025-06-17 12:03:08 +05:30
Sagar Vora
4729b9dbb2
Merge pull request #32213 from sagarvora/remove-clear-sitemap
chore: remove method that does nothing
2025-04-19 20:32:11 +05:30
Sagar Vora
b4e0914afe chore: remove method that does nothing 2025-04-19 20:22:02 +05:30
Sagar Vora
e08efc8a64 perf: use cached user and compile regex 2025-04-18 17:41:42 +05:30
Suhail
666f8da3dc
fix: return 1 or 0 instead of boolean for is_fc_site boot data (#31753) 2025-03-17 06:23:29 +00:00
Rucha Mahabal
85bcc372e7 fix: skip preloading bundled assets if http_status_code is 404
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2025-03-15 15:27:03 +05:30
Suhail
5886234b53
refactor: sign up flow changes (#31205)
* fix: logout to site login page if the site is on Frappe Cloud

* fix: check if the site user is logged in before rendering trial banner

* fix: show dropdown even if the site is not on trial plan

* refactor: don't expose communication secret in boot

* feat: show install app button for fc sites

* fix: remove auth from desk

we can simplify it and let user do auth in fc

* fix: install app button condition

* refactor: use `is_fc_site` method

* fix: return boolean value for `is_fc_site` function

* fix: add install app button in /apps page

* fix: don't generate otp for login to fc

* fix: remove install app option from desk

* fix: design changes for trial banner

* fix: add more details to the `current_site_info` endpoint

also don't render trial banner if trial end date is passed

* fix: don't route user to welcome page

always put them on the site's dashboard

* fix: override base_url when needed

also remove misleading class

* fix: show banner to normal user to contact system admin for plan upgrade

* refactor: redirect from /login instead of every /logout code

* fix: rename login to fc to manage billing

also move it above the divider

* refactor: separate out site-login url from login.py
2025-03-03 16:36:15 +00:00
Ankush Menat
2062a48ef8
fix: Respect no-cache header (#30921)
Browsers send this when user does ctrl+shift+r
2025-01-29 04:24:57 +00:00
Ankush Menat
23694b6b3b
fix: Don't cache pages with query params (#30881)
This was always broken apparantly. Cache key only contains the path so
querystring is being ignored. If request has query params then we
shouldn't cache it.

WIP - better solution for caching based on cache headers. Anyway this
caching isn't THAT helpful since #29170
2025-01-27 06:22:43 +00:00
Ankush Menat
32054b0757 refactor: use response_headers to set cache control headers 2025-01-24 18:35:26 +05:30
Ankush Menat
cdffd5d047
refactor: use flat cache for web pages (#29220)
Web pages are not a hash.

This way we can also set expiry for each key. Setting default expiry of
30 minutes.
2025-01-17 12:02:50 +00:00
Ankush Menat
9bd6c95b3f perf: don't yaml-parse empty string and get nothing back
*surprise*
2025-01-14 18:52:50 +05:30
Ankush Menat
d6f47e8060 perf: use cached user for fetching time zone 2025-01-14 14:15:06 +05:30
Corentin Forler
50020cffda
fix(web): Ensure that header values are strings (#28760) 2024-12-12 19:32:12 +05:30
Akhil Narang
a63cd10387
fix: set currency system setting in webform frappe.boot.sysdefaults
Otherwise this resulted in the fallback `USD` showing for some currency fields in webforms

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-11 17:59:13 +05:30
Raffael Meyer
b91cacdd18
feat!: enhance Language to become more of a Locale (#27178) 2024-09-21 16:02:58 +02:00
David Arnold
1214763b25
Merge pull request #26737 from blaggacao/feat/cache-control
feat: add cache control
2024-09-11 23:32:57 +02:00
Shariq Ansari
2973739f2e fix: show Apps if multiple app or show CRM if only CRM is installed in dropdown 2024-08-30 15:42:58 +05:30
Shariq Ansari
9133f2a9c5 fix: added apps data in boot 2024-08-30 15:42:58 +05:30
David
1619cc0e58
feat: add cache control 2024-08-30 09:08:42 +02:00
David
e2517d11e8
chore: add include_icons jinja global 2024-06-11 20:03:15 +02:00
Akhil Narang
aa38d9e2f4
refactor: pipeline wherever possible, optimize calls
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-19 14:28:35 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Suraj Shetty
2bf82e80ba fix: Make sure sitemap respects robot_txt 2024-02-05 15:41:05 +05:30
Hussain Nagaria
8d2137c265 docs: consistent doc strings 2023-12-18 18:27:39 +05:30
Ankush Menat
15384f88e0 chore: dead code/comment 2023-11-29 22:11:37 +05:30
Ankush Menat
957293bd54 fix: Only preload icons for desk 2023-11-29 21:50:18 +05:30
Corentin Flr
b079d3ef78
fix(web): Send first_day_of_the_week and number_format in bootinfo 2023-11-17 16:14:37 +01:00
David Arnold
18f34c36f6
fix(float): input formatting 2023-11-07 18:07:06 +01:00
Ankush Menat
e1f2f4bb54 fix: Let social login key control signups
There are cases where certain social login keys

- Should not allow signups at all and only allow logins. E.g. social media login keys.
- Should allow signups even if global sign ups are disabled. e.g. internal SSO like setups.
2023-10-14 12:43:48 +05:30
Ankush Menat
4122eba784 fix: Add crossorigin for preload
If crossorigin isn't specified browsers don't seem to use it.
2023-09-23 17:34:48 +05:30
Ankush Menat
428d78a491 chore: move svg icons to end and correct version 2023-09-23 15:17:05 +05:30
Ankush Menat
d7a9d0111c
perf: lazy load SVG icons (#22517)
| Metric                             | Before | After | Change    |
| ---                                | ---    | ---   | ---       |
| app.html first response size       | 421kb  | 106kb | -75% (!)  |
| First response duration            | 60ms   | 40ms  | -33%      |

huge thanks to @cogk for doing most of the work for this PR on this issue: https://github.com/frappe/frappe/issues/17449#issuecomment-1728328726

Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
2023-09-23 15:13:43 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
barredterra
b553ed98d8 refactor: inline immediately returned variable
Inline a variable to a return in the case when the
variable being declared is immediately returned
2023-08-08 18:09:49 +02:00
barredterra
588bbd9d1c fix: include languages when clearing website cache 2023-07-18 12:53:57 +02:00
Ankush Menat
e4ec6e65ee fix: socketio namespace on website 2023-07-01 12:43:53 +05:30
Ankush Menat
3005e66e45 refactor!: Drop previously deprecated code 2023-06-13 16:00:43 +05:30
Ankush Menat
8485ac5d62 build(deps): bump many dependencies
test: change code to adapt to new werkzeug client

fix: avoid setting charset

utf8 is default and assumed now by werkzeug, setting this manually is
deprecated.

fix: use string instead of bytes for setting headers

DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0.
12:23:34 web.1         |   response.headers["X-Page-Name"] = path.encode("ascii", errors="xmlcharrefreplace")
2023-06-10 20:47:27 +05:30
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
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
barredterra
b2e36634d6 refactor: rename get_time_zone to get_system_timezone 2023-03-04 19:30:03 +01:00
Shariq Ansari
0736f8a01b fix: load all boot data on website 2022-10-07 23:28:36 +05:30