~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlprofile/admin.py

  • Committer: franku
  • Author(s): GunChleoc
  • Date: 2016-12-13 18:30:38 UTC
  • mfrom: (438.1.6 pyformat_util)
  • Revision ID: somal@arcor.de-20161213183038-5cgmvfh2fkgmoc1s
adding a script to run pyformat over the code base

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
from django.contrib import admin
14
14
from models import Profile
15
15
 
 
16
 
16
17
class ProfileAdmin(admin.ModelAdmin):
17
18
    list_display = ['user', 'time_zone', 'location']
18
19
    list_per_page = 20
20
21
    search_fields = ['user__username', 'user__first_name', 'user__last_name']
21
22
    fieldsets = (
22
23
        (None, {
23
 
                'fields': ('user', 'time_zone', 'location')
24
 
                }
25
 
         ),
 
24
            'fields': ('user', 'time_zone', 'location')
 
25
        }
 
26
        ),
26
27
        (_('IM'), {
27
 
                'classes': ('collapse',),
28
 
                'fields' : ('jabber', 'icq', 'msn', 'aim', 'yahoo')
29
 
                }
30
 
         ),
 
28
            'classes': ('collapse',),
 
29
            'fields': ('jabber', 'icq', 'msn', 'aim', 'yahoo')
 
30
        }
 
31
        ),
31
32
        (_('Additional options'), {
32
 
                'classes': ('collapse',),
33
 
                'fields' : ('site', 'avatar', 'signature', 'show_signatures')
34
 
                }
35
 
         ),
36
 
        )
 
33
            'classes': ('collapse',),
 
34
            'fields': ('site', 'avatar', 'signature', 'show_signatures')
 
35
        }
 
36
        ),
 
37
    )
37
38
 
38
39
admin.site.register(Profile, ProfileAdmin)
39