Merge branch 'feature/useradmin' into develop
This commit is contained in:
@@ -18,10 +18,48 @@ class RowerInline(admin.StackedInline):
|
|||||||
verbose_name_plural = 'rower'
|
verbose_name_plural = 'rower'
|
||||||
filter_horizontal = ('team','friends')
|
filter_horizontal = ('team','friends')
|
||||||
|
|
||||||
|
fieldsets = (
|
||||||
|
('Rower Plan',
|
||||||
|
{'fields':('rowerplan','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}),
|
||||||
|
('Rower Settings',
|
||||||
|
{'fields':
|
||||||
|
('gdproptin','gdproptindate','weightcategory','sex','birthdate','getemailnotifications',
|
||||||
|
'getimportantemails','emailbounced','defaultlandingpage',
|
||||||
|
'defaulttimezone','showfavoritechartnotes')}),
|
||||||
|
('Rower Zones',
|
||||||
|
{'fields':
|
||||||
|
('ftp','otwslack','pw_ut2','pw_ut1','pw_at','pw_tr','pw_an','max',
|
||||||
|
'rest','ut2','ut1','at','tr','an','hrftp',)}),
|
||||||
|
('Import/Export Keys',
|
||||||
|
{'fields':('c2token','tokenexpirydate','c2refreshtoken','c2_auto_export',
|
||||||
|
'sporttrackstoken','sporttrackstokenexpirydate','sporttracksrefreshtoken',
|
||||||
|
'sporttracks_auto_export',
|
||||||
|
'underarmourtoken','underarmourtokenexpirydate','underarmourrefreshtoken',
|
||||||
|
'mapmyfitness_auto_export',
|
||||||
|
'tptoken','tptokenexpirydate','tprefreshtoken',
|
||||||
|
'trainingpeaks_auto_export',
|
||||||
|
'polartoken','polartokenexpirydate','polarrefreshtoken','polaruserid',
|
||||||
|
'polar_auto_import',
|
||||||
|
'stravatoken','stravaexportas','strava_auto_export',
|
||||||
|
'runkeepertoken','runkeeper_auto_export',)}),
|
||||||
|
('Team',
|
||||||
|
{'fields':('friends','privacy','team')}),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#class UserAdmin(UserAdmin):
|
#class UserAdmin(UserAdmin):
|
||||||
class UserAdmin(admin.ModelAdmin):
|
class UserAdmin(admin.ModelAdmin):
|
||||||
inlines = (RowerInline,)
|
inlines = (RowerInline,)
|
||||||
list_display = ('username','email','first_name','last_name','rowerplan')
|
list_display = ('username','email','first_name','last_name','rowerplan')
|
||||||
|
|
||||||
|
fieldsets = (
|
||||||
|
('Personal info',
|
||||||
|
{'fields':
|
||||||
|
('first_name', 'last_name', 'email', 'date_joined', 'last_login',)}),
|
||||||
|
('Permissions',
|
||||||
|
{'fields':
|
||||||
|
('is_active', 'is_staff', 'is_superuser', 'groups', 'user_permissions',)}),)
|
||||||
|
|
||||||
search_fields = ["username","first_name","last_name","email"]
|
search_fields = ["username","first_name","last_name","email"]
|
||||||
|
|
||||||
def rowerplan(self, obj):
|
def rowerplan(self, obj):
|
||||||
|
|||||||
18
rowers/templates/registration/password_reset.html
Normal file
18
rowers/templates/registration/password_reset.html
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Forgot your password?</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Forgot your password?</h1>
|
||||||
|
<form method="post">{% csrf_token %}
|
||||||
|
<div>
|
||||||
|
{{ form.email.errors }}
|
||||||
|
<label for="id_email">{% trans 'Email address:' %}</label>
|
||||||
|
{{ form.email }}
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="{% trans 'Reset my password' %}" />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -34,11 +34,13 @@ handler500 = 'rowers.views.error500_view'
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^admin/jsi18n', 'django.views.i18n.javascript_catalog'),
|
url(r'^admin/jsi18n', 'django.views.i18n.javascript_catalog'),
|
||||||
|
url('^', include('django.contrib.auth.urls')),
|
||||||
url(r'^django-rq/',include('django_rq.urls')),
|
url(r'^django-rq/',include('django_rq.urls')),
|
||||||
url(r'^password_change_done/$',auth_views.password_change_done,name='password_change_done'),
|
url(r'^password_change_done/$',auth_views.password_change_done,name='password_change_done'),
|
||||||
url(r'^password_change/$',auth_views.password_change),
|
url(r'^password_change/$',auth_views.password_change),
|
||||||
url(r'^password_reset/$',
|
url(r'^password_reset/$',
|
||||||
auth_views.password_reset,
|
auth_views.password_reset,
|
||||||
|
{'template_name': 'rowers/templates/registration/password_reset.html'},
|
||||||
name='password_reset'),
|
name='password_reset'),
|
||||||
url(r'^password_reset/done/$',
|
url(r'^password_reset/done/$',
|
||||||
auth_views.password_reset_done,
|
auth_views.password_reset_done,
|
||||||
@@ -58,12 +60,6 @@ urlpatterns += [
|
|||||||
url(r'^$',rootview),
|
url(r'^$',rootview),
|
||||||
url(r'^login/',auth_views.login, name='login'),
|
url(r'^login/',auth_views.login, name='login'),
|
||||||
url(r'^logout/',auth_views.logout_then_login,name='logout'),
|
url(r'^logout/',auth_views.logout_then_login,name='logout'),
|
||||||
# url(r'^password_reset/$',auth_views.password_reset,name='password_reset'),
|
|
||||||
# url(r'^password_reset_done/$',auth_views.password_reset_done,name='password_reset_done'),
|
|
||||||
# url(r'^password_reset_confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', auth_views.password_reset_confirm,name='password_reset_confirm'),
|
|
||||||
# url(r'^password_reset_confirm/$',auth_views.password_reset_confirm,name='password_reset_confirm'),
|
|
||||||
# url(r'^password_reset_complete/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', auth_views.password_reset_complete,name='password_reset_complete'),
|
|
||||||
# url(r'^password_reset_complete/$',auth_views.password_reset_complete,name='password_reset_complete'),
|
|
||||||
url(r'^rowers/',include('rowers.urls')),
|
url(r'^rowers/',include('rowers.urls')),
|
||||||
url(r'^cvkbrno/',include('cvkbrno.urls')),
|
url(r'^cvkbrno/',include('cvkbrno.urls')),
|
||||||
url(r'^admin/rq/',include('django_rq_dashboard.urls')),
|
url(r'^admin/rq/',include('django_rq_dashboard.urls')),
|
||||||
|
|||||||
Reference in New Issue
Block a user