Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
36 django_kippo/admin.py
@@ -0,0 +1,36 @@
+# coding: utf-8
+
+from django.contrib import admin
+
+from django_kippo.models import Auth, Clients, Input, Sensors, Sessions, Ttylog
+
+
+class AuthAdmin(admin.ModelAdmin):
+ pass
+admin.site.register(Auth, AuthAdmin)
+
+
+class ClientsAdmin(admin.ModelAdmin):
+ pass
+admin.site.register(Clients, ClientsAdmin)
+
+
+class InputAdmin(admin.ModelAdmin):
+ pass
+admin.site.register(Input, InputAdmin)
+
+
+class SensorsAdmin(admin.ModelAdmin):
+ pass
+admin.site.register(Sensors, SensorsAdmin)
+
+
+class SessionsAdmin(admin.ModelAdmin):
+ pass
+admin.site.register(Sessions, SessionsAdmin)
+
+
+class TtylogAdmin(admin.ModelAdmin):
+ pass
+admin.site.register(Ttylog, TtylogAdmin)
+
View
61 django_kippo/models.py
@@ -0,0 +1,61 @@
+# This is an auto-generated Django model module.
+# You'll have to do the following manually to clean this up:
+# * Rearrange models' order
+# * Make sure each model has one field with primary_key=True
+# Feel free to rename the models, but don't rename db_table values or field names.
+#
+# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]'
+# into your database.
+
+from django.db import models
+
+class Auth(models.Model):
+ id = models.IntegerField(primary_key=True)
+ session = models.CharField(max_length=96)
+ success = models.IntegerField()
+ username = models.CharField(max_length=300)
+ password = models.CharField(max_length=300)
+ timestamp = models.DateTimeField()
+ class Meta:
+ db_table = u'auth'
+
+class Clients(models.Model):
+ id = models.IntegerField(primary_key=True)
+ version = models.CharField(max_length=150)
+ class Meta:
+ db_table = u'clients'
+
+class Input(models.Model):
+ id = models.IntegerField(primary_key=True)
+ session = models.CharField(max_length=96)
+ timestamp = models.DateTimeField()
+ realm = models.CharField(max_length=150, blank=True)
+ success = models.IntegerField(null=True, blank=True)
+ input = models.TextField()
+ class Meta:
+ db_table = u'input'
+
+class Sensors(models.Model):
+ id = models.IntegerField(primary_key=True)
+ ip = models.CharField(max_length=45)
+ class Meta:
+ db_table = u'sensors'
+
+class Sessions(models.Model):
+ id = models.CharField(max_length=96, primary_key=True)
+ starttime = models.DateTimeField()
+ endtime = models.DateTimeField(null=True, blank=True)
+ sensor = models.IntegerField()
+ ip = models.CharField(max_length=45)
+ termsize = models.CharField(max_length=21, blank=True)
+ client = models.IntegerField(null=True, blank=True)
+ class Meta:
+ db_table = u'sessions'
+
+class Ttylog(models.Model):
+ id = models.IntegerField(primary_key=True)
+ session = models.CharField(max_length=96)
+ ttylog = models.TextField()
+ class Meta:
+ db_table = u'ttylog'
+
View
46 django_kippo_test_project/README.creole
@@ -0,0 +1,46 @@
+= django-kippo test project =
+
+Just a minimal test project for **django-kippo**
+
+
+=== 1. setup
+
+Create a "local_settings.py" in /django_kippo_test_project/ and add the
+MySQL Database settings like:
+{{{
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.mysql',
+ 'HOST': '192.168.1.1', # MySQL Server Address: https://docs.djangoproject.com/en/1.4/ref/settings/#host
+ 'NAME': 'kippo', # MySQL database name
+ 'USER': 'kippo', # MySQL user
+ 'PASSWORD': 'foobar', # MySQL user password
+ }
+}
+}}}
+See also: https://docs.djangoproject.com/en/1.4/ref/settings/#databases
+
+
+=== 2. init database
+
+{{{
+django_kippo_test_project$ ./manage.py syncdb
+}}}
+
+
+=== 3. run dev. testserver
+
+{{{
+./manage.py runserver --traceback --insecure
+}}}
+
+Or make is public in your net:
+{{{
+./manage.py runserver 0.0.0.0:8000 --traceback --insecure
+}}}
+
+
+== Links
+
+* https://github.com/jedie/django-kippo
+* http://pypi.python.org/pypi/django-kippo/
View
6 django_kippo_test_project/init_db.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -x
+
+./manage.py syncdb --noinput
+./manage.py createsuperuser --username=test --email=test@example.tld
View
2 django_kippo_test_project/runserver.sh
@@ -0,0 +1,2 @@
+set -x
+./manage.py runserver 0.0.0.0:8000 --traceback --insecure

No commit comments for this range

Something went wrong with that request. Please try again.