Skip to content

Commit

Permalink
Merge pull request #3 from brianjyee/feature/profiles
Browse files Browse the repository at this point in the history
Feature/profiles
  • Loading branch information
tedtieken committed May 18, 2013
2 parents 4caee55 + 01274bd commit 3af6056
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
69 changes: 69 additions & 0 deletions apps/userprofile/templates/userprofile/profile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{% extends "base.html" %}

{% comment %}
Look at base.html and look at what content blocks are available (ctrl+f block). Inherit any you want to override. The main two are {% block canvas %} and {% block content %}. Canvas contains everything in between the navbar and the footer, and content contains the middle column.

Put static files (css, js, and images) into the appropriate folder in apps/theme/static/
I have a simple file in there as an example that I'm using to style this template
{% endcomment %}

{% block meta_title %}
Profile
{% endblock %}

{% block extra_css %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/dummy.css">
{% endblock %}


{% block content %}
<form class="form-horizontal" action='' method="POST">
<fieldset>
<div id="legend">
<legend class="">Edit Profile</legend>
</div>
<div class="control-group">
<!-- Username -->
<label class="control-label" for="username">Name</label>
<div class="controls">
<input type="text" id="username" name="username" placeholder="" class="input-xlarge">
<p class="help-block">Username can contain any letters or numbers, without spaces</p>
</div>
</div>

<div class="control-group">
<!-- E-mail -->
<label class="control-label" for="email">E-mail</label>
<div class="controls">
<input type="text" id="email" name="email" placeholder="" class="input-xlarge">
<p class="help-block">Please provide your E-mail</p>
</div>
</div>

<div class="control-group">
<!-- Password-->
<label class="control-label" for="bio">Bio</label>
<div class="controls">
<textarea rows="3" id="bio" name="bio" placeholder="" class="input-xlarge"></textarea>
<p class="help-block">Please tell us about yourself and your background</p>
</div>
</div>

<div class="control-group">
<!-- Password -->
<label class="control-label" for="skills">Skills</label>
<div class="controls">
<input type="text" id="skills" name="skills" placeholder="" class="input-xlarge">
<p class="help-block">What skills do you know? What skills would you like to learn?</p>
</div>
</div>

<div class="control-group">
<!-- Button -->
<div class="controls">
<button class="btn btn-success">Save</button>
</div>
</div>
</fieldset>
</form>
{% endblock %}
44 changes: 44 additions & 0 deletions apps/userprofile/templates/userprofile/profilelist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% extends "base.html" %}

{% comment %}
Look at base.html and look at what content blocks are available (ctrl+f block). Inherit any you want to override. The main two are {% block canvas %} and {% block content %}. Canvas contains everything in between the navbar and the footer, and content contains the middle column.

Put static files (css, js, and images) into the appropriate folder in apps/theme/static/
I have a simple file in there as an example that I'm using to style this template
{% endcomment %}

{% block meta_title %}
Profile
{% endblock %}

{% block extra_css %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/dummy.css">
{% endblock %}


{% block content %}
<div class="row">
<div class="span5">
<h4><a href="#">Name 1</a></h4>
<p>Bio or headline information for profile</p>
</div>
<div class="span3">skills</div></div>
<hr>

<div class="row">
<div class="span5">
<h4><a href="#">Name 2</a></h4>
<p>Bio or headline information for profile</p>
</div>
<div class="span3">skills</div></div>
<hr>

<div class="row">
<div class="span5">
<h4><a href="#">Name 3</a></h4>
<p>Bio or headline information for profile</p>
</div>
<div class="span3">skills</div>
</div>
<hr>
{% endblock %}
2 changes: 2 additions & 0 deletions urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# to the project's homepage.

urlpatterns = patterns("",
url("^myprofile/$", TemplateView.as_view(template_name="profile.html"), name="myprofile"),
url("^profilelist/$", TemplateView.as_view(template_name="profilelist.html"), name="profilelist"),
# once we compartmentalize the function into apps (profiles, projects, etc...)
# it'll make sense to use include() and store the relevant urls within that app
# Here are four different ways to render a template:
Expand Down

0 comments on commit 3af6056

Please sign in to comment.