get railshosting running

Signed-off-by: Nico Schottelius <nico@wurzel.schottelius.org>
This commit is contained in:
Nico Schottelius 2015-05-27 15:41:43 +02:00
parent 96f31ed380
commit 6aaa04eaa2
80 changed files with 63 additions and 53 deletions

View file

@ -40,7 +40,8 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'digital_glarus'
'digital_glarus',
'railshosting',
)
MIDDLEWARE_CLASSES = (
@ -51,8 +52,8 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
# 'django.middleware.security.SecurityMiddleware',
ROOT_URLCONF = 'dynamicweb.urls'
@ -107,6 +108,6 @@ STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
try:
from .settings_local import *
from .local.local_settings import *
except ImportError as e:
pass

View file

@ -8,4 +8,5 @@ urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^digital.glarus/', include('digital_glarus.urls', namespace="digital_glarus")),
url(r'^railshosting/', include('railshosting.urls', namespace="railshosting")),
]

View file

@ -1,6 +1,6 @@
from django.db import models
class RailsBetaUSer(models.Model):
class RailsBetaUser(models.Model):
email = models.EmailField(unique=True)
received_date = models.DateTimeField('date received')

View file

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 280 KiB

View file

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View file

Before

Width:  |  Height:  |  Size: 9 KiB

After

Width:  |  Height:  |  Size: 9 KiB

View file

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 394 KiB

View file

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 394 KiB

View file

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

Before

Width:  |  Height:  |  Size: 548 KiB

After

Width:  |  Height:  |  Size: 548 KiB

View file

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 272 KiB

View file

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

View file

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 778 KiB

After

Width:  |  Height:  |  Size: 778 KiB

View file

Before

Width:  |  Height:  |  Size: 327 KiB

After

Width:  |  Height:  |  Size: 327 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 185 KiB

View file

Before

Width:  |  Height:  |  Size: 618 KiB

After

Width:  |  Height:  |  Size: 618 KiB

View file

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View file

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 246 KiB

View file

Before

Width:  |  Height:  |  Size: 549 KiB

After

Width:  |  Height:  |  Size: 549 KiB

View file

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 333 KiB

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

Before

Width:  |  Height:  |  Size: 346 KiB

After

Width:  |  Height:  |  Size: 346 KiB

View file

Before

Width:  |  Height:  |  Size: 354 KiB

After

Width:  |  Height:  |  Size: 354 KiB

View file

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 313 KiB

View file

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

