PAIREN (Programming Channel)
101 subscribers
324 photos
60 videos
31 files
267 links
SW4gVGhlIE5hbWUgT2YgR29k
به نام خدا

کانال برنامه نویسی پایرن برای تمام دوستداران برنامه نویسی. رونوشت(Copy) کاملاً آزاد است.

آدرس گیت‌هاب:
https://github.com/PAIREN1383

Owner: @V_d_P_h_K
Download Telegram
ابزاری که بدرد یک جنگو کار می‌خوره و در موقع ساخت پروژه‌ی جنگو کمکش می‌کنه.
link: https://github.com/PAIREN1383/Django_Project_Builder
وقتتون رو صرف زدن دستورات تکراری نکنید. به دوستانتون هم معرفی کنید. :)


#GitHub
#Django
#جنگو



@Pairen_Programmers
👍3
کسی راه حلی داره که به صورت خودکار بشه تگ گذاری کرد و استاتیک فایل ها رو به src و href بدیم؟
برای مثال من یک قالب html و css دارم و اینا کار می‌کنند ولی توی جنگو برای اینکه کار کنه باید این src و href یک جور دیگه نوشته بشه تا اون استاتیک فایل ها لود بشن.

اگه بخوام می‌تونم خودم یک اپلیکیشن پایتونی درست کنم که این کار رو انجام بده ولی زمانبر هست.
کسی تا حالا این اپلیکیشن رو ساخته؟
من از VS Code استفاده می‌کنم.
اینجا هم یک لینک Stack Overflow هست که برای محیط پایچرم راه حل داده:
https://stackoverflow.com/questions/51468326/django-replace-html-href-and-src-to-a-static-tag

بروزرسانی: از قسمت ذره‌بین VSCode برید سرچ و ریپلیس انجام بدید.
Solution Link: https://stackoverflow.com/questions/43577528/visual-studio-code-search-and-replace-with-regular-expressions

#جنگو
#پایتون
#Django
#Python


@Pairen_Programmers
یک سایت خوب برای یادگیری مسائل از صفر فرعی و اصلی جنگو.
https://tutorial.djangogirls.org/en/

این سایت اگه کار یک نفر باشه واقعاً آدم زحمتکش و کار درستی بوده. مطالب رو ریز به ریز توضیح داده.

#جنگو
#پایتون
#Django
#Python



@Pairen_Programmers
👍1
Django: Template namespacing

Now we might be able to get away with putting our templates directly in polls/templates (rather than creating another polls subdirectory), but it would actually be a bad idea. Django will choose the first template it finds whose name matches, and if you had a template with the same name in a different application, Django would be unable to distinguish between them. We need to be able to point Django at the right one, and the best way to ensure this is by namespacing them. That is, by putting those templates inside another directory named for the application itself.


Link: https://docs.djangoproject.com/en/5.1/intro/tutorial03/#write-views-that-actually-do-something

#Python
#Django


@Pairen_Programmers
👍1