# Path: seo_link/models.py
# class TestUrl(models.Model):
#     test_url = models.CharField(editable=True, blank=False, max_length=1024)
#     created_at = models.DateTimeField(editable=False, blank=False)
#     tested_at = models.DateTimeField(editable=False, blank=True, null=True)
#     
#     class Meta:
#         verbose_name = _('TestUrl')
#         verbose_name_plural = _('TestUrls')
#         
#     def save(self,**kwargs):
#         """
#         Automatic update the created_at date time
#         """
#         if not self.id:
#             self.created_at = datetime.now()
#         super(TestUrl, self).save(**kwargs)
#         
#     def __unicode__(self):
#         return u"".join(self.test_url)
# 
# Path: seo_link/settings.py
# NO_PROCESSING_GET_PARAM = getattr(django_settings, 'SEO_LINK_NO_PROCESSING_GET_PARAM' ,  'no_seo_link')
# 
# PREVIEW_TEST_URL_PREFIX = getattr(django_settings, 'SEO_LINK_PREVIEW_TEST_URL_PREFIX' ,  "http://localhost:8000")


from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from seo_link.models import TestUrl
from seo_link.settings import NO_PROCESSING_GET_PARAM, PREVIEW_TEST_URL_PREFIX
# -*- coding: utf-8 -*-





def login_required(func):
    
    def wrapped(request, *args, **kwargs):
        if not request.user.is_authenticated():
            return HttpResponseRedirect(reverse('admin-login'))
            
        return func(request, *args, **kwargs)
    wrapped.__doc__ = func.__doc__
    wrapped.__name__ = func.__name__
    return wrapped


def preview_url(request,test_url_id):
    test_url=u"" 
    test_url_no_processing =u""
    sep = u"?"

# Path: seo_link/models.py
# class TestUrl(models.Model):
#     test_url = models.CharField(editable=True, blank=False, max_length=1024)
#     created_at = models.DateTimeField(editable=False, blank=False)
#     tested_at = models.DateTimeField(editable=False, blank=True, null=True)
#     
#     class Meta:
#         verbose_name = _('TestUrl')
#         verbose_name_plural = _('TestUrls')
#         
#     def save(self,**kwargs):
#         """
#         Automatic update the created_at date time
#         """
#         if not self.id:
#             self.created_at = datetime.now()
#         super(TestUrl, self).save(**kwargs)
#         
#     def __unicode__(self):
#         return u"".join(self.test_url)
# 
# Path: seo_link/settings.py
# NO_PROCESSING_GET_PARAM = getattr(django_settings, 'SEO_LINK_NO_PROCESSING_GET_PARAM' ,  'no_seo_link')
# 
# PREVIEW_TEST_URL_PREFIX = getattr(django_settings, 'SEO_LINK_PREVIEW_TEST_URL_PREFIX' ,  "http://localhost:8000")


# Path: seo_link/admin/views.py
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponseForbidden
from django.shortcuts import render_to_response
from django.template.context import RequestContext
from seo_link.models import TestUrl
from seo_link.settings import NO_PROCESSING_GET_PARAM, PREVIEW_TEST_URL_PREFIX

# -*- coding: utf-8 -*-





def login_required(func):
    
    def wrapped(request, *args, **kwargs):
        if not request.user.is_authenticated():
            return HttpResponseRedirect(reverse('admin-login'))
            
        return func(request, *args, **kwargs)
    wrapped.__doc__ = func.__doc__
    wrapped.__name__ = func.__name__
    return wrapped


def preview_url(request,test_url_id):
    test_url=u"" 
    test_url_no_processing =u""
    sep = u"?"

    test_url_obj = TestUrl.objects.get(id=test_url_id)