Skip to content

Commit 4e5e9ce

Browse files
committed
Added dashboard to profiles and profiles to dashboard :)
1 parent 94c3139 commit 4e5e9ce

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

templates/dashboard/base_dashboard.html

+10
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
<li class="last {% block dash-nav-import %}{% endblock %}"><a href="{% url projects_import %}">Import</a></li>
1919
</ul>
2020

21+
<ul>
22+
<li class="first last {% block dash-nav-profile %}{% endblock %}">
23+
{% if request.user.get_profile %}
24+
<a href="{% url profiles_profile_edit %}">Edit Profile</a></li>
25+
{% else %}
26+
<a href="{% url profiles_profile_create %}">Create Profile</a></li>
27+
{% endif %}
28+
29+
</ul>
30+
2131
</div>
2232
</div>
2333
<!-- END dashboard bar -->

templates/profiles/base_profile.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% extends "base.html" %}
1+
{% extends "dashboard/base_dashboard.html" %}

urls.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
'core.views.render_header',
3333
name='render_header'
3434
),
35-
url(r'^profiles/edit', 'profiles.views.edit_profile', {'form_class': UserProfileForm}),
35+
url(r'^profiles/create/', 'profiles.views.create_profile',
36+
{'form_class': UserProfileForm},
37+
name='profiles_profile_create'),
38+
url(r'^profiles/edit/', 'profiles.views.edit_profile',
39+
{'form_class': UserProfileForm},
40+
name='profiles_profile_edit'),
3641
url(r'^profiles/', include('profiles.urls')),
3742
)
3843

0 commit comments

Comments
 (0)