Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home page at full funtionality #33

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4fb9d98
Delete logout.html
derek-hoogewerf Apr 15, 2020
063246a
Update index.html
derek-hoogewerf May 7, 2020
c191324
created app contact
derek-hoogewerf May 7, 2020
1655719
Update index.html
derek-hoogewerf Sep 12, 2020
8c27e41
Update databases
derek-hoogewerf Sep 12, 2020
88923d9
Add images to pics
derek-hoogewerf Sep 12, 2020
772aa08
Update workflow
derek-hoogewerf Sep 12, 2020
e00fc60
Create bug_report.md
derek-hoogewerf Sep 12, 2020
adcb1c5
Create workspace.xml
derek-hoogewerf Sep 12, 2020
d99ff96
Create blank.yml
derek-hoogewerf Sep 12, 2020
96c543a
Create feature_request.md
derek-hoogewerf Sep 12, 2020
59f29b8
Update workflow
derek-hoogewerf Sep 12, 2020
e4bea32
Update resgister
derek-hoogewerf Sep 12, 2020
17a8d66
Update register.html
derek-hoogewerf Sep 12, 2020
d932072
Add templates
derek-hoogewerf Sep 13, 2020
6e62eef
Create about.html
derek-hoogewerf Sep 13, 2020
2d0e423
Create news.html
derek-hoogewerf Sep 13, 2020
d665163
Update views.py
derek-hoogewerf Sep 13, 2020
e0710a6
Update urls.cpython-38.pyc
derek-hoogewerf Sep 13, 2020
09ede4d
Create mumhai_dump.sql
derek-hoogewerf Sep 13, 2020
3055ee7
Update urls.py
derek-hoogewerf Sep 13, 2020
6b27383
Update views.cpython-38.pyc
derek-hoogewerf Sep 13, 2020
d12c2f5
Update urls.cpython-38.pyc
derek-hoogewerf Sep 13, 2020
2b2e148
Update urls.py
derek-hoogewerf Sep 13, 2020
2014828
Update urls.cpython-38.pyc
derek-hoogewerf Sep 13, 2020
1aa2ea3
Update urls.py
derek-hoogewerf Sep 13, 2020
a31ddc4
Update views.cpython-38.pyc
derek-hoogewerf Sep 13, 2020
a8da8f0
Update views.py
derek-hoogewerf Sep 13, 2020
7456731
Update register.html
derek-hoogewerf Sep 13, 2020
d6c2e4f
Merge branch 'master' into current
derek-hoogewerf Sep 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified mumhai/accounts/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified mumhai/accounts/__pycache__/views.cpython-38.pyc
Binary file not shown.
7 changes: 4 additions & 3 deletions mumhai/accounts/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from . import views

urlpatterns=[
path('register', views.register, name='register'), #or use '/'
path('login', views.login, name="login"),
path('logout', views.logout, name='logout')
path('register', views.register, name='register'), # or use '/'
path('login', views.login, name='login'),
path('logout', views.logout, name='logout'),

]
11 changes: 8 additions & 3 deletions mumhai/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def register(request):
first_name = request.POST['first_name']
last_name = request.POST['last_name']
username = request.POST['username']
password = request.POST['password']
password1 = request.POST['password1']
password2 = request.POST['password2']
email = request.POST['email']

if User.objects.filter(username=username).exists():
Expand All @@ -32,13 +33,17 @@ def register(request):
elif User.objects.filter(email=email).exists():
messages.info(request, 'email already registered')
return redirect('register')
elif password1 != password2:
messages.info(request, 'Passwords don\'t match. Please re-enter passwords')
return redirect('register')
else:
user = User.objects.create_user(username=username, password=password, email=email, first_name=first_name, last_name=last_name)
user = User.objects.create_user(username=username, password=password1, email=email, first_name=first_name, last_name=last_name)
user.save();
print('user created')
print('User Created')
return render(request, 'login')
else:
return render(request, 'register.html')


def logout(request):
auth.logout(request);
Expand Down
Empty file added mumhai/contact/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions mumhai/contact/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 mumhai/contact/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class ContactConfig(AppConfig):
name = 'contact'
Empty file.
3 changes: 3 additions & 0 deletions mumhai/contact/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 mumhai/contact/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.
3 changes: 3 additions & 0 deletions mumhai/contact/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Binary file modified mumhai/home/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified mumhai/home/__pycache__/views.cpython-38.pyc
Binary file not shown.
6 changes: 4 additions & 2 deletions mumhai/home/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from os import name
from django.urls import path
from . import views

urlpatterns=[

path('',views.index, name='index'), #or use '/' depending on version
path('add',views.add, name='add'),
path('',views.index, name='index'), #or use '/' depending on version
# path('add',views.add, name='add'),
# path('news',views.add, name='news'),
]
8 changes: 6 additions & 2 deletions mumhai/home/views.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
from django.shortcuts import render
from django.http import request
from django.shortcuts import redirect, render
from django.http import HttpResponse
from .models import Destination

# Create your views here.
"""
def add(request):
val1=int(request.POST['n1'])
val2=int(request.POST['n2'])
res=val1+val2

return render(request, 'result.html', {'result':res})
"""

def index(request):

dests = Destination.objects.all();

return render(request, "index.html", {'dests': dests})



Binary file added mumhai/media/pics/destination_1_HX6Wu1Y.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_2_2CkuogZ.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_3_UzTuRzV.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_4_3AgjP2w.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_5_JJfbrzN.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_6_2JcqxqS.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_7_2e5qDfp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_8_Z7CdY7U.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mumhai/media/pics/destination_9_Ssq7VUA.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mumhai/mumhai/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file modified mumhai/mumhai/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file modified mumhai/mumhai/__pycache__/wsgi.cpython-38.pyc
Binary file not shown.
Loading