<i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
{% endif %}
</span>
- {% if BUILD_MODE and request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
+ {% if request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
<ul class="nav">
<li {% if request.resolver_match.url_name == 'all-builds' %}
class="active"
</li>
</ul>
<span class="pull-right divider-vertical"></span>
-
- <!-- new project button; only show in build mode -->
- {% if BUILD_MODE %}
- <div class="btn-group pull-right">
- <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
- </div>
- {% endif %}
</div>
</div>
</div>
default_project = Project.objects.get_default_project()
default_project_builds = Build.objects.filter(project = default_project)
- if (not toastermain.settings.BUILD_MODE) and default_project_builds.count() > 0:
- args = (default_project.id,)
- return redirect(reverse('projectbuilds', args = args), permanent = False)
-
# we only redirect to projects page if there is a user-generated project
num_builds = Build.objects.all().count()
user_projects = Project.objects.filter(is_default = False)
if prj is not None:
queryset = queryset.filter(project = prj)
- if not toastermain.settings.BUILD_MODE:
- queryset = queryset.exclude(project__is_default=False)
-
return list(itertools.chain(
queryset.filter(outcome=Build.IN_PROGRESS).order_by("-started_on"),
queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-started_on")[:3] ))
"projects": projects,
"non_cli_projects": projects.exclude(is_default=True),
"DEBUG" : toastermain.settings.DEBUG,
-
- # True if Toaster is in build mode, False otherwise
- "BUILD_MODE": toastermain.settings.BUILD_MODE,
-
"CUSTOM_IMAGE" : toastermain.settings.CUSTOM_IMAGE,
"TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH,
"TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION,
queryset = Build.objects.all()
- # if in analysis mode, exclude builds for all projects except
- # command line builds
- if not toastermain.settings.BUILD_MODE:
- queryset = queryset.exclude(project__is_default=False)
-
redirect_page = resolve(request.path_info).url_name
context, pagesize, orderby = _build_list_helper(request,
queryset_all = queryset_all.filter(Q(is_default=False) |
q_default_with_builds)
- # if in BUILD_MODE, exclude everything but the command line builds project
- if not toastermain.settings.BUILD_MODE:
- queryset_all = queryset_all.exclude(is_default=False)
-
# boilerplate code that takes a request for an object type and returns a queryset
# for that object type. copypasta for all needed table searches
(filter_string, search_term, ordering_string) = _search_tuple(request, Project)
urlpatterns.insert(1, url(r'', include(debug_toolbar.urls)))
#logger.info("Enabled django_toolbar extension")
+urlpatterns = [
+ # Uncomment the next line to enable the admin:
+ url(r'^admin/', include(admin.site.urls)),
+] + urlpatterns
-if toastermain.settings.BUILD_MODE:
- urlpatterns = [
- # Uncomment the next line to enable the admin:
- url(r'^admin/', include(admin.site.urls)),
- ] + urlpatterns
# Automatically discover urls.py in various apps, beside our own
# and map module directories to the patterns