Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-sshkey
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0f3d40f4
authored
Oct 09, 2014
by
Paul Kilgo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move TextArea widget to ApplicationKey.key field
parent
823afd91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
django_sshkey/forms.py
+8
-6
No files found.
django_sshkey/forms.py
View file @
0f3d40f4
...
@@ -31,7 +31,14 @@ from django_sshkey.models import Key, UserKey
...
@@ -31,7 +31,14 @@ from django_sshkey.models import Key, UserKey
from
django_sshkey.util
import
pubkey_parse
from
django_sshkey.util
import
pubkey_parse
class
ApplicationKeyForm
(
forms
.
ModelForm
):
class
ApplicationKeyForm
(
forms
.
ModelForm
):
key
=
forms
.
CharField
(
max_length
=
2000
,
required
=
True
)
key
=
forms
.
CharField
(
max_length
=
2000
,
required
=
True
,
widget
=
forms
.
Textarea
(
attrs
=
{
'cols'
:
72
,
'rows'
:
15
,
'placeholder'
:
"Paste in the contents of your public key file here"
,
})
)
def
clean
(
self
):
def
clean
(
self
):
cleaned_data
=
self
.
cleaned_data
cleaned_data
=
self
.
cleaned_data
...
@@ -66,11 +73,6 @@ class UserKeyForm(NamedKeyForm):
...
@@ -66,11 +73,6 @@ class UserKeyForm(NamedKeyForm):
fields
=
[
'name'
,
'key'
]
fields
=
[
'name'
,
'key'
]
exclude
=
[
'basekey'
]
exclude
=
[
'basekey'
]
widgets
=
{
widgets
=
{
'key'
:
forms
.
Textarea
(
attrs
=
{
'cols'
:
72
,
'rows'
:
15
,
'placeholder'
:
"Paste in the contents of your public key file here"
,
}),
'name'
:
forms
.
TextInput
(
attrs
=
{
'name'
:
forms
.
TextInput
(
attrs
=
{
'size'
:
50
,
'size'
:
50
,
'placeholder'
:
"username@hostname, or leave blank to use key comment"
,
'placeholder'
:
"username@hostname, or leave blank to use key comment"
,
...
...
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