* 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
Next to zero adoption after introduction, just noise in codebase.
I don't see any point in arguing about purity of test cases when
existence and quality of test cases is usually the bigger problem.
Dropped using semgrep
Not all single doctypes are settings, so this is better. Implicit
caching is fine, same is done for `db` APIs on singles. We *should* aim
for 100% correctness of caching implementation, especially for singles.
Thanks to @netchampfaris for the suggestion.
* feat: get_settings
get_cached_value doesn't work well with singles because you either need
to pass `None` or repeat doctype name... both are awekward and easy to
shoot yourself in foot with.
* refactor: Use cached settings
* Check if sync is enabled before refreshing token & shit - reduce
deletion of event times like a 1000x
* Use cached settings to avoid reading the same thing while operating
on Events or Google Calendar syncs
* 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
Certain tables contain A LOT of duplicate data, it makes sense to enable
compressed row format on them by default. I've seen 5-10 fold reduction
in DB size after enabling compressed format on select few tables.
This has some performance overhead:
- both compressed and uncompressed pages live in buffer pool.
- compression/decompression
Note:
- These cons don't apply much on DocTypes I am enabling this for.
- I am not enabling this on existing sites, migration can take a long
time! Do it manually with `transform-database` command if you want to.
* Fix: Add more translation to web form
Fix that there is translation missing in frontend
* Fix missing translation context
* Adding left messages
* Fix typo
* Add even more missing translation
* chore: format
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
---------
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: petnd <58605206+petnd@users.noreply.github.com>
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