Soumettre la recherche
Mettre en ligne
Django Admin: Widgetry & Witchery
•
Télécharger en tant que KEY, PDF
•
5 j'aime
•
2,281 vues
Pamela Fox
Suivre
Why we chose to use Django admin, and how it worked, and, well, how it didn't work.
Lire moins
Lire la suite
Technologie
Divertissement et humour
Affichage du diaporama
Signaler
Partager
Affichage du diaporama
Signaler
Partager
1 sur 16
Télécharger maintenant
Recommandé
DJango admin interface
DJango admin interface
Mahesh Shitole
Two scoops of django 1.6 - Ch7, Ch8
Two scoops of django 1.6 - Ch7, Ch8
flywindy
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
KyeongMook "Kay" Cha
Django Templates
Django Templates
Willy Liu
Django Bogotá. CBV
Django Bogotá. CBV
ctrl-alt-delete
HOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOO
Celine George
Ch9 .Best Practices for Class-Based Views
Ch9 .Best Practices for Class-Based Views
Willy Liu
Django Vs Rails
Django Vs Rails
Sérgio Santos
Recommandé
DJango admin interface
DJango admin interface
Mahesh Shitole
Two scoops of django 1.6 - Ch7, Ch8
Two scoops of django 1.6 - Ch7, Ch8
flywindy
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
KyeongMook "Kay" Cha
Django Templates
Django Templates
Willy Liu
Django Bogotá. CBV
Django Bogotá. CBV
ctrl-alt-delete
HOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOO
Celine George
Ch9 .Best Practices for Class-Based Views
Ch9 .Best Practices for Class-Based Views
Willy Liu
Django Vs Rails
Django Vs Rails
Sérgio Santos
Modules and injector
Modules and injector
Eyal Vardi
Dependency Management with RequireJS
Dependency Management with RequireJS
Aaronius
Odoo Experience 2018 - Develop an App with the Odoo Framework
Odoo Experience 2018 - Develop an App with the Odoo Framework
ElínAnna Jónasdóttir
JavaScript for Flex Devs
JavaScript for Flex Devs
Aaronius
RequireJS & Handlebars
RequireJS & Handlebars
Ivano Malavolta
Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)
sroo galal
Introduction to backbone presentation
Introduction to backbone presentation
Brian Hogg
Make your App Frontend Compatible
Make your App Frontend Compatible
Odoo
Django design-patterns
Django design-patterns
Agiliq Info Solutions India Pvt Ltd
Xml operations in odoo
Xml operations in odoo
Celine George
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS Framework
ElínAnna Jónasdóttir
Javascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & Tricks
Hjörtur Hilmarsson
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
ElínAnna Jónasdóttir
Angular 2.0 forms
Angular 2.0 forms
Eyal Vardi
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
Jeado Ko
AngularJS vs. Ember.js vs. Backbone.js
AngularJS vs. Ember.js vs. Backbone.js
Mark
Performance Optimization In Angular 2
Performance Optimization In Angular 2
Eyal Vardi
Django class based views for beginners
Django class based views for beginners
Spin Lai
Handlebars.js
Handlebars.js
Ivano Malavolta
A Year of Hermit Hacking
A Year of Hermit Hacking
Pamela Fox
Teaching Programming Online
Teaching Programming Online
Pamela Fox
Contenu connexe
Tendances
Modules and injector
Modules and injector
Eyal Vardi
Dependency Management with RequireJS
Dependency Management with RequireJS
Aaronius
Odoo Experience 2018 - Develop an App with the Odoo Framework
Odoo Experience 2018 - Develop an App with the Odoo Framework
ElínAnna Jónasdóttir
JavaScript for Flex Devs
JavaScript for Flex Devs
Aaronius
RequireJS & Handlebars
RequireJS & Handlebars
Ivano Malavolta
Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)
sroo galal
Introduction to backbone presentation
Introduction to backbone presentation
Brian Hogg
Make your App Frontend Compatible
Make your App Frontend Compatible
Odoo
Django design-patterns
Django design-patterns
Agiliq Info Solutions India Pvt Ltd
Xml operations in odoo
Xml operations in odoo
Celine George
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS Framework
ElínAnna Jónasdóttir
Javascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & Tricks
Hjörtur Hilmarsson
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
ElínAnna Jónasdóttir
Angular 2.0 forms
Angular 2.0 forms
Eyal Vardi
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
Jeado Ko
AngularJS vs. Ember.js vs. Backbone.js
AngularJS vs. Ember.js vs. Backbone.js
Mark
Performance Optimization In Angular 2
Performance Optimization In Angular 2
Eyal Vardi
Django class based views for beginners
Django class based views for beginners
Spin Lai
Handlebars.js
Handlebars.js
Ivano Malavolta
Tendances
(20)
Modules and injector
Modules and injector
Dependency Management with RequireJS
Dependency Management with RequireJS
Odoo Experience 2018 - Develop an App with the Odoo Framework
Odoo Experience 2018 - Develop an App with the Odoo Framework
JavaScript for Flex Devs
JavaScript for Flex Devs
RequireJS & Handlebars
RequireJS & Handlebars
Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)
Introduction to backbone presentation
Introduction to backbone presentation
Make your App Frontend Compatible
Make your App Frontend Compatible
Django design-patterns
Django design-patterns
Xml operations in odoo
Xml operations in odoo
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS Framework
Javascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & Tricks
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Angular 2.0 forms
Angular 2.0 forms
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
AngularJS vs. Ember.js vs. Backbone.js
AngularJS vs. Ember.js vs. Backbone.js
Performance Optimization In Angular 2
Performance Optimization In Angular 2
Django class based views for beginners
Django class based views for beginners
Handlebars.js
Handlebars.js
En vedette
A Year of Hermit Hacking
A Year of Hermit Hacking
Pamela Fox
Teaching Programming Online
Teaching Programming Online
Pamela Fox
Engineering culture
Engineering culture
Pamela Fox
The Developer Experience
The Developer Experience
Pamela Fox
Présentation RIA avec Adobe Flex / RIA with Adobe Flex
Présentation RIA avec Adobe Flex / RIA with Adobe Flex
Cynapsys It Hotspot
OpenSocial Intro
OpenSocial Intro
Pamela Fox
Flex vs. HTML5 for RIAS
Flex vs. HTML5 for RIAS
Pamela Fox
Client Killed the Server Star
Client Killed the Server Star
Pamela Fox
Making JavaScript Libraries More Approachable
Making JavaScript Libraries More Approachable
Pamela Fox
No, Really, I'm Shy
No, Really, I'm Shy
Pamela Fox
En vedette
(10)
A Year of Hermit Hacking
A Year of Hermit Hacking
Teaching Programming Online
Teaching Programming Online
Engineering culture
Engineering culture
The Developer Experience
The Developer Experience
Présentation RIA avec Adobe Flex / RIA with Adobe Flex
Présentation RIA avec Adobe Flex / RIA with Adobe Flex
OpenSocial Intro
OpenSocial Intro
Flex vs. HTML5 for RIAS
Flex vs. HTML5 for RIAS
Client Killed the Server Star
Client Killed the Server Star
Making JavaScript Libraries More Approachable
Making JavaScript Libraries More Approachable
No, Really, I'm Shy
No, Really, I'm Shy
Similaire à Django Admin: Widgetry & Witchery
Clean Javascript
Clean Javascript
Ryunosuke SATO
Lo nuevo de Django 1.7 y 1.8
Lo nuevo de Django 1.7 y 1.8
pedroburonv
Pruebas unitarias con django
Pruebas unitarias con django
Tomás Henríquez
Forms, Getting Your Money's Worth
Forms, Getting Your Money's Worth
Alex Gaynor
Your Entity, Your Code
Your Entity, Your Code
DrupalDay
Your Entity, Your Code
Your Entity, Your Code
Marco Vito Moscaritolo
PyCon KR 2018 Effective Tips for Django ORM in Practice
PyCon KR 2018 Effective Tips for Django ORM in Practice
Seomgi Han
What's new in Django 1.2?
What's new in Django 1.2?
Jacob Kaplan-Moss
Тестирование и Django
Тестирование и Django
MoscowDjango
Django
Django
Mohamed Ramadan
Heroku pop-behind-the-sense
Heroku pop-behind-the-sense
Ben Lin
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)
Python Ireland
Django quickstart
Django quickstart
Marconi Moreto
Python magicmethods
Python magicmethods
dreampuf
Gae Meets Django
Gae Meets Django
fool2nd
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Tsuyoshi Yamamoto
Advanced Python, Part 1
Advanced Python, Part 1
Zaar Hai
Design patterns in javascript
Design patterns in javascript
Miao Siyu
Backbone Basics with Examples
Backbone Basics with Examples
Sergey Bolshchikov
Introduction to Django
Introduction to Django
Joaquim Rocha
Similaire à Django Admin: Widgetry & Witchery
(20)
Clean Javascript
Clean Javascript
Lo nuevo de Django 1.7 y 1.8
Lo nuevo de Django 1.7 y 1.8
Pruebas unitarias con django
Pruebas unitarias con django
Forms, Getting Your Money's Worth
Forms, Getting Your Money's Worth
Your Entity, Your Code
Your Entity, Your Code
Your Entity, Your Code
Your Entity, Your Code
PyCon KR 2018 Effective Tips for Django ORM in Practice
PyCon KR 2018 Effective Tips for Django ORM in Practice
What's new in Django 1.2?
What's new in Django 1.2?
Тестирование и Django
Тестирование и Django
Django
Django
Heroku pop-behind-the-sense
Heroku pop-behind-the-sense
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)
Django quickstart
Django quickstart
Python magicmethods
Python magicmethods
Gae Meets Django
Gae Meets Django
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Advanced Python, Part 1
Advanced Python, Part 1
Design patterns in javascript
Design patterns in javascript
Backbone Basics with Examples
Backbone Basics with Examples
Introduction to Django
Introduction to Django
Plus de Pamela Fox
How I became a born again vegetable-tarian
How I became a born again vegetable-tarian
Pamela Fox
The Developer Experience
The Developer Experience
Pamela Fox
Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way (Brisbane)
Pamela Fox
Writing Apps the Google-y Way
Writing Apps the Google-y Way
Pamela Fox
The Wonders of the "Onesie"
The Wonders of the "Onesie"
Pamela Fox
I’M A Barbie Girl In A CS World
I’M A Barbie Girl In A CS World
Pamela Fox
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
Pamela Fox
Collaborative Mapping with Google Wave
Collaborative Mapping with Google Wave
Pamela Fox
Google Products: Deep Dive on Google Maps
Google Products: Deep Dive on Google Maps
Pamela Fox
Google Products & Google Maps
Google Products & Google Maps
Pamela Fox
Mashups & APIs
Mashups & APIs
Pamela Fox
A World of Words
A World of Words
Pamela Fox
Web APIs & Google APIs
Web APIs & Google APIs
Pamela Fox
Growing up Geek: My Dad, the Computer Scientist
Growing up Geek: My Dad, the Computer Scientist
Pamela Fox
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Pamela Fox
NORAD Santa Tracker: Tips & Tricks
NORAD Santa Tracker: Tips & Tricks
Pamela Fox
Socializing Apps
Socializing Apps
Pamela Fox
Open Maps (Or Close Enough?)
Open Maps (Or Close Enough?)
Pamela Fox
Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)
Pamela Fox
Data-Driven Facial Animation Based on Feature Points
Data-Driven Facial Animation Based on Feature Points
Pamela Fox
Plus de Pamela Fox
(20)
How I became a born again vegetable-tarian
How I became a born again vegetable-tarian
The Developer Experience
The Developer Experience
Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way
Writing Apps the Google-y Way
The Wonders of the "Onesie"
The Wonders of the "Onesie"
I’M A Barbie Girl In A CS World
I’M A Barbie Girl In A CS World
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
Collaborative Mapping with Google Wave
Collaborative Mapping with Google Wave
Google Products: Deep Dive on Google Maps
Google Products: Deep Dive on Google Maps
Google Products & Google Maps
Google Products & Google Maps
Mashups & APIs
Mashups & APIs
A World of Words
A World of Words
Web APIs & Google APIs
Web APIs & Google APIs
Growing up Geek: My Dad, the Computer Scientist
Growing up Geek: My Dad, the Computer Scientist
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
NORAD Santa Tracker: Tips & Tricks
NORAD Santa Tracker: Tips & Tricks
Socializing Apps
Socializing Apps
Open Maps (Or Close Enough?)
Open Maps (Or Close Enough?)
Gadgets Intro (Plus Mapplets)
Gadgets Intro (Plus Mapplets)
Data-Driven Facial Animation Based on Feature Points
Data-Driven Facial Animation Based on Feature Points
Dernier
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
LoriGlavin3
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
BkGupta21
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
Alan Dix
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
LoriGlavin3
Dernier
(20)
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Django Admin: Widgetry & Witchery
1.
Django Admin Widgetry &
Witchery Pamela Fox @pamelafox
2.
Coursera: What we
do
3.
Our Backend
4.
Why We Need
Admin
5.
Why Django Admin? Creates
forms for adding/editing/searching models Restricts fields based on admin roles
6.
How Django Admin
Works from django.contrib import admin from app import admin from app.courses.models import Course from app.courses.forms import CourseAdminForm class CourseAdmin(ModelAdmin): base_model = Course restrict_fields = ['instructors', 'teaching_assistants', ] form = CourseAdminForm fieldsets = [ (None, { 'fields': [ 'name', 'topic', 'active', ] }), ('Dates', { 'fields': [ 'start_date', 'end_date', 'start_date_string', 'duration_string', ] }) ] admin.site.register(Course, CourseAdmin) https://docs.djangoproject.com/en/dev/ref/contrib/admin/
7.
...And a few
words on how it doesn’t work.
8.
☹: The Look
& Feel !=
9.
Solution:
Twitter Bootstrap https://github.com/gkuhn1/django-admin-templates-twitter-bootstrap
10.
☹: The Default
Widgets BooleanField FilePathField RegexField CharField FloatField SlugField ChoiceField ImageField TimeField TypedChoiceField IntegerField URLField DateField IPAddressField ComboField DateTimeField GenericIPAddressField MultiValueField DecimalField MultipleChoiceField SplitDateTimeField EmailField TypedMultipleChoiceField ModelChoiceField FileField NullBooleanField ModelMultipleChoiceField
11.
Solution:
Custom Widgets TransloaditUpload WysiHTMLEditor NumberField NumberRangeField AutoCompleteTextInput UniqueShortName
12.
Custom Widgets
admin/common/widgets.py: class NumberField(HiddenInput): class Media: js = ( settings.ADMIN_MEDIA_PREFIX + 'js/numberfields.js', ) def render(self, name, value, attrs=None): input = super(NumberField, self).render(name, value, attrs=attrs) final_attrs = self.build_attrs(attrs) units = final_attrs.get('units', '') html = u""" <div class="number-field"> %(input)s <input type="number" min="1" class="number-range-field-num input-mini"> <span class="number-range-field-units">%(units)s<span> </div> """ % {'input': input, 'units': units} return mark_safe(html) course/admin.py course/forms.py from app import admin from django.forms import ModelForm from app.courses.models import Course from app.common.widgets import NumberField from app.courses.forms import CourseAdminForm class CourseAdminForm(ModelForm): class CourseAdmin(ModelAdmin): class Meta: base_model = Course widgets = { 'duration_string': NumberField( form = CourseAdminForm attrs={'units': 'weeks'}) }
13.
☹: Default Save
Options !=
14.
Solution:
Horrible Hacks templates/admin/change_form.html var topicPageRegEx = //topics/topic//i; var isTopicPage = topicPageRegEx.exec(window.location.href); if (isTopicPage) { var previewHosts = {'admin': 'site', 'admin.coursera.org': 'www.coursera.org'}; var previewUrl = 'http://' + previewHosts[window.location.host] + '/course/' + $ ('input[name="short_name"]').val(); var $previewUrl = $('<input type="hidden" name="_previewurl">').val(previewUrl); var $previewButton = $('<input type="submit" name="_saveandpreview" value="Save and Preview" class="btn btn-info">'); var $saveButton = $('.form-actions input[name="_save"]') $saveButton.after(' ').after($previewButton) .after(' ').after($previewUrl); } admin/options.py if "_saveandpreview" in request.POST: return HttpResponseRedirect(request.POST['_previewurl'])
15.
In conclusion...
16.
Our Future Admin
Stack? https://github.com/PaulUithol/backbone-tastypie https://github.com/joshbohde/django-backbone-example
Notes de l'éditeur
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Télécharger maintenant