-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
215 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
{% load staticfiles %} | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<title>{% block title %}{% endblock %}</title> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"> | ||
</head> | ||
<body> | ||
{% block content %}{% endblock %} | ||
{% block nav %}{% endblock %} | ||
<div class="container"> | ||
{% block content %}{% endblock %} | ||
</div> | ||
<footer> | ||
{% block footer %}{% endblock %} | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% load dedal_tags %} | ||
|
||
{% block nav %} | ||
<nav class="navbar navbar-inverse navbar"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<a class="navbar-brand" href="{% url 'dedal_main' %}">Django Dedal</a> | ||
</div> | ||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | ||
<ul class="nav navbar-nav"> | ||
{% for item in models %} | ||
<li{% if model|repr == item|repr %} class="active"{% endif %}> | ||
<a href="{% crud item 'list' %}"> | ||
{{ item|verbose_name_plural|title }} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
{% extends 'dedal/base.html' %} | ||
|
||
{% load i18n dedal_tags %} | ||
{% load i18n dedal_tags bootstrap %} | ||
|
||
{% block content %} | ||
<form method="POST"> | ||
<form role="form" method="POST"> | ||
<legend>{% block legend_title %}{% endblock %}</legend> | ||
{% csrf_token %} | ||
{{ form }} | ||
<button>{% block button_label %}{% endblock %}</button> | ||
<a href="{% crud model 'list' %}">{% trans 'Cancel' %}</a> | ||
{{ form|bootstrap }} | ||
<button class="btn btn-success">{% block button_label %}{% endblock %}</button> | ||
<a class="btn btn-danger" href="javascript:history.back()">{% trans 'Cancel' %}</a> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends 'dedal/base.html' %} | ||
|
||
{% load i18n dedal_tags %} | ||
|
||
{% block content %} | ||
<h2> | ||
{% trans 'Model list' %} | ||
</h2> | ||
<ul class="list-group"> | ||
{% for model in models %} | ||
<li class="list-group-item"> | ||
<a href="{% crud model 'list' %}">{{ model|verbose_name_plural|title }}</a> | ||
<div class="pull-right"> | ||
<a class="btn btn-success btn-xs" href="{% crud model 'create' %}" title="{% blocktrans %}Create {{ verbose_name }}{% endblocktrans %}"> | ||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> | ||
</a> | ||
</div> | ||
</li> | ||
{% empty %} | ||
<p>{% trans 'Nothing to display.' %}</p> | ||
{% endfor %} | ||
</ul> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.4 on 2016-03-25 19:16 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blog', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Comment', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('author', models.CharField(max_length=25)), | ||
('email', models.EmailField(max_length=254)), | ||
('www', models.URLField()), | ||
('body', models.TextField()), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.4 on 2016-03-25 19:18 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blog', '0002_comment'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='post', | ||
name='comments', | ||
field=models.ManyToManyField(to='blog.Comment'), | ||
), | ||
migrations.AlterField( | ||
model_name='comment', | ||
name='www', | ||
field=models.URLField(help_text='Enter address to your website.', verbose_name='Website'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% extends 'dedal/base.html' %} | ||
|
||
{% block nav %} | ||
{{ block.super }} | ||
<a href="https://github.com/you"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a> | ||
{% endblock %} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.