public
Description: A full featured and opinionated blogging solution using Django
Homepage: http://lethain.com/projects/lifeflow/
Clone URL: git://github.com/lethain/lifeflow.git
Added ability to  manage sites to notify from LFE
[#57 state:resolved]
lethain (author)
Sat Jul 05 23:09:49 -0700 2008
commit  f4d00965325573aecfe839f6803351f4068f9361
tree    b63ff59e3adeeec7cd666bad0c5c7013a2388216
parent  2216f546e72c74cc4b0ea4eb32e8f4ec0f525298
...
6
7
8
9
 
 
 
10
11
12
...
6
7
8
 
9
10
11
12
13
14
0
@@ -6,7 +6,9 @@ urlpatterns = patterns('lifeflow.editor.views',
0
     (r'^comments/$', 'comments'),
0
     (r'^files/$', 'files'),
0
 
0
-    (r'^admin/$', 'blogroll'),
0
+    (r'^admin/blogroll/$', 'blogroll'),
0
+    (r'^admin/sites_to_ping/$', 'sites_to_notify'),
0
+    
0
 
0
     (r'^authors/$', 'authors'),
0
     (r'^authors/create/$', 'create_author'),
...
102
103
104
 
 
 
 
 
 
 
105
106
107
...
189
190
191
192
 
193
194
195
...
225
226
227
228
 
 
 
 
 
 
 
229
230
231
...
102
103
104
105
106
107
108
109
110
111
112
113
114
...
196
197
198
 
199
200
201
202
...
232
233
234
 
235
236
237
238
239
240
241
242
243
244
0
@@ -102,6 +102,13 @@ def blogroll(request):
0
                               RequestContext(request,{}))
0
 
0
 @login_required
0
+def sites_to_notify(request):
0
+    sites = SiteToNotify.objects.all()
0
+    return render_to_response('lifeflow/editor/sites_to_ping.html',
0
+                              {'sites_to_notify':sites},
0
+                              RequestContext(request,{}))
0
+
0
+@login_required
0
 def files(request):
0
     resources = Resource.objects.all()
0
     return render_to_response('lifeflow/editor/files.html',
0
@@ -189,7 +196,7 @@ def update(request):
0
     return HttpResponse("success")
0
 
0
 
0
-API_CLASSES = {"comment":Comment, "project":Project, "flow":Flow, "tag":Tag, "series":Series, "draft":Draft, "entry":Entry, "author":Author, "resource":Resource, "recommendedsite":RecommendedSite}
0
+API_CLASSES = {"comment":Comment, "project":Project, "flow":Flow, "tag":Tag, "series":Series, "draft":Draft, "entry":Entry, "author":Author, "resource":Resource, "recommendedsite":RecommendedSite,'site_to_notify':SiteToNotify}
0
 
0
 def get_class(str):
0
     return API_CLASSES[str]
0
@@ -225,7 +232,13 @@ def create_model(request):
0
         slug = slugify(title)
0
         l = Language(title=title,slug=slug)
0
         l.save()
0
-
0
+    elif model == u"site_to_notify":
0
+        title = request.POST[u'title']
0
+        url_to_ping = request.POST[u'url_to_ping']
0
+        blog_title = request.POST[u'blog_title']
0
+        blog_url = request.POST[u'blog_url']
0
+        s = SiteToNotify(title=title,url_to_ping=url_to_ping,blog_title=blog_title,blog_url=blog_url)
0
+        s.save()
0
     elif model == u"translation":
0
         translated_pk = int(request.POST[u'pk'])
0
         translated = Entry.objects.get(pk=translated_pk)
...
25
26
27
28
 
29
30
31
...
25
26
27
 
28
29
30
31
0
@@ -25,7 +25,7 @@
0
   <a class="left" href="/editor/projects/">projects</a>
0
   <a class="left" href="/editor/files/">files</a>
0
   <a class="left" href="/editor/authors/">authors</a>
0
-  <a class="left" href="/editor/admin/">admin</a>
0
+  <a class="left" href="/editor/admin/blogroll/">admin</a>
0
   {% endif %}
0
 </div>
0
 <div class="error-msg" id="errors"></div>

Comments