Mən adətən bu styleguide istifadə edirəm: https://github.com/HackSoftware/Django-Styleguide. Business logic service layer’a ayırıram, ve complex ORM querry’lari "selector" olaraq istifadə edirəm (məsələn, favorite_product_items__by_user(...) -> Queryset[ProductItem]) və "onion" arxitekturasına riayət edirəm.
Читать полностью…Performans cehetden cox hessas proyekt uzerinde isleyenler ve "local-first software" implement etmek isteyenler varsa WASM sayesinde ister Sqlite ister Duckdb kimi proyektleri browser daxilinde istifade ede bilerler.
https://duckdb.org/2021/10/29/duckdb-wasm.html
Notion WASM Sqlite istifade edir.
https://www.notion.so/blog/how-we-sped-up-notion-in-the-browser-with-wasm-sqlite
Indi qurulan platformadan sora bashqa platformalarda ola biler deye single sign on implement edilmelidiki istifadeki bir yerden login olsun ancaq, digerlerinde automatically login olur
Читать полностью…Fastapi ucun hazir session, crud ve diqer funksiyalar
https://github.com/dmontagu/fastapi-utils
Problem olasi deil, saadece context manager terefe bax (with session_factory(…) as session …)
Читать полностью…@celery_app.task
def test1():
db: Session = session_factory()
try:
#some code
finally:
db.close()
test2.apply_async()
Salam millət! Belə bir sual(məsləhət ehtiyacı) var:
Bir vveb app qurmaq fikrim var, back django, front isə reactda olacaq çoxgüman. Həcmcə böyük bir şey olacaq - həm back, həm də front cəhətdən. Hələki özüm etməyə çalışacam, daha sonra(vəsait yığılanda :)) xərc edib normallaşdıracam. Hələki indi necə bir arxitektura qurum ? Daha sonra refactoringi daha rahat olsun?
Salam. Django applicationunda jwt ile custom authentication hazirdir ve front end ile integrasiya edilmishdir. Amma optional olaraq single sign on implement edilmelidir. Bu barede komeklik gosterseniz shad olardim
Читать полностью…Bura baxin
https://stackoverflow.com/questions/69798923/sequential-celery-task-execution
Ve belkede Airflow (https://airflow.apache.org) terefe baxarsan, overkill omasa senin use case ucun
Читать полностью…celery_app.conf.beat_schedule = {
'test1': {
'task': 'tasks.test1',
'schedule': crontab(hour='*/25'), # Runs daily at midnight
},
}
celery_app.conf.beat_schedule = {
'test2': {
'task': 'test2',
'schedule': crontab(hour='*/26'), # Runs daily at midnight
},
}
salam celeryde ele elemek olurmuki tasklar ardicil olsun meselen birinci test1 taski islesin bitennen sonram test2 taski islesin bir birinnen bele deyim asli olsun?