mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Stubbing in /newsletters receive endpoint for mailgun routes.
This commit is contained in:
parent
b4da6061c1
commit
08b5e0dcad
5 changed files with 31 additions and 0 deletions
0
apps/newsletters/__init__.py
Normal file
0
apps/newsletters/__init__.py
Normal file
3
apps/newsletters/models.py
Normal file
3
apps/newsletters/models.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
16
apps/newsletters/tests.py
Normal file
16
apps/newsletters/tests.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
This file demonstrates writing tests using the unittest module. These will pass
|
||||
when you run "manage.py test".
|
||||
|
||||
Replace this with more appropriate tests for your application.
|
||||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class SimpleTest(TestCase):
|
||||
def test_basic_addition(self):
|
||||
"""
|
||||
Tests that 1 + 1 always equals 2.
|
||||
"""
|
||||
self.assertEqual(1 + 1, 2)
|
6
apps/newsletters/urls.py
Normal file
6
apps/newsletters/urls.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.conf.urls import *
|
||||
from apps.newsletters import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^/?$', views.newsletter_receive, name='newsletter-receive'),
|
||||
)
|
6
apps/newsletters/views.py
Normal file
6
apps/newsletters/views.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.http import HttpResponse, Http404
|
||||
|
||||
def newsletter_receive(request):
|
||||
print request.REQUEST
|
||||
response = HttpResponse('OK')
|
||||
return response
|
Loading…
Add table
Reference in a new issue