Commit 6fa591f2 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Merge branch 'master' of https://code.grnet.gr/git/astakos

parents 148b0cde dbe090ba
......@@ -56,7 +56,7 @@ from django.core.urlresolvers import reverse
from django.contrib import messages
from django.db import transaction
from django.contrib.auth.models import AnonymousUser
from django.contrib.sites.models import get_current_site
from django.contrib.sites.models import Site
from astakos.im.models import AstakosUser, Invitation
from astakos.im.util import isoformat, get_or_create_user, get_context
......@@ -309,7 +309,7 @@ def pending_users(request, template_name='pending_users.html', extra_context={})
def _send_greeting(request, user, template_name):
url = reverse('astakos.im.views.index')
subject = _('Welcome to %s' %settings.SERVICE_NAME)
site = get_current_site(request)
site = Site.objects.get_current()
baseurl = request.build_absolute_uri('/').rstrip('/')
message = render_to_string(template_name, {
'user': user,
......
......@@ -38,6 +38,7 @@ from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.utils.translation import ugettext as _
from django.contrib.auth.forms import UserCreationForm
from django.contrib.sites.models import Site
from django.contrib import messages
from smtplib import SMTPException
......@@ -191,7 +192,7 @@ class SimpleBackend(object):
return status, message
def _send_verification(request, user, template_name):
site = get_current_site(request)
site = Site.objects.get_current()
baseurl = request.build_absolute_uri('/').rstrip('/')
url = settings.ACTIVATION_LOGIN_TARGET % (baseurl,
quote(user.auth_token),
......@@ -204,4 +205,4 @@ class SimpleBackend(object):
'support': settings.DEFAULT_CONTACT_EMAIL})
sender = settings.DEFAULT_FROM_EMAIL
send_mail('Pithos account activation', message, sender, [user.email])
logging.info('Sent activation %s', user)
\ No newline at end of file
logging.info('Sent activation %s', user)
......@@ -3,8 +3,8 @@
"model": "sites.site",
"pk": 1,
"fields": {
"domain": "http://localhost:8000/im",
"name": "Astakos"
"domain": "https://pithos.dev.grnet.gr/im",
"name": "Pithos"
}
}
]
......@@ -57,7 +57,7 @@ from django.core.urlresolvers import reverse
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.models import AnonymousUser
from django.contrib.auth.decorators import login_required
from django.contrib.sites.models import get_current_site
from django.contrib.sites.models import Site
from django.contrib import messages
from django.db import transaction
from django.contrib.auth.forms import UserCreationForm
......@@ -113,7 +113,7 @@ def _generate_invitation_code():
def _send_invitation(request, baseurl, inv):
subject = _('Invitation to Astakos')
site = get_current_site(request)
site = Site.objects.get_current()
url = settings.SIGNUP_TARGET % (baseurl, inv.code, quote(site.domain))
message = render_to_string('invitation.txt', {
'invitation': inv,
......
from log import LoggingConfigMiddleware
from secure import SecureMiddleware
from auth import AuthMiddleware
Administrator Guide
===================
manage syncdb
change django_site record
SITE_ID setting
migrate
create twitter application
Administrator Guide
===================
......@@ -40,4 +32,4 @@ Setup the files::
It is advised that you create a ``settings.local`` file to place any configuration overrides (at least change ``SECRET_KEY``).
Twitter Setup
-------------
\ No newline at end of file
-------------
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment