Permalink
Browse files

admin added

  • Loading branch information...
1 parent 4c16b4a commit 1b04db13bcec718ade10912c5a73f4da76d287b7 @schimmel committed Mar 1, 2012
View
@@ -1 +1,3 @@
*.log
+*.pyc
+*.db
View
Binary file not shown.
@@ -0,0 +1,28 @@
+from gcontacts.models import sync_user,contact
+from django.contrib import admin
+
+class contactAdmin(admin.ModelAdmin):
+ fieldsets = [
+ ('Name',
+ {'fields':
+ ['prname','firstname','addname','lastname','suname']
+ }
+ ),
+ ('Kontaktdaten',
+ {'fields':
+ ['email','phone','bday','website'],
+ 'classes':
+ ['collapse']
+ }
+ ),
+ ('Adresse',
+ {'fields':
+ ['street','pob','zip','city','state','country'],
+ 'classes':
+ ['collapse']
+ }
+ ),
+ ]
+
+admin.site.register(sync_user)
+admin.site.register(contact,contactAdmin)
@@ -27,7 +27,7 @@ class contact(models.Model):
state = models.CharField(u'Bundesland',max_length=255, null=True)
country = models.CharField(u'Land',max_length=255, null=True)
bday = models.DateField(u'Geburtstag', null=True)
- website = models.DateField(u'Website',max_length=255, null=True)
+ website = models.CharField(u'Website',max_length=255, null=True)
def __unicode__(self):
return self.firstname + "" + self.lastname
View
@@ -1,4 +1,6 @@
# Django settings for GManager project.
+import os
+from os.path import join,abspath,dirname
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -102,10 +104,14 @@
ROOT_URLCONF = 'GManager.urls'
+TEMPDIRNAME = os.path.abspath(".") + "/templates"
+
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ TEMPDIRNAME
+ #"/home/tobias/workspace/gmailapi/GManager/templates"
)
INSTALLED_APPS = (
@@ -115,11 +121,11 @@
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
- 'gcontacts'
+ 'gcontacts',
# Uncomment the next line to enable the admin:
- # 'django.contrib.admin',
+ 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
- 'django.contrib.admindocs',
+ # 'django.contrib.admindocs',
)
# A sample logging configuration. The only tangible logging
@@ -0,0 +1,10 @@
+{% extends "admin/base.html" %}
+{% load i18n %}
+
+{% block title %}{{ title }} | {% trans 'GManager site admin' %}{% endblock %}
+
+{% block branding %}
+<h1 id="site-name">{% trans 'GManager administration' %}</h1>
+{% endblock %}
+
+{% block nav-global %}{% endblock %}
View
@@ -1,8 +1,8 @@
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
+from django.contrib import admin
+admin.autodiscover()
urlpatterns = patterns('',
# Examples:
View
@@ -1,2 +1,2 @@
gdata==2.0.16
-Django==1.2.3
+Django==1.3.1

0 comments on commit 1b04db1

Please sign in to comment.