@ -1,3 +1,5 @@
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
@ -12,15 +14,15 @@
<title>Rails Hosting.ch - Ruby on Rails as easy as possible</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="{% static 'railshosting/css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/landing-page.css" rel="stylesheet">
<link href="{% static 'railshosting/css/landing-page.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="{% static 'railshosting/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{% static 'railshosting/img/favicon.ico' %}" type="image/x-icon" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@ -44,25 +46,25 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand topnav" href="#"><img src="img/logo_black.svg"></a>
<a class="navbar-brand topnav" href="#"><img src="{% static 'railshosting/img/logo_black.svg' %}"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#how">How it works</a>
<a href="{% url 'railshosting:index' %}#how">How it works</a>
</li>
<li>
<a href="#your">Your infrastructure</a>
<a href="{% url 'railshosting:index' %}#your">Your infrastructure</a>
</li>
<li>
<a href="#our">Our inftrastructure</a>
<a href="{% url 'railshosting:index' %}#our">Our inftrastructure</a>
</li>
<li>
<a href="#price">Pricing</a>
<a href="{% url 'railshosting:index' %}#price">Pricing</a>
</li>
<li>
<a href="#contact">Contact</a>
<a href="{% url 'railshosting:index' %}#contact">Contact</a>
</li>
</ul>
</div>
@ -78,7 +80,7 @@
<div class="container">
<div class=".col-md-6">
<div class="intro-message"><img src="img/checkmark.png" class="responsive">
<div class="intro-message"><img src="{% static 'railshosting/img/checkmark.png' %}" class="responsive">
<p>Thank you for your interest in joining Rails-Hosting Beta.<br>
    We will come back to you shortly to give you access to our  infrastructure.
</p>
@ -103,24 +105,24 @@
<div class="col-lg-12">
<ul class="list-inline">
<li>
<a href="#">Home</a>
<a href="{% url 'railshosting:index' %}">Home</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#about">How it works</a></li>
<a href="{% url 'railshosting:index' %}#how">How it works</a></li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#about">Your infrastructure</a></li>
<a href="{% url 'railshosting:index' %}#your">Your infrastructure</a></li>
<li>&sdot;</li>
<li>
<a href="#about">Our infrastructure</a></li>
<a href="{% url 'railshosting:index' %}#our">Our infrastructure</a></li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#services">Pricing</a>
<a href="{% url 'railshosting:index' %}#price">Pricing</a>
</li>
<li class="footer-menu-divider">&sdot;</li>
<li>
<a href="#contact">Contact</a>
<a href="{% url 'railshosting:index' %}#contact">Contact</a>
</li>
</ul>
<p class="copyright text-muted small">Copyright &copy; ungleich GmbH 2015. All Rights Reserved</p>
@ -130,10 +132,10 @@
</footer>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<script src="{% static 'railshosting/js/jquery.js' %}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="{% static 'railshosting/js/bootstrap.min.js' %}"></script>
</body>

View file

@ -1,3 +1,5 @@
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
@ -12,15 +14,15 @@
<title>Rails Hosting.ch - Ruby on Rails as easy as possible</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="{% static 'railshosting/css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/landing-page.css" rel="stylesheet">
<link href="{% static 'railshosting/css/landing-page.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="{% static 'railshosting/font-awesome/css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{% static 'railshosting/img/favicon.ico' %}" type="image/x-icon" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@ -44,7 +46,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand topnav" href="#"><img src="img/logo_black.svg"></a>
<a class="navbar-brand topnav" href="#"><img src="{% static 'railshosting/img/logo_black.svg' %}"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
@ -81,7 +83,7 @@
<div class="col-lg-12">
<div class="intro-message">
<img class="responsive" src="img/Beta.png">
<img class="responsive" src="{% static 'railshosting/img/Beta.png' %}">
<h1>Rails-Hosting.ch</h1>
<h3>Ruby on Rails as easy as possible</h3>
<hr class="intro-divider">
@ -124,7 +126,7 @@
</li></ul>
</div>
<div class="col-lg-5 col-sm-pull-6 col-sm-6">
<img class="img-responsive" src="img/how3.png" alt="">
<img class="img-responsive" src="{% static 'railshosting/img/how3.png' %}" alt="">
</div>
</div>
@ -143,7 +145,7 @@
<p class="lead">We configure your own infrastructure for Ruby on Rails. Keep the comfort and safety of being at your home, while we set things up for you.</p>
</div>
<div class="col-lg-5 col-lg-offset-2 col-sm-6">
<img class="img-responsive" src="img/home.png" alt="">
<img class="img-responsive" src="{% static 'railshosting/img/home.png' %}" alt="">
</div>
</div>
@ -166,7 +168,7 @@
<p class="lead">We take care of everything for you! You don't need your infrastructure. We give you everything you need in Ruby on Rails hosting. Full root access, 24x7 support.</p>
</div>
<div class="col-lg-5 col-sm-pull-6 col-sm-6">
<img class="img-responsive" src="img/dog.png" alt="">
<img class="img-responsive" src="{% static 'railshosting/img/dog.png' %}" alt="">
</div>
</div>
@ -199,7 +201,7 @@
<div class="col-md-3 col-sm-6 hero-feature">
<div class="thumbnail">
<img class="relsonsive" src="img/economy.jpg" alt="">
<img class="relsonsive" src="{% static 'railshosting/img/economy.jpg' %}" alt="">
<div class="caption">
<h3>Economy </h3>
<p>Suited for smaller applications </p>
@ -214,7 +216,7 @@
<div class="col-md-3 col-sm-6 hero-feature">
<div class="thumbnail">
<img class="relsonsive" src="img/standardroom.jpg" alt="">
<img class="relsonsive" src="{% static 'railshosting/img/standardroom.jpg' %}" alt="">
<div class="caption">
<h3>Standard</h3>
<p>Suited for standard Ruby on Rails applications</p>
@ -230,7 +232,7 @@
<div class="col-md-3 col-sm-6 hero-feature">
<div class="thumbnail">
<img class="reponsive" src="img/deluxeroom.jpg" alt="">
<img class="reponsive" src="{% static 'railshosting/img/deluxeroom.jpg' %}" alt="">
<div class="caption">
<h3>Deluxe</h3>
<p>Suited for performance critical project</p>
@ -245,7 +247,7 @@
<div class="col-md-3 col-sm-6 hero-feature">
<div class="thumbnail">
<img class="responsive" src="img/presidentialroom.jpg" alt="">
<img class="responsive" src="{% static 'railshosting/img/presidentialroom.jpg' %}" alt="">
<div class="caption">
<h3>Presidential Premium</h3>
<p> Suited for performance critical &amp; </p>
@ -279,10 +281,14 @@
<h1>Let me try!</h1>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form class="form-inline">
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
{{ form.non_field_errors }}
{{ form.email.errors }}
<form action="{% url 'railshosting:index' %}" method="post" role="form" class="form-inline">
{% csrf_token %}
<div class="form-group">
<label class="sr-only" for="exampleInputEmail3">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail3" placeholder="Enter email">
<label class="sr-only" for="email">Email address</label>
<input type="email" name="email" class="form-control" id="id_email" placeholder="Enter email">
</div>
<button type="submit" class="btn btn-default">Request Beta Access</button>
</form>
@ -363,10 +369,10 @@
</footer>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<script src="{% static 'railshosting/js/jquery.js' }"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="{% static 'railshosting/js/bootstrap.min.js' %}"></script>
</body>

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -14,20 +14,20 @@ class RailsBetaUserForm(ModelForm):
fields = [ 'email' ]
def index(request):
form = RailsBetaUserForm()
return render(request, 'railshosting/index.html')
def beta(request):
message = RailsBetaUser(received_date=datetime.datetime.now())
form = MessageForm(request.POST, instance=message)
context = {
'email': form,
}
email = RailsBetaUser(received_date=datetime.datetime.now())
context = {}
context['form'] = RailsBetaUserForm()
if request.method == 'POST':
form = RailsBetaUserForm(request.POST, instance=email)
context['form'] = form
if form.is_valid():
form.save()
return HttpResponseRedirect(reverse("railshosting:beta")
return HttpResponseRedirect(reverse("railshosting:beta"))
else:
context['error_message'] = "a problem"
return render(request, 'railshosting/beta.html', context)
return render(request, 'railshosting/index.html', context)
def beta(request):
return render(request, 'railshosting/beta.html')