Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changing the mode of everything lol

Moving to other laptop etc. Also made right bar background lighter
and changed location of database file.
  • Loading branch information...
commit 82c2e50ad06fb4d02121c676e951081697b9fcc7 1 parent f6ee5d4
@dellsystem authored
Showing with 400 additions and 6 deletions.
  1. +2 −0  .gitignore
  2. 0  __init__.py
  3. 0  about/__init__.py
  4. 0  about/models.py
  5. 0  about/tests.py
  6. 0  about/views.py
  7. 0  assets/apple-touch-icon-114x114-precomposed.png
  8. 0  assets/apple-touch-icon-72x72-precomposed.png
  9. 0  assets/apple-touch-icon-precomposed.png
  10. 0  assets/css/adaptive.less
  11. 0  assets/css/bootstrap.less
  12. 0  assets/css/forms.less
  13. 0  assets/css/patterns.less
  14. 0  assets/css/preboot.less
  15. 0  assets/css/prettify.css
  16. 0  assets/css/reset.less
  17. 0  assets/css/scaffolding.less
  18. 0  assets/css/tables.less
  19. 0  assets/css/type.less
  20. +9 −1 assets/css/wikinotes.less
  21. +158 −0 assets/css/wikinotes.less~
  22. 0  assets/favicon.ico
  23. BIN  assets/img/departments/ANAT.png
  24. BIN  assets/img/departments/BIOC.png
  25. BIN  assets/img/departments/BIOL.png
  26. BIN  assets/img/departments/CHEM.png
  27. BIN  assets/img/departments/COMP.png
  28. BIN  assets/img/departments/ECON.png
  29. BIN  assets/img/departments/MATH.png
  30. BIN  assets/img/departments/MIMM.png
  31. BIN  assets/img/departments/NSCI.png
  32. BIN  assets/img/departments/PHGY.png
  33. BIN  assets/img/departments/PHYS.png
  34. BIN  assets/img/departments/POLI.png
  35. 0  assets/img/facebook.png
  36. BIN  assets/img/faculties/science.png
  37. 0  assets/img/grid-18px.png
  38. 0  assets/img/grid.png
  39. 0  assets/img/logo.png
  40. 0  assets/img/twitter.png
  41. 0  assets/js/less.min.js
  42. 0  assets/js/placeholder.min.js
  43. 0  assets/js/prettify.js
  44. 0  blog/__init__.py
  45. 0  blog/models.py
  46. 0  blog/tests.py
  47. 0  blog/views.py
  48. 0  help/__init__.py
  49. 0  help/models.py
  50. 0  help/tests.py
  51. 0  help/views.py
  52. 0  manage.py
  53. +1 −1  settings.py
  54. 0  templates/base.html
  55. 0  templates/courses/all.html
  56. 0  templates/courses/index.html
  57. +43 −0 templates/courses/overview.html
  58. +43 −0 templates/courses/overview.html~
  59. +3 −3 templates/main/index.html
  60. +75 −0 templates/main/index.html~
  61. +1 −0  urls.py
  62. 0  utils.py
  63. 0  views/__init__.py
  64. +8 −1 views/courses.py
  65. 0  views/main.py
  66. 0  wiki/__init__.py
  67. 0  wiki/admin/__init__.py
  68. 0  wiki/admin/courses.py
  69. 0  wiki/admin/departments.py
  70. 0  wiki/admin/faculties.py
  71. 0  wiki/fixtures/courses.yml
  72. 0  wiki/fixtures/departments.yml
  73. 0  wiki/fixtures/faculties.yml
  74. 0  wiki/models/__init__.py
  75. +23 −0 wiki/models/courses.py
  76. +34 −0 wiki/models/courses.py~
  77. 0  wiki/models/departments.py
  78. 0  wiki/models/faculties.py
  79. 0  wiki/tests/__init__.py
