Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
75daafb7
Commit
75daafb7
authored
Feb 29, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index page
parent
f035c91c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
html/index.html
html/index.html
+15
-0
settings.py
settings.py
+3
-0
trans/views.py
trans/views.py
+9
-0
No files found.
html/index.html
0 → 100644
View file @
75daafb7
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h2>
{% trans "Projects" %}
</h2>
<ul>
{% for prj in projects %}
<li><a
href=
"{{ prj.get_absolute_url }}"
>
{{ prj.name }}
</a></li>
{% endfor %}
</ul>
{% endblock %}
settings.py
View file @
75daafb7
...
@@ -190,3 +190,6 @@ LOGGING = {
...
@@ -190,3 +190,6 @@ LOGGING = {
# Path where git repositories are stored, it needs to be writable
# Path where git repositories are stored, it needs to be writable
GIT_ROOT
=
'%s/repos/'
%
WEB_ROOT
GIT_ROOT
=
'%s/repos/'
%
WEB_ROOT
# Title of site to use
SITE_TITLE
=
'Weblate'
trans/views.py
View file @
75daafb7
from
django.shortcuts
import
render_to_response
,
get_object_or_404
from
django.shortcuts
import
render_to_response
,
get_object_or_404
from
django.template
import
RequestContext
from
django.template
import
RequestContext
from
django.conf
import
settings
from
trans.models
import
Project
,
SubProject
,
Translation
,
Unit
from
trans.models
import
Project
,
SubProject
,
Translation
,
Unit
def
home
(
request
):
projects
=
Project
.
objects
.
all
()
return
render_to_response
(
'index.html'
,
RequestContext
(
request
,
{
'projects'
:
projects
,
'title'
:
settings
.
SITE_TITLE
,
}))
def
show_project
(
request
,
project
):
def
show_project
(
request
,
project
):
obj
=
get_object_or_404
(
Project
,
slug
=
project
)
obj
=
get_object_or_404
(
Project
,
slug
=
project
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment