This site is closed to the general public and as such there are instructions on How to Use
This site will provide the bride and groom with the ability to give their wedding guests all the information they need for the day and a way to accept or decline the invitation, decide which menu choices each member in the guest's party want and chose a wedding gift or gift some money. The bride and groom will have control over the guest details, the menu choices, the days' schedule and the gift list. The site will also give the bride and groom the ability to check the status of the invitations and the menu choices the guests have made which will allow the bride and groom to chase only those who have not replied or have provided details of food requirements. Finally, the bride and groom should be able to arrange the table seating based on the guests who have accepted.
Mock up Image
You can find the original website here ciara_and_sams_wedding.
When this website is being used the data it will contain will be personal information and as such comes under GDPR. To help protect this data, only the bride, groom and wedding guests will have access to the website's main functionality.
Standard websites have a register
page which can be accessed via a navigation item but to help protect the data this site does not have that navigation item.
The bride and groom need to register an account to be able to maintain the data in the various models. Normally there would be a registration navigation link but to help secure their data this link is not visible. The bride and groom will need to add /register/
to the end of the website url. This will bring up the registration page where tey will be asked to enter the STAFF_SECRET
code. Once they are registered the site will grant them is_staff
authority and they will be able to log-in and create their data.
There is a modal pop-up for each of the file upload tools (Guests, Schedule, Menu, Gifts) with instructions related to the specific upload which can be view by clicking on Upload Help
.
When a guest receives their invitation, it will contain the guest Group Id
that was created when the guest list was uploaded. The password is the known postcode for the guest at the time of uploading the guest list.
In designing this, site I want to incorporate the bride and grooms colour scheme (mint green and peach) with the rustic but romantic feel of the venue with it's open beams and stunning views across the golf course. To make it special to Ciara and Sam a photograph of them will appear on the landing page.
The colours of the site are taken from the colour scheme the bride and groom have decided on which is mint green and peach. I have chosen to make the main colour off-white to keep the site bright and airy without being stark that would come with bright white as the main colour. I initially used this and icolorpalette to create a colour palette but the colours were muted in the palette so went back to the image and selected each of the block colours to find the closest match.
The main background colour will be #FCFCF4 which is almost white and will create a bright and airy feel to the site
In order to find appropriate fonts for my website, I have visited Google Fonts to explore the various options.
For the initials of the bride and groom I will use the cursive font Lovers Quarrel, for the titles and subtitles I will use the font Italianno tbd
and for the main text I will use Nunito
<link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Italianno&family=Lovers+Quarrel&family=Nunito:wght@200&display=swap" rel="stylesheet">
font-family: 'Italianno', cursive; font-family: 'Lovers Quarrel', cursive; font-family: 'Nunito', sans-serif;
The landing page is designed to welcome the visitors and encouraging them to engage with the site. There will be an image of the bride and groom and some images and highlevel details of the ceremony and reception venues. There will be a Guests
button which will take the guests to the RSVP page.
Our Story Section A small introduction to the bride and groom with a full width carousel of images of the happy couple.
Location Section Will show some of the history of York and a map of the area.
Covid19 Section The current Covid19 restrictions will be shown here assuming they will still be needed by the date of the wedding.
Only the bride and groom need to register because the guest's login credentials will be created when the guest list is uploaded. This is why the link is very small and at the very bottom of the main page. When a user registers they will be given is_staff status.
The guests will be asked to login using a unique identifier, which will be on the wedding invitation and to confirm the postcode where the invitation was sent. From here they will automatically be taken to the RSVP page.
The first time the guest logs in, they will be asked to accept or decline the invitation and there will be the opportunity to leave a message. Subsequently the guest will have a navigation menu where they will have access to the menu, the gifts, the full venue details, the schedule of the day and useful local information. If a guest has declined the invitation they will still have access to buy a gift if they desire.
The guest's version of the menu page will have the menu options list and the names of all the guest in that party. There will also be a box under each name to give details of any allergies or special dietry requirements. Sandburn Hall have said they will do their best to accommodate all dietry requirements.
Contains some information about the church where the ceremony will be held and about the receiption venue. There will be an image of each venue and the GoogleMaps location.
This page will have details of any specific gifts the bride and groom would like where the guest wants to buy a present instead of giving the bride and groom money. There will be a donation box for the guest to gift the bride and groom money using Stripe payments
Full details of the expected schedule of the day will be details here. * time the ceremony starts
The guest list page will consist of 4 pages.
The menu maintenance page will consist of 5 pages.
The gift maintenance page will consist of 4 pages.
I used Balsamic to create wireframes for my website.
For each page I created 3 wireframes: desktop, tablet and mobile.
Some of the flow of the site was a little complex so I created a flowchart to help clarify Flowchart
is_staff
status rather than manually creating super_user accounts for the bride and groom. When a guest logs in their username will be a unique code generated by Django, which will be printed on their invitation and the postcode where the invitation was sent will act as a password, which may be different to the guest's current residence.Testing of this site can be found here in a seperate file.
As part of my unit testing, I created a [MoSCoW list of issues](MoSCoW _tasks_after_main_build.xlsx). This helps to give a clear indication of what Must
be completed to make the site work correctly and what Should
be done to give the site improved UI. The tasks desegnate as Could
have that would improve UX but not essential to the site. Items that are designated Would
like are items that would be great to have but only if everything else is completed and there is time before the project is submitted. My intention is to complete all the 'Must have
and Should have
items before looking at the Could have
and hopefully the Would like
items.
Bugs of this site can be found here in a seperate file
Once the application has been opened in a GitPod workspace there are a couple of tasks that need to be performed to be able to run the application during development.
pip3 install -r requirements.txt
needs to be run to install all the external API's the application needs to be able to run.python3 manage.py runserver
and then click the Open Browser button on port 8000. The application will appear in a separate browser tab.
N.B. to test the Stripe payment processes port 8000 needs to be made Public
. This can be done either when the command python3 manage.py runserver
is run for the first time or by clicking on the ports link in the bottom right of the IDE or selecting the ports icon on in the left side navigation which will show a list of all the ports available to the workspace. Checking the padlock will toggle the port between private and publicThese instructions are for GitHub Desktop on Windows. Other operating systems will have differences so please check.
SiobhanBaines/Ciara-and-Sams-Big-Day
pip3 install -r requirements.txt
ito insall all the API's and packages this applicaton uses. This will take a couple of minutes.env.py
file by hovering the mouse in the EXPLORER
box over the repository name and clicking on the file symbol
Before pushing to GitHub make sure env.py
is in the gitignore
file so that the secret keys remain secret and do not end up in the repository.
When everything is set up is should look like this but with your own codes.
`import osos.environ.setdefault("SECRET_KEY", "") os.environ.setdefault("STRIPE_PUBLIC_KEY", "") os.environ.setdefault("STRIPE_SECRET_KEY", "") os.environ.setdefault("STRIPE_WH_SECRET", "") os.environ.setdefault("STRIPE_CURRENCY", "gbp") os.environ.setdefault("DEVELOPMENT", "1")`
SECRET KEY
The Secret Key "SECRET_KEY". To find a secret key search Google for django secret key generator
. Copy and paste the generated key into the 2nd quotation marks.python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver
To get the next 3 keys you will need to create a stripe account.
Once you have you account go to Dashboard>Developers>API Keys
Stripe Public Key "STRIPE_PUBLIC_KEY" is Publishable Key
*Stripe Secret Key "STRIPE_SECRET_KEY" is Secret Key
Next click on Webhooks
on the left side, just under API Keys
and click Add endpoint
. In here enter the URL of your site followed by checkout/wh/
Stripe WH Secret "STRIPE_WH_SECRET" is Signing secret
Stripe Currency "STRIPE_CURRENCY" can be set to whatever currency you want. Stripe uses the standard iso currency codes
Development "DEVELOPMENT" setting this to 1 allows the static files to be picked up
python3 manage.py createsuperuser
.python3 manage.py runserver
/admin/
to the end of the urlaccepted
and declined
in Groups in Authenticaion and Authroization. They do not need any special permissions but are needed for the wedding guests to log in.In the Gitpod workspace
gitpod /workspace/Ciara-and-Sams-Big-Day $
and type the command git add .
to add all the saved changes to the next commit package.git commit -m
followed by a meaningful commit message inside quotation marks for the commit package such as 'Fix menu drop-down visibilty'git push
to deploy the application to Github N.B. Using the command git status
will show the status of the changes waiting to be pushed to Github.
The following steps assume you already have Heroku and AWS accounts set up reading to create the application and deploy it.
ciara-and-sams-wedding
) and chose the nearest region. Currently either United States or Europe. Postgres
databasedj_database_url
and psycopg2-binary
.pip3 freeze . requirements.txt
.settings.py
in the ciara_and_sams_big_day
appimport dj_database_url
dj_database_url
with the value of the DATABASE_URL Config Variable in Heroku. python3 manage.py loaddata
command because all the data in the database will be loaded by the bride and groom, because it is specific to their wedding.python3 manage.py createsuperuser
in the production Django Admin.if 'DATABASE_URL' in os.environ: DATABASES = { 'default': dj_database_url.parse(os.environ.get('DATABASE_URL')) } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } }
pip3 install gunicorn
and freeze it into the requirements file.settings.py
from production and localhost for development ALLOWED_HOSTS = ['ciara-and-sams-wedding.herokuapp.com', 'localhost']
.Connect to GitHub
and search for the repository. and click connect
. Next click the Enable Automatic Deploysbutton.SECRET_KEY
and add to Heroku and replace it in settings.py
with a call to get the key from the environment.
SECRET_KEY = os.environ.get('SECRET_KEY', '')
DEBUG = 'DEVELOPMENT' in os.environ
s3
is not on the console you can find it via the Services navigation at the top of the screen.s3
and create a bucket with the same name as the app in Heroku, and select the nearest region. .Permissions
tab.Block public access (bucket settings)
click edit
and uncheck teh block all public access. Properties
tab enable static web hosting and give the index and error document default values for this site.Permissions
tab
6.1. Create the CORS (Cross-origin resource sharing) configuration
[ { "AllowedHeaders": [ "Authorization" ], "AllowedMethods": [ "GET", "POST" ], "AllowedOrigins": [ "*" ], "ExposeHeaders": [] } ]
6.2. Generate Bucket Policy by going to Edit on the Bucket Policy and selecting the button Policy Generator
6.2.1. Allow all principles and add the actiona GetObject
, PutObject
and DeleteObject
.
6.2.2. Get the ARN (Amazon Resource Name) from the Properties
tab and paste into the ARN box at the bottom.
6.2.3. After clicking generate policy, copy the policy into the Bucket Policy Editor.
6.2.4. Change the ARN in the Bucket Policy Editor to have /*
at the end and click save
6.3. Go to the Access control List
section and check Objects
for Everyone(public access) and
save`.IAM
.User groups
and click create group
. Give the group a name beginning 'manage-' followed by the heroky app name, in this case 'ciara-and'sams-wedding' and click create group
.Policies
and click create policy
. On the JSON tab select import manage policy
and import the s3 full access policy form the pop-up window.Permissions
tab on the User group
and clicking add permissions
, attach policies
and selecting the appropriate policy.Users
page and clicking Add user
and giving it a name made up of the app name followed by 'staticfiles-user' and give the user 'Access Type' Programmatic Access
and select Next
through to the end and create user
.users access key
and the secret access key
. This can only be done at this time. If you lose these keys you will need to create some new ones and deactivate these.boto3
and django-storages
, and freeze to the requirements file.storages
to INSTALLED_APPS in settings.py
.settings.py
add AWS details in the static files section settings.py
to tell the browser to cache static files and therefore improve performance.media
files to s3 in /media/ folder STRIPE_PUBLIC_KEY
and STRIPE_SECRET_KEY
to Heroku config variables./checkout/wh/
and add STRIPE_WH_SECRET
to Heroku config variables.Assuming Heroku is setup to Enable Automatic Deployments
code changes can be deployed to production by using the standard Pushing to GitHub which will automatically push the deployment through to production.
However, if a change has been made to a model during a development, prior to adding and committing the changes in Gitpod it will be necessary to modify the settings.py
file to connect to the postgres database in Heroku so that the migrations for those changes can be performed.
settings.py
and comment out the DATABASE settings and add a new DATABASE setting to contain the postgres DATABASE_URL
as below `DATABASES = { 'default': dj_database_url.parse('postgres://*****') }
# DATABASES = {
# 'default': dj_database_url.parse(os.environ.get('DATABASE_URL'))
# }
# else:
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': BASE_DIR / 'db.sqlite3',
# }
# }`
python3 manage.py migrate --plan
command to check what is going to be migrated. python3 manage.py migrate
command to perform the mgiration.settings.py
making sure to remove the postgres DATABASE_URL value.I took the Toast set-up from the Boutique Ado project mainly because there isn't much that could be done differently. I got some help from Sharonb (a CI student) to get them to work because Bootstrap 5 works differently to Bootsdtrap 4.
Bootstrap 5 JavaScript var toastElList = [].slice.call(document.querySelectorAll('.toast')); var toastList = toastElList.map(function (toastEl) { return new bootstrap.Toast(toastEl).show(); });
Bootstrap 4 JavaScript $('.toast').toast('show');
I took the Stripe set-up from the CI Boutique Ado project and modified the Webhooks Handler and JavaScript files to work with the objects needed for this site and the wedding gift donations.
The below image was found on shutterstock The artist Aquatti has named it "Fresh bouquet of roses and greeting card". I asked my brother {Simon Baines](https://www.linkedin.com/in/simon-baines-84494416/)if he could change the "for you" to "RSVP". The background schedule image was found on pexels.com and is by Küflü Çıkın The image of the Shambles was found on and owned by Yorkshire's best Guests The backgroundimage for the menu page was found on Bridebox York Minster was found on 16 Top Rated Tourist Attractions Bowls image was downloaded directly from Royal Worcester Site Dinner plates image was downloaded directly from Royal Worcester Site Side plates image was downloaded directly from Royal Worcester Site The set image was downloaded directly from Royal Worcester Site I got the noimage from the Boutique Ado project by Code Institute
I was not confident is setting up email templates and sending them so I spent some time investigating and found this youtube video that helped tremendously.Django Tutorial - Send Emails From Templates by Master Code Online
The only individuals that need to register an account on this site are the bride and groom but reading the Django documentation I was still struggling to understand how I could make the registration set the user up as 'staff' in Django admin. In my hunt for a solution, I came across ordinarycoders WRITTEN BY JAYSHA. The majority of the code is taken directly from here.
As part of the RSVP process a guest will either accept or decline the invitation. I decided the easiest way to manage this was to set up 2 groups in Django admin; accepted and declined. stackoverflow by fuser60596 gave me solution I needed to check the group and therefore display the correct menu.
I found a method of downloading a csv file for the users to load the various file details on codepen by Tanner
Jo @ CI gave me this link upload-csv.
Scott and Jo @ CI Tutor support for helping me to load the users into django. I had made the whole process much more complex than necessary.
Simen Daehlin my mentor @ CI for his ideas, inspiration and patience.
Jo, Igor, Alan & John @ CI Tutors for their support in getting Stripe working again.
Thank you to Alison Lambie for performing some UAT on my site.