Create Django Application Settings Page

ساخت وبلاگ

آخرین مطالب

امکانات وب

Vote count: 0

I have a Django app and am trying to make some specific model information changeable while the site is loaded. For example, I'd like to be able to change certain images on pages (banners and such) based on changes I make on the admin panel of Django. Additionally, I'd like to create a list of prepopulated migrations for my social media links that can be editable in a django admin page. My specific instance of this is for all of my social media links. I'd like to put my social media link in a model 'Facebook Url" = ' I would then like to put these links throughout the page using dot notation {{ project_settings.facebook.url }} for example. What is the easiest way to do this. I don't think I want to put the context in all of the views because I would have to do that for every page I want this to be available. In the case of my footer it is on every page. The background images are also on several different pages.

asked 1 min ago
Kyle Linden

نویسنده : استخدام کار بازدید : 26 تاريخ : دوشنبه 3 ارديبهشت 1397 ساعت: 9:15

تبلیغات در اینترنت