Skip to content

Commit

Permalink
create app
Browse files Browse the repository at this point in the history
  • Loading branch information
gothack329 committed Feb 23, 2018
1 parent 6c20f5a commit e7a4ae8
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 3 deletions.
Empty file added article/__init__.py
Empty file.
Binary file added article/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added article/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file added article/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file added article/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file added article/__pycache__/views.cpython-36.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions article/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions article/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class ArticleConfig(AppConfig):
name = 'article'
Empty file added article/migrations/__init__.py
Empty file.
Binary file not shown.
3 changes: 3 additions & 0 deletions article/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions article/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
7 changes: 7 additions & 0 deletions article/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.contrib import admin
from django.urls import path
from article.views import *

urlpatterns = [
path(r'', article),
]
9 changes: 9 additions & 0 deletions article/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django.shortcuts import render
from django.http import HttpResponse,HttpResponseRedirect
from django.template import RequestContext,Template,Context,loader,defaultfilters
from django.shortcuts import render_to_response

# Create your views here.

def article(request):
return HttpResponse('<p>Test</p>')
Binary file modified db.sqlite3
Binary file not shown.
Binary file modified edconline/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file modified edconline/__pycache__/urls.cpython-36.pyc
Binary file not shown.
2 changes: 2 additions & 0 deletions edconline/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
'xadmin',
'crispy_forms',
'reversion',

'article',
]

MIDDLEWARE = [
Expand Down
11 changes: 8 additions & 3 deletions edconline/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path,include
import xadmin
xadmin.autodiscover()

from xadmin.plugins import xversion
import article

admin.autodiscover()

xadmin.autodiscover()
xversion.register_models()


urlpatterns = [
path('admin/', admin.site.urls),
path(r'xadmin/', xadmin.site.urls),
path(r'article/', include('article.urls')),
]

0 comments on commit e7a4ae8

Please sign in to comment.