##// END OF EJS Templates
- Primera implementacion del Login del proyecto. (Funcionalidad no completada)
jsalyrosas -
r198:199
parent child
Show More
@@ -0,0 +1,28
1 {% extends "base.html" %}
2 {% load url from future %}
3
4 {% block content %}
5
6 {% if form.errors %}
7 <p>Your username and password didn't match. Please try again.</p>
8 {% endif %}
9
10 <form method="post" action="{% url 'django.contrib.auth.views.login' %}">
11 {% csrf_token %}
12 <table>
13 <tr>
14 <td>{{ form.username.label_tag }}</td>
15 <td>{{ form.username }}</td>
16 </tr>
17 <tr>
18 <td>{{ form.password.label_tag }}</td>
19 <td>{{ form.password }}</td>
20 </tr>
21 </table>
22
23 <input type="submit" value="login" />
24 <input type="hidden" name="next" value="{{ next }}" />
25 </form>
26
27 {% endblock %}
28
@@ -1,24 +1,26
1 from django.conf.urls import patterns, include, url
1 from django.conf.urls import patterns, include, url
2 from django.conf import settings
2 from django.conf import settings
3
3
4 # Uncomment the next two lines to enable the admin:
4 # Uncomment the next two lines to enable the admin:
5 from django.contrib import admin
5 from django.contrib import admin
6 admin.autodiscover()
6 admin.autodiscover()
7
7
8 urlpatterns = patterns('',
8 urlpatterns = patterns('',
9 # Examples:
9 # Examples:
10 # url(r'^$', 'abs_webapp_dev.views.home', name='home'),
10 # url(r'^$', 'abs_webapp_dev.views.home', name='home'),
11 # url(r'^abs_webapp_dev/', include('abs_webapp_dev.foo.urls')),
11 # url(r'^abs_webapp_dev/', include('abs_webapp_dev.foo.urls')),
12
12
13 # Uncomment the admin/doc line below to enable admin documentation:
13 # Uncomment the admin/doc line below to enable admin documentation:
14 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
14 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
15
15
16 # Uncomment the next line to enable the admin:
16 # Uncomment the next line to enable the admin:
17 url(r'^admin/', include(admin.site.urls)),
17 url(r'^admin/', include(admin.site.urls)),
18 url(r'^abscontrol/', include('abscontrol.urls')),
18 url(r'^abscontrol/', include('abscontrol.urls')),
19 url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
20
19 )
21 )
20
22
21 if settings.DEBUG:
23 if settings.DEBUG:
22 urlpatterns = patterns('',
24 urlpatterns = patterns('',
23 url(r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
25 url(r'^media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
24 ) + urlpatterns No newline at end of file
26 ) + urlpatterns
@@ -1,64 +1,63
1 {% extends "base.html" %}
1 {% extends "base.html" %}
2
2
3 {% block title %}ABS CONTROL:::::{% endblock %}
3 {% block title %}ABS CONTROL:::::{% endblock %}
4 {% block scripting %}
4 {% block scripting %}
5 {% if profile_list %}
5 {% if profile_list %}
6 <script src="/static/static/js/profiles.js"></script>
6 <script src="/static/static/js/profiles.js"></script>
7 {% endif %}
7 {% endif %}
8 {% endblock %}
8 {% endblock %}
9 {% block content %}
9 {% block content %}
10 <div id="content">
10 <div id="content">
11 {% block topcolumn %}
11 {% block topcolumn %}
12 <div id="topcolumn">
12 <div id="topcolumn">
13 <div id="lsProfiles">
13 <div id="lsProfiles">
14 <div id="infoProfiles">
14 <div id="infoProfiles">
15 <label for="lblProfile" class="lblInfo">Profiles: </label>
15 <label for="lblProfile" class="lblInfo">Profiles: </label>
16 {% if profile_list %}
16 {% if profile_list %}
17 <select name="lsProfiles" id="listProfiles">
17 <select name="lsProfiles" id="listProfiles">
18 <option value="-1">Choose ...</option>
18 <option value="-1">Choose ...</option>
19 {% for entry in profile_list %}
19 {% for entry in profile_list %}
20 {% if objProfile %}
20 {% if objProfile %}
21 {% if objProfile.id == entry.id %}
21 {% if objProfile.id == entry.id %}
22 <option value="{{ entry.id }}" selected>{{ entry.name }}</option>
22 <option value="{{ entry.id }}" selected>{{ entry.name }}</option>
23 {% else %}
23 {% else %}
24 <option value="{{ entry.id }}">{{ entry.name }}</option>
24 <option value="{{ entry.id }}">{{ entry.name }}</option>
25 {% endif %}
25 {% endif %}
26 {% else %}
26 {% else %}
27 <option value="{{ entry.id }}">{{ entry.name }}</option>
27 <option value="{{ entry.id }}">{{ entry.name }}</option>
28 {% endif %}
28 {% endif %}
29 {% endfor %}
29 {% endfor %}
30 </select>
30 </select>
31 {% else %}
31 {% else %}
32 <label for="lblMessage" class="lblInfo">No profiles.</label>
32 <label for="lblMessage" class="lblInfo">No profiles.</label>
33 {% endif %}
33 {% endif %}
34 </div>
34 </div>
35 </div>
35 </div>
36 {% block mnu_profile %}
36 {% block mnu_profile %}
37 <div id="mnuProfiles">
37 <div id="mnuProfiles">
38 <nav class="MnuHorizontal" id="navProfiles">
38 <nav class="MnuHorizontal" id="navProfiles">
39 <ul>
39 <ul>
40 <li><a href="/abscontrol/new">New</a></li>
40 <li><a href="{% url abscontrol.views.new %}">New</a></li>
41 {% if objProfile %}
41 {% if objProfile %}
42 <li><a href="/abscontrol/edit/{{ objProfile.id }}">Edit</a></li>
42 <li><a href="/abscontrol/edit/{{ objProfile.id }}">Edit</a></li>
43 <li><a href="#">Save</a></li>
43 <li><a href="#">Save</a></li>
44 {% endif %}
44 {% endif %}
45 <li><a href="#">Save as</a></li>
45 <li><a href="{% url abscontrol.views.importProfile %}">Import</a></li>
46 <li><a href="/abscontrol/import">Import</a></li>
47 {% if objProfile %}
46 {% if objProfile %}
48 <li><a href="#" id="lnkExport" alt="{{ objProfile.id }}">Export</a></li>
47 <li><a href="#" id="lnkExport" alt="{{ objProfile.id }}">Export</a></li>
49 <li><a href="#" id="lnkSendFile" alt="{{ objProfile.id }}">Send</a></li>
48 <li><a href="#" id="lnkSendFile" alt="{{ objProfile.id }}">Send</a></li>
50 {% endif %}
49 {% endif %}
51 </ul>
50 </ul>
52 <div class="cleardivs"></div>
51 <div class="cleardivs"></div>
53 </nav>
52 </nav>
54 </div>
53 </div>
55 {% endblock %}
54 {% endblock %}
56 <div class="cleardivs"></div>
55 <div class="cleardivs"></div>
57 </div>
56 </div>
58 {% endblock %}
57 {% endblock %}
59 {% block maincolumn %}
58 {% block maincolumn %}
60 <div id="maincolumn" style="height: 50px"></div>
59 <div id="maincolumn" style="height: 50px"></div>
61 {% endblock %}
60 {% endblock %}
62 <div class="cleardivs"></div>
61 <div class="cleardivs"></div>
63 </div>
62 </div>
64 {% endblock %} No newline at end of file
63 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now