Permalink
Browse files

Changes for dinette

git-svn-id: https://svn.uswaretech.com/forumproject@150 ad127118-9ec2-4c8a-8d99-4e47e8ea721e
  • Loading branch information...
1 parent 32a06eb commit 445a7966c1f548a86734fcbd8d30d1a0339c416d shabda committed Sep 6, 2009
View
@@ -8,7 +8,10 @@ class UserActivity:
def process_request(self, req):
if req.user.is_authenticated():
#last = req.user.get_profile().last_activity
- user_profile = req.user.get_profile()
- now = datetime.datetime.now()
- user_profile.last_activity=now
- user_profile.save()
+ try:
+ user_profile = req.user.get_profile()
+ now = datetime.datetime.now()
+ user_profile.last_activity=now
+ user_profile.save()
+ except:
+ pass
View
@@ -144,7 +144,7 @@ def lastPost(self):
@models.permalink
def get_absolute_url(self):
- return ('djorum_topic_detail',(),{'topic_id': self.id})
+ return ('dinette_topic_detail',(),{'topic_id': self.id})
def classname(self):
return self.__class__.__name__
@@ -175,7 +175,7 @@ def __unicode__(self):
@models.permalink
def get_absolute_url(self):
- return ('djorum_topic_detail',(),{'topic_id': self.topic.id})
+ return ('dinette_topic_detail',(),{'topic_id': self.topic.id})
def htmlfrombbcode(self):
soup = BeautifulSoup(self.message)
@@ -4,7 +4,7 @@
{% if announcement %}
<div id="brd-announcement" class="gen-content">
<div class="content">
-<a href="{% url djorum_topic_detail announcement.id %}"> {{ announcement.subject }}</a>
+<a href="{% url dinette_topic_detail announcement.id %}"> {{ announcement.subject }}</a>
{{ announcement.message }}
</div>
</div>
@@ -1,7 +1,7 @@
<div id="brd-head" class="gen-content">
<p id="brd-access"><a href="#brd-main">Skip to forum content</a></p>
- <p id="brd-title"><a href="{% url djorum_category %}">{{ config.name }}</a></p>
+ <p id="brd-title"><a href="{% url dinette_category %}">{{ config.name }}</a></p>
<p id="brd-desc">{{ config.tag_line }}</p>
</div>
@@ -25,7 +25,7 @@
<div id="errorbox"> <span> </span></div>
<div id="formbox">
- <form action="{% url djorum_posttopic %}" method="POST" id="fposttopic" enctype="multipart/form-data">
+ <form action="{% url dinette_posttopic %}" method="POST" id="fposttopic" enctype="multipart/form-data">
<table>
<tbody>
{{ topicform.as_table }}
@@ -53,15 +53,15 @@
<h1 class="main-title"><a class="permalink" href="{{ topic.category.get_absolute_url }}" rel="bookmark" title="Permanent link to this forum."> {{ topic.category.name }} </a> <small>(Page 1 of 4)</small></h1>
<div id="brd-crumbs-top" class="crumbs gen-content">
- <p><span class="crumb crumbfirst"><a href="{% url djorum_category %}">Djorum Forums</a></span> <span class="crumb crumblast"><span> »&#160;</span><a href="{{ category.get_absolute_url }}"> {{category.name}}</a></span>
+ <p><span class="crumb crumbfirst"><a href="{% url dinette_category %}">Djorum Forums</a></span> <span class="crumb crumblast"><span> »&#160;</span><a href="{{ category.get_absolute_url }}"> {{category.name}}</a></span>
&nbsp;
{% if topic_list.has_next %}
- <a href="{% url djorum_index2 category.id topic_list.next_page_number %}"> Next </a>
+ <a href="{% url dinette_index2 category.id topic_list.next_page_number %}"> Next </a>
{% endif %}
{% if topic_list.has_previous %}
- <a href="{% url djorum_index2 category.id topic_list.previous_page_number %}"> Previous </a>
+ <a href="{% url dinette_index2 category.id topic_list.previous_page_number %}"> Previous </a>
{% endif %}
&nbsp;
<a href="" onclick="return isUserAuthenticated(0)">New Topic</a>
@@ -74,7 +74,7 @@ <h1 class="main-title"><a class="permalink" href="{{ topic.category.get_absolute
<div class="main-head">
- <p class="options"><span class="feed first-item"><a href="{% url djorum_feed_url category.getCategoryString %}"> RSS </a></span></p> <h2 class="hn"><span><span class="item-info">Topics </span></span></h2>
+ <p class="options"><span class="feed first-item"><a href="{% url dinette_feed_url category.getCategoryString %}"> RSS </a></span></p> <h2 class="hn"><span><span class="item-info">Topics </span></span></h2>
</div>
<div class="main-subhead">
@@ -103,7 +103,7 @@ <h1 class="main-title"><a class="permalink" href="{{ topic.category.get_absolute
<div class="hr"><hr /></div>
<div id="brd-about" class="gen-content">
- <p id="copyright">Powered by <strong><a href="{% url djorum_category %}">Djorum</a></strong></p>
+ <p id="copyright">Powered by <strong><a href="{% url dinette_category %}">Djorum</a></strong></p>
<p id="extensions-used">Copyright &copy; 2008 <a href="/">Usware</a></p>
</div>
@@ -42,7 +42,7 @@ <h2 class="hn"><span>{{ forum }}</span></h2>
<span class="icon "><!-- --></span>
<div class="item-subject">
- <h3 class="hn"><a href="{% url djorum_index category.id %}"><span> {{category}} </span></a></h3>
+ <h3 class="hn"><a href="{% url dinette_index category.id %}"><span> {{category}} </span></a></h3>
<p>{{ category.description }} <span class="modlist">
@@ -111,8 +111,8 @@ <h2 class="hn"><span>Forum statistics</span></h2>
<div class="hr"><hr /></div>
<div id="brd-about" class="gen-content">
- <p id="copyright">Powered by <strong><a href="{% url djorum_category %}">Djorum</a></strong></p>
-<p id="extensions-used">Copyright &copy; 2008 <a href="{% url djorum_category %}">Djorum</a></p>
+ <p id="copyright">Powered by <strong><a href="{% url dinette_category %}">Djorum</a></strong></p>
+<p id="extensions-used">Copyright &copy; 2008 <a href="{% url dinette_category %}">Djorum</a></p>
</div>
@@ -55,16 +55,16 @@
<div id="brd-crumbs-top" class="crumbs gen-content">
- <p><span class="crumb crumbfirst"><a href="{% url djorum_category %}">Djorum Forums</a></span> <span class="crumb"><span> »&#160;</span><a href="{{ topic.category.get_absolute_url }}">{{ topic.category.name }}</a></span> <span class="crumb crumblast"><span> »&#160;</span><a href="{{ topic.get_absolute_url }}">{{ topic.subject }} </a></span>
+ <p><span class="crumb crumbfirst"><a href="{% url dinette_category %}">Djorum Forums</a></span> <span class="crumb"><span> »&#160;</span><a href="{{ topic.category.get_absolute_url }}">{{ topic.category.name }}</a></span> <span class="crumb crumblast"><span> »&#160;</span><a href="{{ topic.get_absolute_url }}">{{ topic.subject }} </a></span>
&nbsp; &nbsp;
<a href="" onclick="return isUserAuthenticated(1)">Post Reply</a> &nbsp; &nbsp;
{% if reply_list.has_next %}
- <a href="{% url djorum_reply_detail topic.id reply_list.next_page_number %}"> Next </a>
+ <a href="{% url dinette_reply_detail topic.id reply_list.next_page_number %}"> Next </a>
{% endif %}
{% if reply_list.has_previous %}
- <a href="{% url djorum_reply_detail topic.id reply_list.previous_page_number %}"> Previous </a>
+ <a href="{% url dinette_reply_detail topic.id reply_list.previous_page_number %}"> Previous </a>
{% endif %} &nbsp;
@@ -76,7 +76,7 @@
<div class="main-head">
- <p class="options"><span class="feed first-item"><a class="feed-option" href="{% url djorum_topic_url topic.getTopicString %}">RSS Topic Feed</a></span></p> <h2 class="hn"><span><span class="item-info">Posts </span></span></h2>
+ <p class="options"><span class="feed first-item"><a class="feed-option" href="{% url dinette_topic_url topic.getTopicString %}">RSS Topic Feed</a></span></p> <h2 class="hn"><span><span class="item-info">Posts </span></span></h2>
</div>
<div id="replylist" class="main-content main-topic">
@@ -185,7 +185,7 @@ <h4 id="pc120560" class="entry-title hn">Re: {{reply.topic.subject}}</h4>
</div>
<div id="formbox" class="magicbox">
- <form action="{% url djorum_postreply %}" method="POST" id="fpostreply" >
+ <form action="{% url dinette_postreply %}" method="POST" id="fpostreply" >
<table>
<tbody>
{{ replyform.as_table }}
@@ -230,7 +230,7 @@ <h4 id="pc120560" class="entry-title hn">Re: {{reply.topic.subject}}</h4>
<div class="hr"><hr /></div>
<div id="brd-about" class="gen-content">
- <p id="copyright">Powered by <strong><a href="{% url djorum_category %}">Djorum</a></strong></p>
+ <p id="copyright">Powered by <strong><a href="{% url dinette_category %}">Djorum</a></strong></p>
<p id="extensions-used">Copyright &copy; 2008 <a href="/">Usware</a></p>
</div>
@@ -1,7 +1,7 @@
<div id="topic20475" class="main-item odd main-first-item normal">
<span class="icon normal"><!-- --></span>
<div class="item-subject">
- <h3 class="hn"><span class="item-num">1</span> <a href="{% url djorum_topic_detail topic.id %}">{{topic.subject}} </a> </h3>
+ <h3 class="hn"><span class="item-num">1</span> <a href="{% url dinette_topic_detail topic.id %}">{{topic.subject}} </a> </h3>
&nbsp; <span class="item-starter">by <cite>{{topic.posted_by.username}}</cite></span>
</div>
@@ -3,7 +3,7 @@
{% block content %}
{% for topic in topic_list %}
-<a href="{% url djorum_topic_detail topic.id %}">{{topic}}<a>
+<a href="{% url dinette_topic_detail topic.id %}">{{topic}}<a>
{% endfor %}
{% endblock %}
View
@@ -11,19 +11,19 @@
urlpatterns = patterns('dinette.views',
- url(r'^$','indexPage',name='djorum_category'),
- url(r'^category(?P<categoryid>\d+)/topics/$','welcomePage', name='djorum_index'),
- url(r'^category(?P<categoryid>\d+)/topics/page(?P<pageno>\d+)/$','welcomePage', name='djorum_index2'),
- url(r'^post/topic/$','postTopic', name='djorum_posttopic'),
- url(r'^post/reply/$','postReply', name='djorum_postreply'),
- url(r'^topics/list/$','topic_list', name='djorum_topic_list'),
- url(r'^topics/detail/(?P<topic_id>\d+)/$','topic_detail', name='djorum_topic_detail'),
- url(r'^topics/detail/(?P<topic_id>\d+)/page(?P<pageno>\d+)/$','topic_detail', name='djorum_reply_detail'),
+ url(r'^$','indexPage',name='dinette_category'),
+ url(r'^category(?P<categoryid>\d+)/topics/$','welcomePage', name='dinette_index'),
+ url(r'^category(?P<categoryid>\d+)/topics/page(?P<pageno>\d+)/$','welcomePage', name='dinette_index2'),
+ url(r'^post/topic/$','postTopic', name='dinette_posttopic'),
+ url(r'^post/reply/$','postReply', name='dinette_postreply'),
+ url(r'^topics/list/$','topic_list', name='dinette_topic_list'),
+ url(r'^topics/detail/(?P<topic_id>\d+)/$','topic_detail', name='dinette_topic_detail'),
+ url(r'^topics/detail/(?P<topic_id>\d+)/page(?P<pageno>\d+)/$','topic_detail', name='dinette_reply_detail'),
)
urlpatterns += patterns('',
- url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed' , {'feed_dict': feeds},name='djorum_feed_url') ,
- url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed' , {'feed_dict': feeds},name='djorum_topic_url')
+ url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed' , {'feed_dict': feeds},name='dinette_feed_url') ,
+ url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed' , {'feed_dict': feeds},name='dinette_topic_url')
)
View
@@ -9,15 +9,15 @@ built with or by Django it is going to be superb.
Overview.
===========
-Djorum is a forum built with Django. It uses the PunBB philosophy of being lightweight, but functional. Additionaly
+Dinette is a forum built with Django. It uses the PunBB philosophy of being lightweight, but functional. Additionaly
it takes
the HTML wholesale from PunBB. Like PunBB, it is GPL licensed.
Why Another?
================
There are a lot of existing forum applications for Django, so why another.
In our belief, there is no forum application, (Apart from that bundled with Ellington)
-of quality comparable to that available to PHP. Djorum is not there yet, but Usware plan
+of quality comparable to that available to PHP. Djorum is not there yet, but Usware plans
to provide long term support for it,
and continue to develop this depending on community support.
View
@@ -7,7 +7,8 @@
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
-DATABASE_OPTIONS = {"init_command": "SET storage_engine=INNODB"} #database engine to use when create tables via models
+if DATABASE_ENGINE == 'mysql':
+ DATABASE_OPTIONS = {"init_command": "SET storage_engine=INNODB"} #database engine to use when create tables via models
SECRET_KEY = ''
View
@@ -63,7 +63,7 @@
'dinette.middleware.UserActivity',
)
-ROOT_URLCONF = 'djorum.urls'
+ROOT_URLCONF = 'forumproject.urls'
TEMPLATE_DIRS = (
os.path.join(SITE_ROOT, 'templates'),

0 comments on commit 445a796

Please sign in to comment.