Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
nm.debian.org
Commits
0652faeb
Commit
0652faeb
authored
Mar 13, 2012
by
Enrico Zini
Browse files
get_absolute_urls implemented, and s/nmstatus/process
parent
1895e230
Changes
6
Hide whitespace changes
Inline
Side-by-side
backend/models.py
View file @
0652faeb
...
...
@@ -127,6 +127,10 @@ class Person(models.Model):
def
__repr__
(
self
):
return
"%s <%s> [uid:%s, status:%s]"
%
(
self
.
fullname
.
encode
(
"unicode_escape"
),
self
.
email
,
self
.
uid
,
self
.
status
)
@
models
.
permalink
def
get_absolute_url
(
self
):
return
(
"public_person"
,
(),
dict
(
key
=
self
.
lookup_key
))
@
property
def
active_process
(
self
):
"""
...
...
@@ -195,6 +199,10 @@ class AM(models.Model):
"d"
if
self
.
is_dam
else
"-"
,
self
.
slots
)
@
models
.
permalink
def
get_absolute_url
(
self
):
return
(
"public_person"
,
(),
dict
(
key
=
self
.
person
.
lookup_key
))
def
applicant_stats
(
self
):
"""
Return 4 stats about the am (cur, max, hold, done).
...
...
@@ -294,6 +302,10 @@ class Process(models.Model):
self
.
person
.
status
,
self
.
applying_for
)
@
models
.
permalink
def
get_absolute_url
(
self
):
return
(
"public_process"
,
(),
dict
(
key
=
self
.
lookup_key
))
@
property
def
lookup_key
(
self
):
"""
...
...
public/templates/public/nmlist.html
View file @
0652faeb
...
...
@@ -7,7 +7,7 @@
{% for p in progs %}
<tr>
<td>
{{p.last_change.date}}
</td>
<td><a
href=
"{
% url public_nmstatus key=p.lookup_key %
}"
>
{{p.person}}
</a></td>
<td><a
href=
"{
{ p.get_absolute_url }
}"
>
{{p.person}}
</a></td>
</tr>
{% endfor %}
</table>
...
...
public/urls.py
View file @
0652faeb
...
...
@@ -26,6 +26,7 @@ urlpatterns = patterns('public.views',
url
(
r
'^people$'
,
'people'
,
name
=
"public_people"
),
url
(
r
'^person/(?P<key>[^/]+)$'
,
'person'
,
name
=
"public_person"
),
url
(
r
'^nmlist$'
,
'nmlist'
,
name
=
"public_nmlist"
),
url
(
r
'^nmstatus/(?P<key>[^/]+)$'
,
'nmstatus'
,
name
=
"public_nmstatus"
),
url
(
r
'^nmstatus/(?P<key>[^/]+)$'
,
'process'
,
name
=
"public_nmstatus"
),
url
(
r
'^process/(?P<key>[^/]+)$'
,
'process'
,
name
=
"public_process"
),
url
(
r
'^progress/(?P<progress>\w+)$'
,
'progress'
,
name
=
"public_progress"
),
)
public/views.py
View file @
0652faeb
...
...
@@ -85,7 +85,7 @@ def nmlist(request):
context
,
context_instance
=
template
.
RequestContext
(
request
))
def
nmstatu
s
(
request
,
key
):
def
proces
s
(
request
,
key
):
process
=
bmodels
.
Process
.
lookup
(
key
)
if
process
is
None
:
return
redirect
(
reverse
(
'root_faq'
)
+
"#process-lookup"
)
...
...
restricted/templates/restricted/nmstatus.html
View file @
0652faeb
...
...
@@ -5,7 +5,7 @@
{% block relatedpages %}
{{block.super}}
<a
href=
"{% url public_
nmstatu
s key=process.lookup_key %}"
>
public version
</a>
<a
href=
"{% url public_
proces
s key=process.lookup_key %}"
>
public version
</a>
{% endblock %}
{% block head %}
...
...
templates/faq.html
View file @
0652faeb
...
...
@@ -10,7 +10,7 @@
<h1>
nm.debian.org Frequently Asked Questions
</h1>
<h2
id=
"process-lookup"
>
My email address does not work with "/public/
nmstatu
s"
</h2>
<h2
id=
"process-lookup"
>
My email address does not work with "/public/
proces
s"
</h2>
<p>
The nmstatus page shows a process, that is, the path a person follows to
change their status in Debian.
</p>
...
...
@@ -20,7 +20,7 @@ login name, or an email address.</p>
<p>
If you have a Debian account, the easiest way to lookup your information is
by using your account name, as in
<a
href=
"{% url public_
nmstatu
s key='enrico' %}"
>
{% url public_
nmstatu
s key='enrico' %}
</a>
.
</p>
<a
href=
"{% url public_
proces
s key='enrico' %}"
>
{% url public_
proces
s key='enrico' %}
</a>
.
</p>
<p>
If you do not yet have a Debian account, then you can use the E-Mail address
that you used to enter NM.
</p>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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