1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Initial commit

This commit is contained in:
Retspen 2015-02-27 10:53:51 +02:00
commit 4d48e79341
87 changed files with 5637 additions and 0 deletions

0
accounts/__init__.py Normal file
View file

3
accounts/admin.py Normal file
View file

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View file

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('instances', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='UserInstance',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('instance', models.ForeignKey(to='instances.Instance')),
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
],
options={
},
bases=(models.Model,),
),
]

View file

13
accounts/models.py Normal file
View file

@ -0,0 +1,13 @@
from django.db import models
from django.contrib.auth.models import User
from instances.models import Instance
class UserInstance(models.Model):
user = models.ForeignKey(User)
instance = models.ForeignKey(Instance)
is_change = models.BooleanField(default=False)
is_delete = models.BooleanField(default=False)
def __unicode__(self):
return self.instance.name

3
accounts/tests.py Normal file
View file

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

6
accounts/views.py Normal file
View file

@ -0,0 +1,6 @@
from django.shortcuts import render
from django.contrib.auth.models import User
def accounts(request):
return