Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
1d6543c9
Commit
1d6543c9
authored
Oct 20, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding language to admin interfrace
parent
880c1a1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
admin.py
node/admin.py
+6
-2
models.py
node/models.py
+2
-0
No files found.
node/admin.py
View file @
1d6543c9
from
django.contrib
import
admin
from
django.forms
import
ModelForm
,
ModelChoiceField
from
node.models
import
NodeType
,
Node
,
Project
,
Corpus
,
Document
from
node.models
import
NodeType
,
Language
,
Node
,
Project
,
Corpus
,
Document
class
NodeAdmin
(
admin
.
ModelAdmin
):
exclude
=
(
'user'
,
'type'
,
'path'
,
'depth'
,
'numchild'
)
...
...
@@ -103,8 +102,13 @@ class DocumentAdmin(NodeAdmin):
_nodetype_name
=
'Document'
form
=
DocumentForm
class
LanguageAdmin
(
admin
.
ModelAdmin
):
class
Meta
:
ordering
=
[
'fullname'
,]
admin
.
site
.
register
(
NodeType
)
admin
.
site
.
register
(
Language
,
LanguageAdmin
)
admin
.
site
.
register
(
Project
,
ProjectAdmin
)
admin
.
site
.
register
(
Corpus
,
CorpusAdmin
)
...
...
node/models.py
View file @
1d6543c9
...
...
@@ -22,6 +22,8 @@ class Language(models.Model):
iso2
=
models
.
CharField
(
max_length
=
2
)
iso3
=
models
.
CharField
(
max_length
=
3
)
fullname
=
models
.
CharField
(
max_length
=
255
)
def
__str__
(
self
):
return
self
.
fullname
class
Ngram
(
models
.
Model
):
...
...
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