mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
Remove pwn module and links
The pwn module has never been used, as the pwn are simply sent to -announce and nothing else. We've kept the code and model around for doing it on the site for years now and it's unused, so let's remove it to cut down on maintenance cost.
This commit is contained in:
@ -1,4 +0,0 @@
|
||||
from pgweb.util.admin import register_pgwebadmin
|
||||
from models import PwnPost
|
||||
|
||||
register_pgwebadmin(PwnPost)
|
@ -1,22 +0,0 @@
|
||||
from django.contrib.syndication.views import Feed
|
||||
|
||||
from models import PwnPost
|
||||
|
||||
from datetime import datetime, time
|
||||
|
||||
class PwnFeed(Feed):
|
||||
title = description = "PostgreSQL Weekly News"
|
||||
link = "http://www.postgresql.org/community/weeklynews/"
|
||||
|
||||
description_template = 'pwn/rss_description.html'
|
||||
title_template = 'pwn/rss_title.html'
|
||||
|
||||
def items(self):
|
||||
return PwnPost.objects.all()[:5]
|
||||
|
||||
def item_link(self, obj):
|
||||
return "http://www.postgresql.org/community/weeklynews/pwn%s/" % obj.linkdate
|
||||
|
||||
def item_pubdate(self, obj):
|
||||
return datetime.combine(obj.date,time.min)
|
||||
|
@ -1,26 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import datetime
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='PwnPost',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('date', models.DateField(default=datetime.date.today, unique=True)),
|
||||
('intro', models.TextField()),
|
||||
('content', models.TextField()),
|
||||
],
|
||||
options={
|
||||
'ordering': ('-date',),
|
||||
},
|
||||
),
|
||||
]
|
@ -1,29 +0,0 @@
|
||||
from django.db import models
|
||||
|
||||
from datetime import date
|
||||
|
||||
class PwnPost(models.Model):
|
||||
date = models.DateField(null=False, blank=False, default=date.today(), unique=True)
|
||||
intro = models.TextField(null=False, blank=False)
|
||||
content = models.TextField(null=False, blank=False)
|
||||
|
||||
markdown_fields = ('intro', 'content',)
|
||||
|
||||
def purge_urls(self):
|
||||
yield 'community/weeklynews/$'
|
||||
yield 'community/weeklynews/pwn%s/' % self.linkdate()
|
||||
yield 'weeklynews.rss'
|
||||
|
||||
def __unicode__(self):
|
||||
return "PostgreSQL Weekly News %s" % self.date
|
||||
|
||||
@property
|
||||
def linkdate(self):
|
||||
return self.date.strftime("%Y%m%d")
|
||||
|
||||
@property
|
||||
def nicedate(self):
|
||||
return self.date.strftime("%B %d, %Y")
|
||||
|
||||
class Meta:
|
||||
ordering = ('-date',)
|
@ -1,2 +0,0 @@
|
||||
def get_struct():
|
||||
yield ('community/weeklynews/', None)
|
@ -1,22 +0,0 @@
|
||||
from django.shortcuts import render_to_response, get_object_or_404
|
||||
|
||||
from pgweb.util.contexts import NavContext
|
||||
|
||||
from datetime import date
|
||||
|
||||
from models import PwnPost
|
||||
|
||||
def index(request):
|
||||
posts = PwnPost.objects.all()
|
||||
|
||||
return render_to_response('pwn/list.html', {
|
||||
'posts': posts,
|
||||
}, NavContext(request, 'community'))
|
||||
|
||||
def post(request, year, month, day):
|
||||
d = date(int(year), int(month), int(day))
|
||||
post = get_object_or_404(PwnPost, date=d)
|
||||
|
||||
return render_to_response('pwn/view.html', {
|
||||
'post': post,
|
||||
}, NavContext(request, 'community'))
|
@ -114,7 +114,6 @@ INSTALLED_APPS = [
|
||||
'pgweb.survey',
|
||||
'pgweb.misc',
|
||||
'pgweb.featurematrix',
|
||||
'pgweb.pwn',
|
||||
'pgweb.search',
|
||||
'pgweb.pugs',
|
||||
]
|
||||
|
@ -14,7 +14,6 @@ admin.autodiscover()
|
||||
from pgweb.core.feeds import VersionFeed
|
||||
from pgweb.news.feeds import NewsFeed
|
||||
from pgweb.events.feeds import EventFeed
|
||||
from pgweb.pwn.feeds import PwnFeed
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^$', 'pgweb.core.views.home'),
|
||||
@ -52,8 +51,6 @@ urlpatterns = patterns('',
|
||||
(r'^community/survey/vote/(\d+)/$', 'pgweb.survey.views.vote'),
|
||||
(r'^community/survey[/\.](\d+)(-.*)?/$', 'pgweb.survey.views.results'),
|
||||
(r'^community/user-groups/$', 'pgweb.pugs.views.index'),
|
||||
(r'^community/weeklynews/$', 'pgweb.pwn.views.index'),
|
||||
(r'^community/weeklynews/pwn(\d{4})(\d{2})(\d{2})/$', 'pgweb.pwn.views.post'),
|
||||
|
||||
(r'^search/$', 'pgweb.search.views.search'),
|
||||
|
||||
@ -73,7 +70,6 @@ urlpatterns = patterns('',
|
||||
(r'^versions.rss$', VersionFeed()),
|
||||
(r'^news.rss$', NewsFeed()),
|
||||
(r'^events.rss$', EventFeed()),
|
||||
(r'^weeklynews.rss$', PwnFeed()),
|
||||
|
||||
###
|
||||
# Special sections
|
||||
|
@ -53,7 +53,6 @@ sitenav = {
|
||||
{'title': 'International Sites','link':'/community/international/'},
|
||||
{'title': 'Propaganda', 'link':'/community/propaganda/'},
|
||||
{'title': 'Resources', 'link':'/community/resources/'},
|
||||
{'title': 'Weekly News', 'link':'/community/weeklynews/'},
|
||||
],
|
||||
'developer': [
|
||||
{'title': 'Developers', 'link':'/developer/'},
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div id="pgCommunity">
|
||||
<h1>Community</h1>
|
||||
|
||||
<p>PostgreSQL is well supported by its active community. Current developments are chronicled in the <a href="/community/weeklynews">PostgreSQL Weekly News</a> and there are more than a dozen <a href="/community/lists">mailing lists</a> available, categorized into topics like administration, announcements, jobs, performance, and SQL. We also have several PostgreSQL User Groups in the world, and there is also an active <a href="/community/irc">IRC</a> community.</p>
|
||||
<p>PostgreSQL is well supported by its active community. There are more than a dozen <a href="/community/lists">mailing lists</a> available, categorized into topics like administration, announcements, jobs, performance, and SQL. We also have several PostgreSQL User Groups in the world, and there is also an active <a href="/community/irc">IRC</a> community.</p>
|
||||
|
||||
<p>In addition to the resources available on this site, there are also links to <a href="/community/international">international sites</a> that contain PostgreSQL information in various languages. PostgreSQL community <a href="/community/resources">resources</a> are also highlighted in this section of the website.</p>
|
||||
</div>
|
||||
|
@ -1,15 +0,0 @@
|
||||
{%extends "base/page.html"%}
|
||||
{%block title%}Weekly News{%endblock%}
|
||||
{%block contents%}
|
||||
<h1>Weekly News</h1>
|
||||
<p>
|
||||
The PostgreSQL Weekly News is a community newsletter, summarising the news and events
|
||||
of the past week, focussing primarily on the development of PostgreSQL.
|
||||
</p>
|
||||
<p>
|
||||
To receive the Weekly News in your inbox, please subscribe to the
|
||||
<a href="/community/lists/subscribe">pgsql-announce@postgresql.org</a>
|
||||
mailing list.
|
||||
</p>
|
||||
{%endblock%}
|
||||
|
@ -1,2 +0,0 @@
|
||||
{%load markup%}
|
||||
{{obj.intro|markdown}}
|
@ -1 +0,0 @@
|
||||
PostgreSQL Weekly News - {{obj.date}}
|
@ -1,11 +0,0 @@
|
||||
{%extends "base/page.html"%}
|
||||
{%load markup%}
|
||||
{%block title%}PostgreSQL Weekly News - {{post.nicedate}}{%endblock%}
|
||||
{%block contents%}
|
||||
<h1>PostgreSQL Weekly News - {{post.nicedate}}</h1>
|
||||
<p>
|
||||
{{post.intro|markdown}}
|
||||
</p>
|
||||
{{post.content|markdown}}
|
||||
{%endblock%}
|
||||
|
Reference in New Issue
Block a user