Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tutorial added

  • Loading branch information...
commit bab5a2ac62b3a9c4481aad1bcb054f73a853c833 1 parent 8a264d9
@zalun zalun authored
View
5 flightdeck/api/templates/api.html
@@ -6,13 +6,10 @@
{% endblock %}
{% block app_sidebar %}
- <h2 class="UI_Heading"><a title="Tutorial" href="/tutorial/">Tutorial</a></h2>
+ <h2 class="UI_Heading"><a title="Tutorial" href="{% url tutorial %}">Tutorial</a></h2>
<h2 class="UI_Heading"><a title="{{ package_name}}" href="{% url api_package package_name %}">
{% if package.name == 'jetpack-core' %}Core Library{% else %}{{ package.name }}{% endif %}
</a></h2>
{% include "_modules_list.html" %}
{% endblock %}
-
-{% block app_domready %}
-{% endblock %}
View
6 flightdeck/base/templates/base.html
@@ -34,7 +34,7 @@
jp_addon_create_url: '{% url jp_addon_create %}',
jp_library_create_url: '{% url jp_library_create %}',
create_modal_template: '{% escape_template "_create.html" %}',
- user: '{{ user.username }}', // was request.user - TODO: check
+ user: '{{ user.username }}',
DEBUG: {{ settings.DEBUG|yesno:"true,false" }}
};
window.addEvent('domready', function() {
@@ -57,14 +57,14 @@
<header id="app-header">
{% block header %}{% include "_header.html" %}{% endblock %}
- </header> <!-- /main-header -->
+ </header> <!-- /app-header -->
{% block app_menu %}{% comment %}
<div id="editor-menu-wrapper">
<ul class="UI_Editor_Menu minimal">
{% include "_base_app_menu_items.html" %}
</ul>
- </div>
+ </div><!-- /editor-menu-wrapper -->
{% endcomment %}{% endblock %}
<div id="app-body">
View
13 flightdeck/base/templates/homepage.html
@@ -6,15 +6,12 @@
<link rel="stylesheet" href="/media/jetpack/css/UI.Landing_Page.css" type="text/css" media="screen" />
<script src="/media/jetpack/js/FlightDeck.Browser.js"></script>
<!-- <script src="http://github.com/oskarkrawczyk/nuTabs/raw/master/Source/nuTabs.js"></script> -->
- <script type="text/javascript" charset="utf-8">
- window.addEvents({
- domready: function(){
- // new nuTabs($$('#features-wrapper .UI_Tabs a'), $$('#features-wrapper .UI_Cont li'));
- }
- });
- </script>
{% endblock %}
+<script type="text/javascript" charset="utf-8">{% block app_domready %}
+ // new nuTabs($$('#features-wrapper .UI_Tabs a'), $$('#features-wrapper .UI_Cont li'));
+{% endblock %}</script>
+
{% block app_menu %}{% endblock %}
{% block app_sidebar %}{% endblock %}
@@ -39,7 +36,7 @@
inspiration. And take advantage of <a href="{% url jp_browser_libraries %}">third-party libraries</a>
with additional APIs.</p>
- <p>Need more Help? <a href="">read the tutorial</a> for a
+ <p>Need more Help? <a href="{% url tutorial %}">read the tutorial</a> for a
step-by-step guide to building an add-on using this site.
<p>Happy hacking!</p>
View
1  flightdeck/settings.py
@@ -125,6 +125,7 @@
'amo', # addons.mozilla.org integration (authentication state updates)
'jetpack', # Jetpack functionality
'api', # API browser
+ 'tutorial', # Load tutorial templates
])
# devserver is optional
View
0  flightdeck/tutorial/__init__.py
No changes.
View
3  flightdeck/tutorial/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
View
12 flightdeck/tutorial/templates/tutorial.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block head %}
+ <link href="/media/api/css/API.Browser.css" rel="stylesheet" type="text/css" />
+{% endblock %}
+
+{% block app_content %}
+ <h2 class="UI_Heading">Woohoo</h3>
+{% endblock %}
+
+
+{% block app_sidebar %}{% endblock %}
View
23 flightdeck/tutorial/tests.py
@@ -0,0 +1,23 @@
+"""
+This file demonstrates two different styles of tests (one doctest and one
+unittest). These will both pass when you run "manage.py test".
+
+Replace these with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.failUnlessEqual(1 + 1, 2)
+
+__test__ = {"doctest": """
+Another way to test that 1 + 1 is equal to 2.
+
+>>> 1 + 1 == 2
+True
+"""}
+
View
5 flightdeck/tutorial/urls.py
@@ -0,0 +1,5 @@
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('tutorial.views',
+ url(r'^$', 'tutorial', name='tutorial'),
+)
View
5 flightdeck/tutorial/views.py
@@ -0,0 +1,5 @@
+# Create your views here.
+from django.shortcuts import render_to_response, get_object_or_404
+
+def tutorial(r):
+ return render_to_response('tutorial.html')
View
3  flightdeck/urls.py
@@ -30,6 +30,9 @@
# API Browser
(r'^api/', include('api.urls')),
+ # Tutorial
+ (r'^tutorial/', include('tutorial.urls')),
+
# Jetpack
(r'^user/', include('person.urls')),
(r'', include('jetpack.urls'))
View
7 scripts/admin.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+source scripts/environment.sh
+
+# run server
+cd $PROJECT_DIR/$PROJECT_NAME/
+django-admin.py $@
View
36 tools/jetpack.vim
@@ -8,12 +8,12 @@ if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
endif
set shortmess=aoO
badd +1 /private/tmp/------------Jetpack
-badd +275 ~/Projects/FlightDeck/flightdeck/jetpack/views.py
+badd +8 ~/Projects/FlightDeck/flightdeck/jetpack/views.py
badd +800 ~/Projects/FlightDeck/flightdeck/jetpack/models.py
badd +1 ~/Projects/FlightDeck/flightdeck/jetpack/tests/module_tests.py
badd +7 ~/Projects/FlightDeck/flightdeck/jetpack/managers.py
badd +1 ~/Projects/FlightDeck/flightdeck/jetpack/admin.py
-badd +96 ~/Projects/FlightDeck/flightdeck/jetpack/urls.py
+badd +128 ~/Projects/FlightDeck/flightdeck/jetpack/urls.py
badd +16 ~/Projects/FlightDeck/flightdeck/jetpack/errors.py
badd +21 ~/Projects/FlightDeck/flightdeck/jetpack/default_settings.py
badd +11 ~/Projects/FlightDeck/flightdeck/jetpack/package_helpers.py
@@ -67,7 +67,7 @@ badd +3 ~/Projects/FlightDeck/flightdeck/jetpack/templates/json/library_autocomp
badd +5 ~/Projects/FlightDeck/flightdeck/jetpack/templates/json/library_assigned.json
badd +6 ~/Projects/FlightDeck/flightdeck/jetpack/templates/json/_edit_urls.json
badd +7 ~/Projects/FlightDeck/flightdeck/jetpack/templates/json/attachment_added.json
-badd +0 ~/Projects/FlightDeck/flightdeck/jetpack/templates/json/module_removed.json
+badd +1 ~/Projects/FlightDeck/flightdeck/jetpack/templates/json/module_removed.json
badd +5 ~/Projects/FlightDeck/flightdeck/jetpack/templates/json/attachment_removed.json
badd +1 /private/tmp/----------JJS
badd +26 ~/Projects/FlightDeck/flightdeck/jetpack/templates/js/_view_package_initiate.js
@@ -100,25 +100,29 @@ badd +1 ~/Projects/FlightDeck/flightdeck/jetpack/media/css/edit.css
badd +1 /private/tmp/-----------Base
badd +3 ~/Projects/FlightDeck/flightdeck/base/views.py
badd +11 ~/Projects/FlightDeck/flightdeck/base/templatetags/base_helpers.py
-badd +42 ~/Projects/FlightDeck/flightdeck/base/templates/base.html
+badd +88 ~/Projects/FlightDeck/flightdeck/base/templates/base.html
badd +16 ~/Projects/FlightDeck/flightdeck/base/templates/_header.html
-badd +105 ~/Projects/FlightDeck/flightdeck/media/js/FlightDeck.js
+badd +1 ~/Projects/FlightDeck/flightdeck/media/js/FlightDeck.js
badd +27 ~/Projects/FlightDeck/flightdeck/media/js/Clientcide.ModalWindow.js
badd +71 ~/Projects/FlightDeck/flightdeck/media/js/FlightDeck.Roar.js
badd +34 ~/Projects/FlightDeck/flightdeck/media/js/FlightDeck.Modal.js
badd +1 ~/Projects/FlightDeck/flightdeck/media/js/FlightDeck.Utils.js
badd +15 ~/Projects/FlightDeck/flightdeck/media/js/FlightDeck.Autocomplete.js
badd +55 ~/Projects/FlightDeck/flightdeck/media/js/lib/sendFile.js
-badd +75 ~/Projects/FlightDeck/flightdeck/settings.py
-badd +35 ~/Projects/FlightDeck/flightdeck/urls.py
+badd +128 ~/Projects/FlightDeck/flightdeck/settings.py
+badd +34 ~/Projects/FlightDeck/flightdeck/urls.py
badd +27 ~/Projects/FlightDeck/flightdeck/settings_local-default.py
badd +29 ~/Projects/FlightDeck/flightdeck/settings_local.py
badd +1 ~/Projects/FlightDeck/flightdeck/utils/os_utils.py
badd +2 ~/Projects/FlightDeck/flightdeck/base/shortcuts.py
-badd +91 ~/Projects/FlightDeck/flightdeck/base/templates/homepage.html
+badd +39 ~/Projects/FlightDeck/flightdeck/base/templates/homepage.html
badd +2 ~/Projects/FlightDeck/flightdeck/base/templates/_base_app_menu_items.html
badd +10 ~/Projects/FlightDeck/flightdeck/base/templates/404.html
badd +8 ~/Projects/FlightDeck/flightdeck/media/css/UI.HttpError.css
+badd +1 /tmp/-----------Tutorial
+badd +5 ~/Projects/FlightDeck/flightdeck/tutorial/views.py
+badd +4 ~/Projects/FlightDeck/flightdeck/tutorial/templates/tutorial.html
+badd +5 ~/Projects/FlightDeck/flightdeck/tutorial/urls.py
badd +1 /private/tmp/------------Person
badd +30 ~/Projects/FlightDeck/flightdeck/person/views.py
badd +38 ~/Projects/FlightDeck/flightdeck/person/templates/dashboard.html
@@ -132,8 +136,8 @@ badd +1 ~/Projects/FlightDeck/flightdeck/api/models.py
badd +7 ~/Projects/FlightDeck/flightdeck/api/default_settings.py
badd +15 ~/Projects/FlightDeck/flightdeck/api/tests.py
badd +1 ~/Projects/FlightDeck/flightdeck/api/urls.py
-badd +7 ~/Projects/FlightDeck/flightdeck/api/templates/api.html
-badd +4 ~/Projects/FlightDeck/flightdeck/api/templates/api_homepage.html
+badd +9 ~/Projects/FlightDeck/flightdeck/api/templates/api.html
+badd +38 ~/Projects/FlightDeck/flightdeck/api/templates/api_homepage.html
badd +4 ~/Projects/FlightDeck/flightdeck/api/templates/module_doc.html
badd +4 ~/Projects/FlightDeck/flightdeck/api/templates/package_doc.html
badd +5 ~/Projects/FlightDeck/flightdeck/api/templates/_modules_list.html
@@ -157,6 +161,8 @@ badd +12 ~/Projects/FlightDeck/scripts/initiate.sh
badd +1 ~/Projects/FlightDeck/scripts/runserver.sh
badd +1 ~/Projects/FlightDeck/scripts/syncdb.sh
badd +1 ~/Projects/FlightDeck/scripts/test.sh
+badd +7 ~/Projects/FlightDeck/scripts/admin.sh
+badd +7 ~/Projects/FlightDeck/scripts/manage.sh
badd +7 ~/Projects/FlightDeck/tools/pip-requirements.txt
badd +1 ~/Projects/FlightDeck/scripts/cfx.sh
badd +29 ~/Projects/FlightDeck/tools/git-exclude
@@ -164,12 +170,12 @@ badd +30 ~/Projects/FlightDeck/apache/config_local-default.wsgi
badd +1 /private/tmp/------------AMO
badd +4 ~/Projects/FlightDeck/flightdeck/amo/default_settings.py
badd +57 ~/Projects/FlightDeck/flightdeck/amo/authentication.py
-badd +1 tmp/-----------DOCS
+badd +1 /tmp/-----------DOCS
badd +15 ~/Projects/FlightDeck/Docs/mozillaaddonbuilderstyle.sty
badd +28 ~/Projects/FlightDeck/README
badd +72 ~/Projects/FlightDeck/INSTALL
silent! argdel *
-edit ~/Projects/FlightDeck/flightdeck/media/js/FlightDeck.js
+edit ~/Projects/FlightDeck/flightdeck/base/templates/base.html
set splitbelow splitright
set nosplitbelow
set nosplitright
@@ -185,12 +191,12 @@ setlocal fml=1
setlocal fdn=20
setlocal fen
silent! normal! zE
-let s:l = 61 - ((60 * winheight(0) + 43) / 87)
+let s:l = 52 - ((51 * winheight(0) + 29) / 59)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
-61
-normal! 02l
+52
+normal! 03l
if exists('s:wipebuf')
silent exe 'bwipe ' . s:wipebuf
endif
Please sign in to comment.
Something went wrong with that request. Please try again.