Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
e8ea365c
Commit
e8ea365c
authored
Oct 15, 2014
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moar form styling
parent
22b27cbd
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
11 additions
and
11 deletions
+11
-11
rest_framework/templates/rest_framework/base.html
+2
-2
rest_framework/templates/rest_framework/horizontal/checkbox.html
+0
-0
rest_framework/templates/rest_framework/horizontal/checkbox_multiple.html
+0
-0
rest_framework/templates/rest_framework/horizontal/fieldset.html
+0
-0
rest_framework/templates/rest_framework/horizontal/form.html
+2
-2
rest_framework/templates/rest_framework/horizontal/input.html
+1
-1
rest_framework/templates/rest_framework/horizontal/list_fieldset.html
+0
-0
rest_framework/templates/rest_framework/horizontal/radio.html
+0
-0
rest_framework/templates/rest_framework/horizontal/select.html
+0
-0
rest_framework/templates/rest_framework/horizontal/select_multiple.html
+0
-0
rest_framework/templates/rest_framework/horizontal/textarea.html
+0
-0
rest_framework/templates/rest_framework/inline/checkbox.html
+0
-0
rest_framework/templates/rest_framework/inline/checkbox_multiple.html
+0
-0
rest_framework/templates/rest_framework/inline/fieldset.html
+0
-0
rest_framework/templates/rest_framework/inline/form.html
+2
-2
rest_framework/templates/rest_framework/inline/input.html
+1
-1
rest_framework/templates/rest_framework/inline/radio.html
+0
-0
rest_framework/templates/rest_framework/inline/select.html
+0
-0
rest_framework/templates/rest_framework/inline/select_multiple.html
+0
-0
rest_framework/templates/rest_framework/inline/textarea.html
+0
-0
rest_framework/templates/rest_framework/vertical/checkbox.html
+0
-0
rest_framework/templates/rest_framework/vertical/checkbox_multiple.html
+0
-0
rest_framework/templates/rest_framework/vertical/fieldset.html
+0
-0
rest_framework/templates/rest_framework/vertical/form.html
+2
-2
rest_framework/templates/rest_framework/vertical/input.html
+1
-1
rest_framework/templates/rest_framework/vertical/list_fieldset.html
+0
-0
rest_framework/templates/rest_framework/vertical/radio.html
+0
-0
rest_framework/templates/rest_framework/vertical/select.html
+0
-0
rest_framework/templates/rest_framework/vertical/select_multiple.html
+0
-0
rest_framework/templates/rest_framework/vertical/textarea.html
+0
-0
No files found.
rest_framework/templates/rest_framework/base.html
View file @
e8ea365c
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
<div
class=
"tab-pane"
id=
"object-form"
>
<div
class=
"tab-pane"
id=
"object-form"
>
{% with form=post_form %}
{% with form=post_form %}
<form
action=
"{{ request.get_full_path }}"
<form
action=
"{{ request.get_full_path }}"
method=
"POST"
enctype=
"multipart/form-data"
class=
"form-horizontal"
>
method=
"POST"
enctype=
"multipart/form-data"
class=
"form-horizontal"
novalidate
>
<fieldset>
<fieldset>
{{ post_form }}
{{ post_form }}
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
{% if put_form %}
{% if put_form %}
<div
class=
"tab-pane"
id=
"object-form"
>
<div
class=
"tab-pane"
id=
"object-form"
>
<form
action=
"{{ request.get_full_path }}"
<form
action=
"{{ request.get_full_path }}"
method=
"POST"
enctype=
"multipart/form-data"
class=
"form-horizontal"
>
method=
"POST"
enctype=
"multipart/form-data"
class=
"form-horizontal"
novalidate
>
<fieldset>
<fieldset>
{{ put_form }}
{{ put_form }}
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
...
...
rest_framework/templates/rest_framework/horizontal/
fields/
checkbox.html
→
rest_framework/templates/rest_framework/horizontal/checkbox.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/horizontal/
fields/
checkbox_multiple.html
→
rest_framework/templates/rest_framework/horizontal/checkbox_multiple.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/horizontal/fields
/fields
et.html
→
rest_framework/templates/rest_framework/horizontal/fieldset.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/horizontal/form.html
View file @
e8ea365c
{% load rest_framework %}
{% load rest_framework %}
<form
class=
"form-horizontal"
role=
"form"
action=
"."
method=
"POST"
>
<form
class=
"form-horizontal"
role=
"form"
action=
"."
method=
"POST"
novalidate
>
{% csrf_token %}
{% csrf_token %}
{% for field in form %}
{% for field in form %}
{% if not field.read_only %}
{% if not field.read_only %}
{% render_field field
template_pack=template_pack renderer=renderer
%}
{% render_field field
style=style
%}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
<!-- form.non_field_errors -->
<!-- form.non_field_errors -->
...
...
rest_framework/templates/rest_framework/horizontal/
fields/
input.html
→
rest_framework/templates/rest_framework/horizontal/input.html
View file @
e8ea365c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<label
class=
"col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}"
>
{{ field.label }}
</label>
<label
class=
"col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}"
>
{{ field.label }}
</label>
{% endif %}
{% endif %}
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
<input
name=
"{{ field.name }}"
class=
"form-control"
type=
"{{ style.input_type }}"
novalidate
{%
if
style
.
placeholder
%}
placeholder=
"{{ style.placeholder }}"
{%
endif
%}
{%
if
field
.
value
%}
value=
"{{ field.value }}"
{%
endif
%}
>
<input
name=
"{{ field.name }}"
class=
"form-control"
type=
"{{ style.input_type }}"
{%
if
style
.
placeholder
%}
placeholder=
"{{ style.placeholder }}"
{%
endif
%}
{%
if
field
.
value
%}
value=
"{{ field.value }}"
{%
endif
%}
>
{% if field.errors %}
{% if field.errors %}
{% for error in field.errors %}
<span
class=
"help-block"
>
{{ error }}
</span>
{% endfor %}
{% for error in field.errors %}
<span
class=
"help-block"
>
{{ error }}
</span>
{% endfor %}
{% endif %}
{% endif %}
...
...
rest_framework/templates/rest_framework/horizontal/
fields/
list_fieldset.html
→
rest_framework/templates/rest_framework/horizontal/list_fieldset.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/horizontal/
fields/
radio.html
→
rest_framework/templates/rest_framework/horizontal/radio.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/horizontal/
fields/
select.html
→
rest_framework/templates/rest_framework/horizontal/select.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/horizontal/
fields/
select_multiple.html
→
rest_framework/templates/rest_framework/horizontal/select_multiple.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/horizontal/
fields/
textarea.html
→
rest_framework/templates/rest_framework/horizontal/textarea.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/inline/
fields/
checkbox.html
→
rest_framework/templates/rest_framework/inline/checkbox.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/inline/
fields/
checkbox_multiple.html
→
rest_framework/templates/rest_framework/inline/checkbox_multiple.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/inline/fields
/fields
et.html
→
rest_framework/templates/rest_framework/inline/fieldset.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/inline/form.html
View file @
e8ea365c
{% load rest_framework %}
{% load rest_framework %}
<form
class=
"form-inline"
role=
"form"
action=
"."
method=
"POST"
>
<form
class=
"form-inline"
role=
"form"
action=
"."
method=
"POST"
novalidate
>
{% csrf_token %}
{% csrf_token %}
{% for field in form %}
{% for field in form %}
{% if not field.read_only %}
{% if not field.read_only %}
{% render_field field
template_pack=template_pack renderer=renderer
%}
{% render_field field
style=style
%}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
<!-- form.non_field_errors -->
<!-- form.non_field_errors -->
...
...
rest_framework/templates/rest_framework/inline/
fields/
input.html
→
rest_framework/templates/rest_framework/inline/input.html
View file @
e8ea365c
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
{% if field.label %}
{% if field.label %}
<label
class=
"sr-only"
>
{{ field.label }}
</label>
<label
class=
"sr-only"
>
{{ field.label }}
</label>
{% endif %}
{% endif %}
<input
name=
"{{ field.name }}"
class=
"form-control"
type=
"{{ style.input_type }}"
novalidate
{%
if
style
.
placeholder
%}
placeholder=
"{{ style.placeholder }}"
{%
endif
%}
{%
if
field
.
value
%}
value=
"{{ field.value }}"
{%
endif
%}
>
<input
name=
"{{ field.name }}"
class=
"form-control"
type=
"{{ style.input_type }}"
{%
if
style
.
placeholder
%}
placeholder=
"{{ style.placeholder }}"
{%
endif
%}
{%
if
field
.
value
%}
value=
"{{ field.value }}"
{%
endif
%}
>
</div>
</div>
rest_framework/templates/rest_framework/inline/
fields/
radio.html
→
rest_framework/templates/rest_framework/inline/radio.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/inline/
fields/
select.html
→
rest_framework/templates/rest_framework/inline/select.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/inline/
fields/
select_multiple.html
→
rest_framework/templates/rest_framework/inline/select_multiple.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/inline/
fields/
textarea.html
→
rest_framework/templates/rest_framework/inline/textarea.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/
fields/
checkbox.html
→
rest_framework/templates/rest_framework/vertical/checkbox.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/
fields/
checkbox_multiple.html
→
rest_framework/templates/rest_framework/vertical/checkbox_multiple.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/fields
/fields
et.html
→
rest_framework/templates/rest_framework/vertical/fieldset.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/form.html
View file @
e8ea365c
{% load rest_framework %}
{% load rest_framework %}
<form
role=
"form"
action=
"."
method=
"POST"
>
<form
role=
"form"
action=
"."
method=
"POST"
novalidate
>
{% csrf_token %}
{% csrf_token %}
{% for field in form %}
{% for field in form %}
{% if not field.read_only %}
{% if not field.read_only %}
{% render_field field
template_pack=template_pack renderer=renderer
%}
{% render_field field
style=style
%}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
<!-- form.non_field_errors -->
<!-- form.non_field_errors -->
...
...
rest_framework/templates/rest_framework/vertical/
fields/
input.html
→
rest_framework/templates/rest_framework/vertical/input.html
View file @
e8ea365c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
{% if field.label %}
{% if field.label %}
<label
{%
if
style
.
hide_label
%}
class=
"sr-only"
{%
endif
%}
>
{{ field.label }}
</label>
<label
{%
if
style
.
hide_label
%}
class=
"sr-only"
{%
endif
%}
>
{{ field.label }}
</label>
{% endif %}
{% endif %}
<input
name=
"{{ field.name }}"
class=
"form-control"
type=
"{{ style.input_type }}"
novalidate
{%
if
style
.
placeholder
%}
placeholder=
"{{ style.placeholder }}"
{%
endif
%}
{%
if
field
.
value
%}
value=
"{{ field.value }}"
{%
endif
%}
>
<input
name=
"{{ field.name }}"
class=
"form-control"
type=
"{{ style.input_type }}"
{%
if
style
.
placeholder
%}
placeholder=
"{{ style.placeholder }}"
{%
endif
%}
{%
if
field
.
value
%}
value=
"{{ field.value }}"
{%
endif
%}
>
{% if field.errors %}
{% if field.errors %}
{% for error in field.errors %}
<span
class=
"help-block"
>
{{ error }}
</span>
{% endfor %}
{% for error in field.errors %}
<span
class=
"help-block"
>
{{ error }}
</span>
{% endfor %}
{% endif %}
{% endif %}
...
...
rest_framework/templates/rest_framework/vertical/
fields/
list_fieldset.html
→
rest_framework/templates/rest_framework/vertical/list_fieldset.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/
fields/
radio.html
→
rest_framework/templates/rest_framework/vertical/radio.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/
fields/
select.html
→
rest_framework/templates/rest_framework/vertical/select.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/
fields/
select_multiple.html
→
rest_framework/templates/rest_framework/vertical/select_multiple.html
View file @
e8ea365c
File moved
rest_framework/templates/rest_framework/vertical/
fields/
textarea.html
→
rest_framework/templates/rest_framework/vertical/textarea.html
View file @
e8ea365c
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment