Skip to main content

A simple open-source django wedding website

Project description


django-wedsite aims to provide a quick, easy-to-use open source django app that allows you to flexibly build a custom website for your wedding without needing to jump through the typical hoops of getting a site up and running.

You can see an example of the app running on Heroku and can see the source of that app on Github.

django-wedsite ships with default settings/text that can easily be overriden in your main web app.

Quick setup

Clone the example app

The easiest way to get up and running is to clone the example wedsite app and then make modifications from there as needed

git clone

If you prefer not to clone, it’s recommended to take a look at and/or copy the ` <>`__ and ` <>`__ from the provided example wedsite app. These files configure all of your example app’s setup to get the basic default wedsite up and running.

Initialize Database

In order to run migrations and initialize the database, you will first need to set a SECRET_KEY by doing the following in root django-wedsite directory:

$ echo "DJANGO_SECRET_KEY='$(python -c 'from import get_random_secret_key; print(get_random_secret_key())')'" >> .env
$ source .env

Now, all you need to do to initialize the database is run the django migrations, and while you’re at it, create a superuser for later use.

$ python migrate
$ python createsuperuser


With that done you should be all set and your site should be serving the default django-wedsite app. Launch and test!


Once the basic site is launched, it’s fun to try out some quick customization that will give you a feel for how the more advanced customization will work. In your django app, add a file that will be used for configuring wedsite. You can use any name, but something like is recommended. In this file, try out the following code:

from copy import deepcopy
from wedsite.settings import DEFAULT_JSON

CUSTOMIZED_JSON['broom']['last_name'] = "Pandas"

And now in your file, add the following

from myapp.wedsite_conf import CUSTOMIZED_JSON



You should now see that the Broom’s last name on the landing page is “Pandas”. The concept for customizing the whole site would then be to add as much detail as you’d like to your CUSTOMIZED_JSON. You should find that everything you need is in there. See ` <wedsite/>`__ for all of the fields you can change.

Pages and access restriction


The site offers the following pages:




Main landing page


Cute stories about the couple


Info about the ceremony


Info about the schedule for the days surrounding the wedding


Info about airports, hotels, traffic, etc.


Info about what to do in the wedding city


Info about registries, gifts, donations, etc.


Info about the wedding team


Who your guests should contact if they need help


Info about any cultural traditions you’d like your guests to know

Page Access

All of the above pages can have three access settings, set in the access parameter of the WEDSITE_JSON in




Everyone can view the page. The page is public


Only authenticated and logged-in users can view the page. The page is private


The page is not included in the site. Nobody can view the page and it is removed from the navbar, site URLS, etc.

In your, you can add

CUSTOMIZED_JSON['access']['team'] = 'login'

to make the team page or any other page login-only.

If you’d like to remove a page altogether from the site, you can add

CUSTOMIZED_JSON['access']['contact'] = False

There is one special page, the RSVP page, which cannot be removed from the site and is always restricted to only logged-in users.

Package Architecture


The site primarily serves up static pages of django-templated HTML. The main dynamic features of the site are:

  1. User Accounts

  2. User RSVPs

  3. User mass emailing

  4. Page view restriction to authorized users

  5. Admin UI

Static Pages


Page templates are split into two categories: blocks and pages. Blocks are pieces of code that are utilized in multiple pages and pages utilize blocks to build a full web page.

The main block for the site is `base.html <templates/wedding/blocks/base.html>`__ which defines the navbar, javascript, title, footer and all other shared resources for the site.

Each of the `pages <wedding/blocks/pages>`__ then imports the base template and generally just fills in the page title and content.

URLs and access restriction

The site map is defined in ` <wedding/>`__. If you were going to add/remove a page it should be done here. For each page that you want to serve on the site, add a line to the urlpatterns list. In the line you’ll need to specify the page template for the site as well as the view class you’d like to use to serve the template. Note that for static HTML pages there are two view choices:

  1. StaticView

  2. StaticViewNoAuth

If you choose StaticView then it will require a user to log in to access the page, else if you choose StaticViewNoAuth the page will be accessible without login.

Adding a basic page to the site

Using just your knowledge of templates and URLS from above you can go ahead and add a new page to the site! Simply make a new template in the pages directory and add its desired URL to the urlpatterns with either StaticView or StaticViewNoAuth and you should be good to go!

Users and RSVPs

User Model

This site uses the standard Django user model. The standard django account pages have been skinned in the theme of the site in the `registration templates <templates/registration>`__. In order to get some flexibility in the user data a `Profile <wedding/>`__ model has been added as a 1:1 field with a user, created when the user is created. Eventually the goal is to add a “user account” page to the site where users can update their address and contact info using this profile but those features aren’t yet built.

User Account Creation

A custom account creation view has been built such that only users who have a valid RSVP in the system can create an account. The site currently checks a user’s last name and the numerical digits of their address for a match in the “unclaimed” RSVPs in the database. An “unclaimed” RSVP is an RSVP which does not have a Foreign Key to a user. The admin of the site needs to manually enter all of their guests into the database as described below.

RSVP Models

The RSVP system consists of two models: RSVP and RSVP Person

RSVP Model

The RSVP maps 1:1 to an invitation you sent out. It has the following important fields:




Comma-separated last names for anyone expected to claim the invite


Full address that the invite was sent to. Only the numbers really matter


Coment section the user can fill out when submitting their response

An RSVP contains a 1:many relationship with RSVP Persons

RSVP Person Models

Each RSVP Person has the following important fields




Person’s Name

Along with the above fields, the RSVP person model can and should be modified to contain any/all of the information you’d like to gather from the person when they submit their response on the web site. The default RSVP person contains the following additional fields




is_attending_r ehearsal


Whether or not they’re attending the rehearsal dinner

is_attending_w edding


Whether or not they’re attending the wedding



Whether or not the guest counts as a child



Various dietary restrictions



Currently unused, but would be nice for building a seating assignment chart

Loading RSVPs into the site

With a basic understanding of the above RSVP system, you’ll want to go ahead and load your RSVPs into the system so that your users can claim them. To do this, log into the admin UI at


using your superuser credentials. Then go to the RSVP page and you can manually add RSVPs. This can indeed be a bit tedious; it would be nice to create a management command to take in a CSV or JSON data file and make all of the RSVP objects.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-wedsite-0.0.11.tar.gz (1.5 MB view hashes)

Uploaded source

Built Distribution

django_wedsite-0.0.11-py3-none-any.whl (1.5 MB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page