forked from hydroshare/django_irods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
25 lines (22 loc) · 902 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from django.db import models as m
from django.contrib.auth.models import User
class RodsEnvironment(m.Model):
owner = m.ForeignKey(User)
host = m.CharField(verbose_name='Hostname', max_length=255)
port = m.IntegerField()
def_res = m.CharField(verbose_name="Default resource", max_length=255)
home_coll = m.CharField(verbose_name="Home collection", max_length=255)
cwd = m.TextField(verbose_name="Working directory")
username = m.CharField(max_length=255)
zone = m.TextField()
auth = m.TextField(verbose_name='Password')
def __unicode__(self):
return u'{username}@{host}:{port}//{def_res}/{home_coll}'.format(
username = self.username,
host = self.host,
port = self.port,
def_res = self.def_res,
home_coll = self.home_coll
)
class Meta:
verbose_name = 'iRODS Environment'