{{ article.title }}
+
+ Article by {{ article.owner.username }}, {{ article.date_published }}
{{ article.text | safe }}
+
diff --git a/articles/__init__.py b/articles/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/monerojnet/admin.py b/articles/admin.py similarity index 100% rename from monerojnet/admin.py rename to articles/admin.py diff --git a/articles/apps.py b/articles/apps.py new file mode 100644 index 0000000..6318648 --- /dev/null +++ b/articles/apps.py @@ -0,0 +1,4 @@ +from django.apps import AppConfig + +class ArticlesConfig(AppConfig): + name = 'articles' diff --git a/articles/forms.py b/articles/forms.py new file mode 100644 index 0000000..c71c4ff --- /dev/null +++ b/articles/forms.py @@ -0,0 +1,7 @@ +from articles.models import * +from django import forms + +class ArticleForm(forms.ModelForm): + class Meta: + model = Article + fields = ['title', 'subtitle', 'thumbnail', 'text'] diff --git a/articles/models.py b/articles/models.py new file mode 100644 index 0000000..4371ddc --- /dev/null +++ b/articles/models.py @@ -0,0 +1,24 @@ +from django.db import models +from django.contrib.auth.models import User + +# Create your models here. +class Article(models.Model): + owner = models.ForeignKey(User, on_delete=models.CASCADE) + date_added = models.DateTimeField(auto_now_add=True) + date_updated = models.DateField(null=True, blank=True) + date_published = models.DateField(null=True, blank=True) + author = models.CharField(max_length=50) + status = models.CharField(max_length=20) + review = models.TextField(null=True, blank=True) + url = models.CharField(max_length=200) + #formular + title = models.CharField(max_length=150) + subtitle = models.CharField(max_length=100) + thumbnail = models.CharField(max_length=100) + text = models.TextField() + + class Meta: + verbose_name_plural = 'articles' + + def __str__(self): + return self.title \ No newline at end of file diff --git a/articles/templates/articles/article.html b/articles/templates/articles/article.html new file mode 100644 index 0000000..c34dd00 --- /dev/null +++ b/articles/templates/articles/article.html @@ -0,0 +1,115 @@ +{% extends "users/base.html" %} +{% block header %} + +
{{ article.text | safe}}
+
+ Article by {{ article.owner.username }}, {{ article.date_published }}
{{ article.text | safe }}
+
{{ article.text | safe }}
+
+ Article by {{ article.owner.username }}, {{ article.date_published }}
{{ article.text | safe }}
+
{{ article.text | safe }}
+Images were taken from https://monero.graphics/ under CC BY-SA 4.0 license, check their work and donate them some Moneroj.
+monero-cat-untraceable
+monero-geometric-logo
+monero-is-the-best-regardless-sticker
+monero-mining-4-privacy
+monero-support-your-local-cypherpunk
+monero-the-corrupt-fear-us
+monero-trace
+monero-will-survive-tyranny-sticker
+monero-you-need-no-portfolio
+price-action
+private-by-default
+private-electronic-money
+stats
+ussse-monero
+why-speculate
+All fields are required. Write on a notepad and save locally your article before submitting, otherwise you might + lose all your work. Use simple sentences for the Subtitle, five words at maximum. Select any thumbnail image, + this serves only as a decoration for the article, it doesn't have to be related to the article. + You can use HTML tags to format the article: +
Title | +Created | +Updated | +Published | +Status | +View |
+ Edit |
+ Delete |
+
---|---|---|---|---|---|---|---|
{{ article.title }} | +{{ article.date_added }} | +{{ article.date_updated }} | +{{ article.date_published }} | +{{ article.status }} | +
+
+ X
+
+ |
+
+
+ X
+
+
+ |
+
+
+
+ X
+
+
+
+
+ |
+
Title | +Created | +Updated | +Published | +Status | +View |
+ Publish |
+ Review |
+
---|---|---|---|---|---|---|---|
{{ review.title }} | +{{ review.date_added }} | +{{ review.date_updated }} | +{{ review.date_published }} | +{{ review.status }} | +
+
+ X
+
+ |
+
+
+ X
+
+ |
+
+
+ X
+
+ |
+
+
Title | +Writer | +Created | +Updated | +Status | +View |
+ Publish |
+ Review |
+ Delete |
+
---|---|---|---|---|---|---|---|---|
{{ review.title }} | +{{ review.owner.username }} | +{{ review.date_added }} | +{{ review.date_updated }} | +{{ review.status }} | +
+
+ X
+
+ |
+
+
+ X
+
+ |
+
+
+ X
+
+
+ |
+
+
+
+ X
+
+
+
+
+ |
+
Title | +Writer | +Created | +Updated | +Status | +View |
+ Delete |
+
---|---|---|---|---|---|---|
{{ publish.title }} | +{{ publish.owner.username }} | +{{ publish.date_added }} | +{{ publish.date_updated }} | +{{ publish.status }} | +
+
+ X
+
+ |
+
+
+
+ X
+
+
+
+
+ |
+