Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mozilla/kuma
...
head fork: mozilla/kuma
Checking mergeability… Don't worry, you can still create the pull request.
  • 8 commits
  • 7 files changed
  • 0 commit comments
  • 4 contributors
View
2  apps/demos/models.py
@@ -525,7 +525,7 @@ def save(self, **kwargs):
super(Submission,self).save(**kwargs)
def delete(self,using=None):
- root = '%s/%s' % (settings.MEDIA_ROOT, get_root_for_submission(self))
+ root = '%s/%s' % (DEMO_UPLOADS_ROOT, get_root_for_submission(self))
if isdir(root): rmtree(root)
super(Submission,self).delete(using)
View
35 apps/demos/tests/test_models.py
@@ -332,6 +332,41 @@ def test_demo_unicode_filenames_2(self):
rmtree(path)
+ def test_demo_deletion(self):
+ """Ensure that demo files are deleted along with submission record"""
+
+ fout = StringIO()
+ zf = zipfile.ZipFile(fout, 'w')
+ zf.writestr('demo.html', """<html></html""")
+ zf.writestr('css/main.css', 'h1 { color: red }')
+ zf.writestr('js/main.js', 'alert("HELLO WORLD");')
+ zf.close()
+
+ s = Submission(title='Hello world', slug='hello-world',
+ description='This is a hello world demo',
+ creator=self.user)
+
+ s.demo_package.save('play_demo.zip', ContentFile(fout.getvalue()))
+ s.demo_package.close()
+ s.clean()
+ s.save()
+
+ s.process_demo_package()
+
+ path = s.demo_package.path.replace('.zip', '')
+
+ ok_(isdir(path))
+ ok_(isfile('%s/index.html' % path))
+ ok_(isfile('%s/css/main.css' % path))
+ ok_(isfile('%s/js/main.js' % path))
+
+ s.delete()
+
+ ok_(not isfile('%s/index.html' % path))
+ ok_(not isfile('%s/css/main.css' % path))
+ ok_(not isfile('%s/js/main.js' % path))
+ ok_(not isdir(path))
+
def test_demo_file_size_limit(self):
"""Demo package with any individual file >1MB in size is invalid"""
s = self.submission
View
10 apps/landing/templates/landing/apps_newsletter.html
@@ -47,12 +47,12 @@ <h3 class="mod-title">{{ _('Firefox Apps & Hacks Newsletter') }}</h3>
</li>
<li class="agree">
{{ form.agree.errors }}
- <label for="sub-agree">
- {{ form.agree }} {{form.agree.label }}
+ <label for="id_agree">
+ {{ form.agree }} {{form.agree.label}}
+ {% trans privacy_url='http://www.mozilla.org/en-US/privacy' %}
+ to the <a href="{{ privacy_url }}">Privacy Policy</a>
+ {% endtrans %}
</label>
- {% trans privacy_url='http://www.mozilla.org/en-US/privacy' %}
- to the <a href="{{ privacy_url }}">Privacy Policy</a>
- {% endtrans %}
</li>
<li class="fm-submit"><button type="submit" class="button positive">{{ _('Sign me up!') }}</button></li>
</ol>
View
2  templates/403.html
@@ -48,7 +48,7 @@ <h1 class="page-title">Permission Denied</h1>
</ul>
{% trans %}
- <p>No computer has ever made a mistake or distorted information. We are all, by any practical definition of the words, foolproof and incapable of error. So it can only be attributable to human error. If so, <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Mozilla%20Developer%20Network&component=Website" rel="nofollow">file a bug</a> for my human operators.</p>
+ <p>No computer has ever made a mistake or distorted information. We are all, by any practical definition of the words, foolproof and incapable of error. So it can only be attributable to human error. If so, <a href="https://bugzilla.mozilla.org/form.mdn" rel="nofollow">file a bug</a> for my human operators.</p>
{% endtrans %}
{% trans %}
View
2  templates/404.html
@@ -27,7 +27,7 @@ <h1 class="page-title">Not Found</h1>
<p>You can <a href="#q">try a search</a> or start over on the <a href="{{ url('home') }}">home page</a>.</p>
- <p>If you were following a documentation link, you can <a href="/login/next={{ request.get_full_path() }}" class="browserid-signin" aria-haspopup="true" title="{{ _('Sign in with Persona') }}">sign in</a> and create the page. Otherwise, please <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Mozilla%20Developer%20Network&component=Website" rel="nofollow">file a bug</a>. Thanks!</p>
+ <p>If you were following a documentation link, you can <a href="/login/next={{ request.get_full_path() }}" class="browserid-signin" aria-haspopup="true" title="{{ _('Sign in with Persona') }}">sign in</a> and create the page. Otherwise, please <a href="https://bugzilla.mozilla.org/form.doc" rel="nofollow">file a bug</a>. Thanks!</p>
<p class="attrib"><small><a href="http://theoatmeal.com/comics/state_web_summer#tumblr" rel="nofollow">Tumbeasts</a> by Matthew Inman of <a href="http://theoatmeal.com" rel="nofollow">The Oatmeal</a></small></p>
View
2  templates/500.html
@@ -28,7 +28,7 @@ <h1 class="page-title">Internal Server Error</h1>
<p>Please start over on the <a href="{{ url('home') }}">home page</a>.</p>
{% endif %}
<p>If you have additional information how to reproduce this problem, please
- <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Mozilla%20Developer%20Network&component=Website" rel="nofollow">file a bug.</a>
+ <a href="https://bugzilla.mozilla.org/form.mdn" rel="nofollow">file a bug.</a>
Thanks!</p>
<p class="attrib"><small><a href="http://theoatmeal.com/comics/state_web_summer#tumblr" rel="nofollow">Tumbeasts</a> by Matthew Inman of <a href="http://theoatmeal.com" rel="nofollow">The Oatmeal</a></small></p>
View
2  templates/handlers/400.html
@@ -42,7 +42,7 @@ <h1 class="page-title">Permission Denied</h1>
</ul>
{% trans %}
- <p>No computer has ever made a mistake or distorted information. We are all, by any practical definition of the words, foolproof and incapable of error. So it can only be attributable to human error. If so, <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Mozilla%20Developer%20Network&component=Website">file a bug</a> for my human operators.</p>
+ <p>No computer has ever made a mistake or distorted information. We are all, by any practical definition of the words, foolproof and incapable of error. So it can only be attributable to human error. If so, <a href="https://bugzilla.mozilla.org/form.mdn">file a bug</a> for my human operators.</p>
{% endtrans %}
</section>

No commit comments for this range

Something went wrong with that request. Please try again.