Django Template System in Hindi

Python Django
Loading...

Django Template System In Hindi – Django In Hindi – Is Post Me Django Template System Ko Cover Karne Wale Hai Or Django Template System Kiya Hoti Hai Ye Bhi Dekhne Wale Hai Or Is Template System Ka Kiya Istemal Hota Hai |

Previous – Django – URL Mapping

Django Template System in Hindi

Hamne Previous Post Me Django Template Ke Bare Me Thora sa Bataya Tha, Lekin Ek Post Me Ham Django Template System Ke Bare Me Pura Cover Karne Wale Hai, Kyu Ham Django Template System Ko Istemal karte Hai, To Chaliye Start Karte Hai, Is Post Ko..

Jab Bhi Ham template Ke Under File Rakhte Hai To, Hame myproject/settings.py Me Jkar Batana Padta Hai, Ki Hamne Template Ko Istemal Kiya Hai, To Batane Ke Liye Aap Niche Diye Example Ko Dekh Sakte Hai.

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': ['templates'],   # type templates in this list
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

Aap Upper Dekh Sakte Hai, Ki Hamne DIRS:[‘templates’] Ko Likha Hai, Yaha Par Jab Ham templates Likhte Hai, To Django Ko Ye Pata Chal Jata Hai, Isme Ab Templates Ka Istemal Hone Wala Hai.

Ise Ham Isilye Istemal karte Hai, Taki templates Ke Under Ham Koi Apps Ke Under FIle Ko Sahi Tarike Se Manage Kar Sakte Hai, Ye Ek Best Tarika Hai HTML File Ko Manage Karne Ka, Jo Ki Django Provide Karta Hai |

Agar Aap Templates Ka Istemal kar Rahe Or Aapke myproject/settings.py Me Nhi Bataya Ki Aapne Templates Use Ki hai, To Aapko Run Karte Time Hi, Error Aa Jayega, Isliye Agar Templates Ka Istemal Kar Rahe Hai To Aap Jarur Bataye |

Templates Ka Matlab, Waise Templates Ek Folder Ka Naam Hota Hai, Jo Us Templates Folder Ke Under Apps Name Folder Ka Sath HTML FIle Ho Sakit Ya Fir templates Folder Under Direct HTML File Ho Sakti Hai, Iska Simple Sa Matlab Yehi Hai, Iske Under Files Hone Wali Hai |

Ye Sab Karne Ke Bad Aap Niche Diye Cmd Line Ko Likhar Enter Press Karna Hai |

$ python manage.py runserver

Isko Run Karne Ke Bad Aap Django Ka Server Istemal Kar Sakte Hai, Django Khud Ka Server Provide Karta Hai |

Output:

Ye Output, Hamne Previous Post Me Bhi Dekhta, Joki Hamne Name Ko Views Se Pass Kiya Tha, Agar Aapne Pahle Ki Post Ko Nhi Dekha Hai, To Aap Pahle Previous Post Ko Follow Kare Nhi To Aapko Kuch Bhi Samanjh Nhi Aayega |

Click Here – Django Tutorial

Friends Mujhe Umeed Hai, Ki Aapko Django Templates Ke Bare Me Acchi Jankari Ho Gayi Hogi, Agar Aapko Hamara Kaam Accha Lag Raha hai, To Aap Ye Website Dusro Ke Sath Bhi Share Kar Sakte Hai |

Leave a Reply

Your email address will not be published.