View
2  .gitignore 100644 → 100755
@@ -1 +1,3 @@
*.pyc
+db.sqlite
+data
View
0  __init__.py 100644 → 100755
File mode changed
View
0  about/__init__.py 100644 → 100755
File mode changed
View
0  about/models.py 100644 → 100755
File mode changed
View
0  about/tests.py 100644 → 100755
File mode changed
View
0  about/views.py 100644 → 100755
File mode changed
View
0  assets/apple-touch-icon-114x114-precomposed.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/apple-touch-icon-72x72-precomposed.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/apple-touch-icon-precomposed.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/css/adaptive.less 100644 → 100755
File mode changed
View
0  assets/css/bootstrap.less 100644 → 100755
File mode changed
View
0  assets/css/forms.less 100644 → 100755
File mode changed
View
0  assets/css/patterns.less 100644 → 100755
File mode changed
View
0  assets/css/preboot.less 100644 → 100755
File mode changed
View
0  assets/css/prettify.css 100644 → 100755
File mode changed
View
0  assets/css/reset.less 100644 → 100755
File mode changed
View
0  assets/css/scaffolding.less 100644 → 100755
File mode changed
View
0  assets/css/tables.less 100644 → 100755
File mode changed
View
0  assets/css/type.less 100644 → 100755
File mode changed
View
10 assets/css/wikinotes.less 100644 → 100755
@@ -124,7 +124,7 @@ section {
}
#right-bar {
- background-color: @gray;
+ background-color: @grayLighter;
text-align: center;
padding: 10px;
width: 200px;
@@ -148,3 +148,11 @@ section {
ul.toc ul {
padding-left: 25px;
}
+
+.half-column {
+ display: inline;
+ width: 95px;
+ float: left;
+ text-align: center;
+ margin-left: 15px;
+}
View
158 assets/css/wikinotes.less~
@@ -0,0 +1,158 @@
+// So we have all the colours etc
+@import "preboot.less";
+
+/* Sticky footer stuff */
+@footer-height: 80px;
+
+html, body {
+ height: 100%;
+}
+
+#wrap {
+ min-height: 100%;
+ padding-bottom: 40px; // Space between the content and the footer etc
+}
+
+#main {
+ overflow: auto;
+ padding-bottom: @footer-height;
+}
+
+// Opera fix apparently
+body:before {
+ content: "";
+ height: 100%;
+ float: left;
+ width: 0;
+ margin-top: -90000001;
+}
+
+/* Body and structure
+-------------------------------------------------- */
+
+body {
+ background-color: #FFF;
+ position: relative;
+}
+
+section {
+ padding-top: 25px;
+ .row {
+ padding-bottom: 10px;
+ }
+}
+
+#footer {
+ position: relative;
+ margin-top: -@footer-height;
+ height: @footer-height;
+ clear: both;
+ background-color: @blueDark;
+ color: #fff;
+ text-shadow: 0 1px 1px rgba(0,0,0,.3);
+
+ div.inner {
+ padding: 30px 0;
+ background: transparent url(/static/img/grid.png) top center;
+ .box-shadow(inset 0 10px 30px rgba(0, 0, 0, 0.5));
+ }
+
+ a { color: #FFF; font-weight: bold; }
+ p { padding-bottom: 0px; } // otherwise there's whitespace under the footer
+}
+
+#header {
+ background-color: @blue;
+ color: #FFF;
+ padding-top: 40px;
+
+ div.inner {
+ background: transparent url(/static/img/grid.png) top center;
+ padding: 30px 0;
+ .box-shadow(inset 0 10px 30px rgba(0, 0, 0, 0.3));
+ }
+
+ a, label { color: #FFF; font-weight: bold; }
+}
+
+.leading-bar {
+ #gradient > .vertical(#FEFEFE, #F5F5F5);
+ border-top: 1px solid #fff;
+ border-bottom: 1px solid #eee;
+ padding-top: 15px;
+ h6, p {
+ line-height: 18px;
+ text-align: center;
+ padding-bottom: 9px;
+ color: #333;
+ }
+ h6 { color: #888; }
+}
+
+#footer p {
+ color: rgba(255,255,255,.8)
+}
+#footer p.right {
+ float: right;
+}
+
+#search-box {
+ line-height: 18px;
+ width: 120px;
+ position: relative;
+ top: 5px;
+}
+
+.float-right {
+ float: right;
+}
+
+#login-bar {
+ float: right;
+ position: relative;
+ top: 10px;
+}
+
+#stay-logged-in {
+ text-align: left;
+ display: inline-block;
+}
+
+#login-buttons {
+ float: right;
+ display: inline-block;
+}
+
+#right-bar {
+ background-color: @grayLighter;
+ text-align: center;
+ padding: 10px;
+ width: 200px;
+}
+
+.course-icon {
+ width: 100px;
+ display: inline-block;
+}
+
+#right-bar ul {
+ text-align: left;
+}
+
+#right-bar hr {
+ color: @grayLight;
+ background-color: @grayLight;
+ height: 5px;
+}
+
+ul.toc ul {
+ padding-left: 25px;
+}
+
+.half-column {
+ display: inline;
+ width: 100px;
+ float: left;
+ text-align: center;
+ margin-left: 15px;
+}
View
0  assets/favicon.ico 100644 → 100755
File mode changed
View
BIN  assets/img/departments/ANAT.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/BIOC.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/BIOL.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/CHEM.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/COMP.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/ECON.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/MATH.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/MIMM.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/NSCI.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/PHGY.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/PHYS.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/departments/POLI.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/img/facebook.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/img/faculties/science.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/img/grid-18px.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/img/grid.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/img/logo.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/img/twitter.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  assets/js/less.min.js 100644 → 100755
File mode changed
View
0  assets/js/placeholder.min.js 100644 → 100755
File mode changed
View
0  assets/js/prettify.js 100644 → 100755
File mode changed
View
0  blog/__init__.py 100644 → 100755
File mode changed
View
0  blog/models.py 100644 → 100755
File mode changed
View
0  blog/tests.py 100644 → 100755
File mode changed
View
0  blog/views.py 100644 → 100755
File mode changed
View
0  help/__init__.py 100644 → 100755
File mode changed
View
0  help/models.py 100644 → 100755
File mode changed
View
0  help/tests.py 100644 → 100755
File mode changed
View
0  help/views.py 100644 → 100755
File mode changed
View
0  manage.py 100644 → 100755
File mode changed
View
2  settings.py 100644 → 100755
@@ -12,7 +12,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': '/home/waldo/Desktop/wikinotes/db.sqlite', # Or path to database file if using sqlite3.
+ 'NAME': '/home/waldo/Projects/wikinotes/db.sqlite', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
View
0  templates/base.html 100644 → 100755
File mode changed
View
0  templates/courses/all.html 100644 → 100755
File mode changed
View
0  templates/courses/index.html 100644 → 100755
File mode changed
View
43 templates/courses/overview.html
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+
+{% block content %}
+<div class="container">
+ <section>
+ <div class="row">
+ <div class="page-header">
+ <h1>{{ course.department.short_name }} {{ course.number}} <small>{{ course.name }}</small></h1>
+ </div>
+ <div class="span12 columns">
+ <ul class="unstyled">
+ <li><strong>Description:</strong> {{ course.description }}</li>
+ <li><strong>Credits:</strong> {{ course.credits }}</li>
+ <li><strong>Current professor:</strong> Test</li>
+ </ul>
+ </div>
+ <div class="span4 columns" id="right-bar">
+ <div class="row" style="margin-bottom: 0px;">
+ <div class="half-column">
+ <p><a href="{{ course.url }}/create" class="btn info">New page</a></p>
+ <p><strong>Pages:</strong> {{ course.num_pages }}</p>
+ </div>
+ <div class="half-column">
+ <p><a href="{{ course.url }}/watch" class="btn">Watch</a></p>
+ <p><strong>Watchers:</strong> {{ course.num_watchers }}</p>
+ </div>
+ </div>
+ <hr />
+ <div class="row">
+ <div class="half-column">
+ <p>Department: {{ course.department.short_name }}</p>
+ <p><a href="/departments/{{ course.department.short_name }}"><img src="/static/img/departments/{{ course.department.short_name }}.png" alt="{{ course.department.short_name }}" width="80" height="80" title="{{ course.department.long_name }}" /></a></p>
+ </div>
+ <div class="half-column">
+ <p>{{ course.department.faculty }}</p>
+ <p><a href="/faculties/{{ course.department.faculty.slug }}"><img src="/static/img/faculties/{{ course.department.faculty.slug }}.png" alt="{{ course.department.faculty }}" title="{{ course.department.faculty }}" width="80" height="80" /></a></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+</div>
+{% endblock %}
View
43 templates/courses/overview.html~
@@ -0,0 +1,43 @@
+{% extends "base.html" %}
+
+{% block content %}
+<div class="container">
+ <section>
+ <div class="row">
+ <div class="page-header">
+ <h1>{{ course.department.short_name }} {{ course.number}} <small>{{ course.name }}</small></h1>
+ </div>
+ <div class="span12 columns">
+ <ul class="unstyled">
+ <li><strong>Description:</strong> {{ course.description }}</li>
+ <li><strong>Credits:</strong> {{ course.credits }}</li>
+ <li><strong>Current professor:</strong> Test</li>
+ </ul>
+ </div>
+ <div class="span4 columns" id="right-bar">
+ <div class="row" style="margin-bottom: 0px;">
+ <div class="half-column">
+ <p><a href="{{ course.url }}/create" class="btn info">New page</a></p>
+ <p><strong>Pages:</strong> {{ course.num_pages }}</p>
+ </div>
+ <div class="half-column">
+ <p><a href="{{ course.url }}/watch" class="btn">Watch</a></p>
+ <p><strong>Watchers:</strong> {{ course.num_watchers }}</p>
+ </div>
+ </div>
+ <hr />
+ <div class="row">
+ <div class="half-column">
+ <p>Department: {{ course.department.short_name }}</p>
+ <p><a href="/departments/{{ course.department.short_name }}"><img src="/static/img/departments/{{ course.department.short_name }}.png" alt="{{ course.department.short_name }}" width="70" height="70" title="{{ course.department.long_name }}" /></a></p>
+ </div>
+ <div class="half-column">
+ <p>{{ course.department.faculty }}</p>
+ <p><a href="/faculties/{{ course.department.faculty.slug }}"><img src="/static/img/faculties/{{ course.department.faculty.slug }}.png" alt="{{ course.department.faculty }}" title="{{ course.department.faculty }}" width="70" height="70" /></a></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+</div>
+{% endblock %}
View
6 templates/main/index.html 100644 → 100755
@@ -41,9 +41,9 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
- <a href="http://www.twitter.com/#!/wikinotes_ca"><img src="/img/twitter.png" width="24" height="24" alt="Twitter" title="Follow us on Twitter" /></a>
- <a href="http://www.facebook.com/#!/wikinotes.ca"><img src="/img/facebook.png" alt="Facebook" width="24" height="24" /></a>
- <a href="/rss"><img src="/img/rss.png" alt="RSS Feed" width="24" height="24" /></a>
+ <a href="http://www.twitter.com/#!/wikinotes_ca"><img src="/static/img/twitter.png" width="24" height="24" alt="Twitter" title="Follow us on Twitter" /></a>
+ <a href="http://www.facebook.com/#!/wikinotes.ca"><img src="/static/img/facebook.png" alt="Facebook" width="24" height="24" /></a>
+ <a href="/rss"><img src="/static/img/rss.png" alt="RSS Feed" width="24" height="24" /></a>
</p>
</div>
</div><!-- /row -->
View
75 templates/main/index.html~
@@ -0,0 +1,75 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+<div class="leading-bar">
+ <div class="container">
+ <h6>An unofficial open source wiki-based resource for the courses at McGill university.</h6>
+ <p><strong>NEWS:</strong> Wikinotes, an awesome website bent nevertheless on taking over the world, has just acquired ... <a href="/news"><strong>Read more</strong> &raquo;</a></p>
+ </div>
+</div>
+
+<div class="container">
+ <section>
+ <div class="row">
+ <div class="span-one-third column">
+ <h3>Find a course.</h3>
+ <p>Enter a course name in the box in the top right corner, or browse our selection of courses:</p>
+ <ul>
+ <li><a href="/courses/faculty">Browse by faculty</a></li>
+ <li><a href="/courses/department">Browse by department</a></li>
+ <li><a href="/courses/semester">Browse by semester</a></li>
+ <li><a href="/courses/professor">Browse by professor</a></li>
+ <li><a href="/courses/popular">View popular courses</a></li>
+ </ul>
+ </div>
+ <div class="span-one-third column">
+ <h3>Learn and study.</h3>
+ <p>Catch up on lectures you missed with lecture notes or course summaries. Quiz yourself with our course or vocabulary quizzes. Do a past exam and compare your answers to the student-made or official solutions. Read reviews and tips written by other students.</p>
+ </div>
+ <div class="span-one-third column">
+ <h3>Contribute.</h3>
+ <p>Give back to the community by adding lecture notes, editing content or even just spreading the word. If you're interested in contributing or becoming a moderator, please <a href="/register">register</a> and check out our <a href="/contributing">contributor guidelines</a>.</p>
+ <p><!-- Place this tag where you want the +1 button to render -->
+ <g:plusone annotation="none"></g:plusone>
+
+ <!-- Place this render call where appropriate -->
+ <script type="text/javascript">
+ (function() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+ })();
+ </script>
+ <a href="http://www.twitter.com/#!/wikinotes_ca"><img src="/img/twitter.png" width="24" height="24" alt="Twitter" title="Follow us on Twitter" /></a>
+ <a href="http://www.facebook.com/#!/wikinotes.ca"><img src="/img/facebook.png" alt="Facebook" width="24" height="24" /></a>
+ <a href="/rss"><img src="/img/rss.png" alt="RSS Feed" width="24" height="24" /></a>
+ </p>
+ </div>
+ </div><!-- /row -->
+ </section>
+
+ <section>
+ <div class="row">
+ <div class="span-one-third column">
+ <h2>Not sure where to start?</h2>
+ <h4>First, watch our video &raquo;</h4>
+ <p>Then:</p>
+ <ul>
+ <li><a href="/about">Learn about us</a> and what we're doing</li>
+ <li><a href="https://www.github.com/dellsystem/wikinotes">Fork us on github</a> and send us a pull request</li>
+ <li>Join our <a href="http://webchat.freenode.net/?channels=wikinotes">#wikinotes IRC channel</a> on freenode</li>
+ <li>Find a <a href="/random-page">random page</a> and make it better</li>
+ </ul>
+ <p>Found a bug or broken link? Have feature suggestions? Want to sponsor us? Let us know! You can email us at admin this domain, mention us on <a href="http://www.twitter.com/#!/wikinotes_ca">Twitter</a>, or write on the wall of our <a href="http://www.facebook.com/#!/wikinotes.ca">Facebook page</a>.<p>
+ <p>Alternatively, if you have money you want to throw at us, we're not going to say no; see our <a href="/about/donations">donations</a> page to find out how to donate and where the money would go to.</p>
+ </div><!-- /col -->
+ <div class="span-two-thirds column">
+ <div style="width: 100%; height: 370px; background-color: #000000;"></div>
+ </div><!-- /col -->
+ </div><!-- /row -->
+ </section>
+
+</div><!-- /container -->
+
+{% endblock %}
View
1  urls.py 100644 → 100755
@@ -8,6 +8,7 @@
url(r'^$', 'wikinotes.views.main.index'),
url(r'^courses$', 'wikinotes.views.courses.index'),
url(r'^courses/all$', 'wikinotes.views.courses.all'),
+ url(r'^(?P<department>\w{4})_(?P<number>\d{3})$', 'wikinotes.views.courses.overview'),
# url(r'^wikinotes/', include('wikinotes.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
View
0  utils.py
No changes.
View
0  views/__init__.py 100644 → 100755
File mode changed
View
9 views/courses.py 100644 → 100755
@@ -1,4 +1,4 @@
-from django.shortcuts import render_to_response
+from django.shortcuts import render_to_response, get_object_or_404
from wiki.models.courses import Course
def index(request):
@@ -10,3 +10,10 @@ def all(request):
'courses': courses,
}
return render_to_response('courses/all.html', data)
+
+def overview(request, department, number):
+ course = get_object_or_404(Course, department=department, number=int(number))
+ data = {
+ 'course': course,
+ }
+ return render_to_response('courses/overview.html', data)
View
0  views/main.py 100644 → 100755
File mode changed
View
0  wiki/__init__.py 100644 → 100755
File mode changed
View
0  wiki/admin/__init__.py 100644 → 100755
File mode changed
View
0  wiki/admin/courses.py 100644 → 100755
File mode changed
View
0  wiki/admin/departments.py 100644 → 100755
File mode changed
View
0  wiki/admin/faculties.py 100644 → 100755
File mode changed
View
0  wiki/fixtures/courses.yml 100644 → 100755
File mode changed
View
0  wiki/fixtures/departments.yml 100644 → 100755
File mode changed
View
0  wiki/fixtures/faculties.yml 100644 → 100755
File mode changed
View
0  wiki/models/__init__.py 100644 → 100755
File mode changed
View
23 wiki/models/courses.py 100644 → 100755
@@ -15,3 +15,26 @@ def __unicode__(self):
def url(self):
return '/%s_%d' % (self.department.short_name, self.number)
+
+ def num_watchers(self):
+ return 0
+
+ def num_pages(self):
+ return 0
+
+class CourseSemester(models.Model):
+ class Meta:
+ app_label = 'wiki'
+
+ course = models.ForeignKey('Course')
+ grading_scheme = models.CharField(max_length=255)
+ professors = models.ManyToManyField('Professor')
+ schedule = models.CharField(max_length=100)
+ midterm_info = models.CharField(max_length=255)
+ final_info = models.CharField(max_length=255)
+
+class Professor(models.Model):
+ class Meta:
+ app_label = 'wiki'
+
+ name = models.CharField(max_length=100)
View
34 wiki/models/courses.py~
@@ -0,0 +1,34 @@
+from django.db import models
+
+class Course(models.Model):
+ class Meta:
+ app_label = 'wiki'
+
+ department = models.ForeignKey('Department')
+ number = models.IntegerField()
+ name = models.CharField(max_length=255)
+ description = models.CharField(max_length=255) # change this later
+ credits = models.IntegerField()
+
+ def __unicode__(self):
+ return "%s %d (%s)" % (self.department.short_name, self.number, self.name)
+
+ def url(self):
+ return '/%s_%d' % (self.department.short_name, self.number)
+
+ def num_watchers(self):
+ return 0
+
+ def num_pages(self):
+ return 0
+
+class CourseSemester(models.Model):
+ class Meta:
+ app_label = 'wiki'
+
+ course = models.ForeignKey('Course')
+ grading_scheme = models.CharField(max_length=255)
+ professors = models.ManyToManyField('Professor')
+ schedule = models.CharField(max_length=100)
+ midterm_info = models.CharField(max_length=255)
+ final_info = models.CharField(max_length=255)
View
0  wiki/models/departments.py 100644 → 100755
File mode changed
View
0  wiki/models/faculties.py 100644 → 100755
File mode changed
View
0  wiki/tests/__init__.py 100644 → 100755
File mode changed
Please sign in to comment.
Something went wrong with that request. Please try again.