Skip to content

Commit

Permalink
#212 Edit project Home URL
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylampada committed Jan 10, 2014
1 parent 9575be5 commit a47a149
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion djangoproject/core/services/issue_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def _throwIfNotSolutionOwner(solution, user):
def _append_project_id_and_update_db_if_needed(issueInfo, trackerURL, user):
issueInfo.project_id = ''
project = None
if(issueInfo.project_trackerURL):
if issueInfo.project_trackerURL:
found_projects = Project.objects.filter(trackerURL__iexact=issueInfo.project_trackerURL)
if(found_projects.count() > 1):
notify_admin("WARNING: Database inconsistency", "more than one project found with url = %s"%issueInfo.project_trackerURL)
Expand Down
1 change: 1 addition & 0 deletions djangoproject/core/views/project_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def edit(request):
if 'image3x1' in request.FILES and request.FILES['image3x1']:
project.image3x1 = request.FILES['image3x1']
project.description = request.POST.get('description')
project.homeURL = request.POST.get('homeURL')
project.save()
watches = watch_services.find_project_watches(project)
mail_services.notifyWatchers_project_edited(request.user, project, old_json, watches)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ <h4 class="arial no-margin font-size-12"><a href="{[{ part.programmer_link }]}">
<li>
new image: {[{ selected_activity.new_dic.image3x1 }]}
</li>
<li>
old home URL: {[{ selected_activity.old_dic.homeURL }]}
</li>
<li>
new home URL: {[{ selected_activity.new_dic.homeURL }]}
</li>
<li>
old description:<br>
<pre>{[{ selected_activity.old_dic.description }]}</pre>
Expand Down
4 changes: 4 additions & 0 deletions djangoproject/templates/core2/project_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ <h2> Editing project: {{ project.name }}</h2>
<label for="image3x1">Image</label>
<input type="file" name="image3x1" id="image3x1">
</div>
<div>
<label for="homeURL">Home URL</label>
<input type="text" name="homeURL" id="homeURL" style="width: 300px;" value="{{ project.homeURL }}">
</div>
<div>
<label for="description">Description</label>
<text-with-markdown-preview model="description" nameid="description"></text-with-markdown-preview>
Expand Down
6 changes: 4 additions & 2 deletions djangoproject/templates/email/project_edited.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@

Old project settings
<div style="background-color: #D9EDF7;border-bottom-color: #BCE8F1;border-bottom-left-radius: 4px;border-bottom-right-radius: 4px;border-bottom-style: solid;border-bottom-width: 1px;border-left-color: #BCE8F1;border-left-style: solid;border-left-width: 1px;border-right-color: #BCE8F1;border-right-style: solid;border-right-width: 1px;border-top-color: #BCE8F1;border-top-left-radius: 4px;border-top-right-radius: 4px;border-top-style: solid;border-top-width: 1px;color: #3A87AD;line-height: 18px;margin-bottom: 18px;margin-left: 0px;margin-right: 0px;margin-top: 0px;padding-bottom: 8px;padding-left: 14px;padding-right: 35px;padding-top: 8px;">
<strong>description:</strong> {{old_dic.description|linebreaks}}<br>
<strong>image:</strong> {{old_dic.image3x1}}
<strong>Home URL:</strong> {{old_dic.homeURL}}
<strong>description:</strong> {{old_dic.description|linebreaks}}<br>
</div>
New project settings
<div style="background-color: #D9EDF7;border-bottom-color: #BCE8F1;border-bottom-left-radius: 4px;border-bottom-right-radius: 4px;border-bottom-style: solid;border-bottom-width: 1px;border-left-color: #BCE8F1;border-left-style: solid;border-left-width: 1px;border-right-color: #BCE8F1;border-right-style: solid;border-right-width: 1px;border-top-color: #BCE8F1;border-top-left-radius: 4px;border-top-right-radius: 4px;border-top-style: solid;border-top-width: 1px;color: #3A87AD;line-height: 18px;margin-bottom: 18px;margin-left: 0px;margin-right: 0px;margin-top: 0px;padding-bottom: 8px;padding-left: 14px;padding-right: 35px;padding-top: 8px;">
<strong>description:</strong> {{project.description|linebreaks}}<br>
<strong>image:</strong> {{project.image3x1.url}}
<strong>Home URL:</strong> {{project.homeURL}}
<strong>description:</strong> {{project.description|linebreaks}}<br>
</div>
We will let you know if there are any updates.

Expand Down

0 comments on commit a47a149

Please sign in to comment.