Telegram Group & Telegram Channel
یه نکته در مورد include در urls.py

عکس رو ببینید. من برای path ها namespace تعریف کردم.

✔️متد include میگه اگه namespace تعریف کنی، باید برای app ت هم app_name تعریف کنی.

وگرنه خطای زیر رو میده:

 Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.


برای حل این مشکل
(مثلا فرض کن میخوای name برای path یی داشته باشی که توی urls.py اصلی پروژه اس)

اینجوری باید path رو اوکی کنی:

path("felan-url/", include(("felan_app", "felan_name"))),


دقت کن. یه tuple برای include فرستادم.

اینجوری دیگه توی تمپلت می تونم با app_name ع felan_name به اسم path های اون اپ دسترسی داشته باشم (به شرطی که name داشته باشن).

پیچیده گفتم؟ برو کد include رو بخون، متوجه منظورم میشی.



tg-me.com/djangolearn_ir/992
Create:
Last Update:

یه نکته در مورد include در urls.py

عکس رو ببینید. من برای path ها namespace تعریف کردم.

✔️متد include میگه اگه namespace تعریف کنی، باید برای app ت هم app_name تعریف کنی.

وگرنه خطای زیر رو میده:

 Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.


برای حل این مشکل
(مثلا فرض کن میخوای name برای path یی داشته باشی که توی urls.py اصلی پروژه اس)

اینجوری باید path رو اوکی کنی:

path("felan-url/", include(("felan_app", "felan_name"))),


دقت کن. یه tuple برای include فرستادم.

اینجوری دیگه توی تمپلت می تونم با app_name ع felan_name به اسم path های اون اپ دسترسی داشته باشم (به شرطی که name داشته باشن).

پیچیده گفتم؟ برو کد include رو بخون، متوجه منظورم میشی.

BY جنگولرن




Share with your friend now:
tg-me.com/djangolearn_ir/992

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

How to Invest in Bitcoin?

Like a stock, you can buy and hold Bitcoin as an investment. You can even now do so in special retirement accounts called Bitcoin IRAs. No matter where you choose to hold your Bitcoin, people’s philosophies on how to invest it vary: Some buy and hold long term, some buy and aim to sell after a price rally, and others bet on its price decreasing. Bitcoin’s price over time has experienced big price swings, going as low as $5,165 and as high as $28,990 in 2020 alone. “I think in some places, people might be using Bitcoin to pay for things, but the truth is that it’s an asset that looks like it’s going to be increasing in value relatively quickly for some time,” Marquez says. “So why would you sell something that’s going to be worth so much more next year than it is today? The majority of people that hold it are long-term investors.”

What is Telegram Possible Future Strategies?

Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.

telegram from it


Telegram جنگولرن
FROM USA