Skip to main content

Memorize your Django project's items with spaced repetition theory

Project description

Writing a flashcard application is almost a rite of passage for django users.
You create a simple Card model, you create a quiz view and template and you call
it a day. A simple application and not very useful.

Django-memorize adds a more advanced way of learning your flashcards (or
whatever items you'd like) with the theory of `spaced repetition
<http://en.wikipedia.org/wiki/Spaced_repetition spaced repetition>`_. The
`SuperMemo 2 algorithm <http://www.supermemo.com/english/ol/sm2.htm>`_ is
currently used. Flashcard web apps have just gotten better and easier.

Installation
============
#. Download the `latest version
<http://code.google.com/p/django-memorize/downloads/list>`_.
#. Extract and run ``python setup.py install``.
#. Add ``memorize`` to ``INSTALLED_APPS`` list.

Usage
=====

Add an Item to Practice
-----------------------
Let's assume you have a flashcard web app with a card model::

from django.db import models
from django.contrib.auth.models import User

class Card(models.Model):
front = models.CharField(max_length=255)
back = models.CharField(max_length=255)
user = models.ForeignKey(User)


To begin practicing a new card, save a practice object for your flashcard::

from memorize.models import Practice

card = Card(front="When was Sgt. Pepper released?", back="1967",
user=request.user)
practice = Practice(item=card, user=card.user)
practice.save()


Start Practicing
----------------
The view ``memorize.views.next_practice_item`` does all the work of determining
what the next item a user should practice. You just need to provide a template
file. Add an item to your urls.py file::

urlpatterns += patterns(
'memorize.views',
url(r'^item/next/$', 'next_practice_item', {'template':
'memorize/next.html'}, name='next-song'),
)


Template Variables Provided
~~~~~~~~~~~~~~~~~~~~~~~~~~~
form
A ``memorize.forms.RatingsForm`` instance you use to save the performance on
this practice instance.

item
Your original item. Use this to get your information (e.g., ``card.front``
information)

practice
The practice row.

Saving Feedback
---------------
The key to spaced repetition algorithms is using your past performance to
determine when is the optimal time to reshow an item. If you used the
``next_practice_item`` the template will have a ``form`` object that provides
all the relative information.

The view ``memorize.views.process_rating`` will process the data. Add this view
to your urls.py file.

Example::

<form action="{% url memorize.views.process_rating %}" method="post">
{{ form }}
</form>

Project details


Download files

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

Source Distributions

django-memorize-0.5.1.zip (21.2 kB view details)

Uploaded Source

django-memorize-0.5.1.tar.gz (16.0 kB view details)

Uploaded Source

File details

Details for the file django-memorize-0.5.1.zip.

File metadata

  • Download URL: django-memorize-0.5.1.zip
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-memorize-0.5.1.zip
Algorithm Hash digest
SHA256 2b8df7b276d05b839d2af80e3ca44ab56658a38deca4b588a67120dac4ac617f
MD5 64ca6e66944e99aa549b695ba930b7df
BLAKE2b-256 767fc45aade6cb6cc3e6e7b49b84effe468e3bb005235b3adea11f6005c908fc

See more details on using hashes here.

File details

Details for the file django-memorize-0.5.1.tar.gz.

File metadata

File hashes

Hashes for django-memorize-0.5.1.tar.gz
Algorithm Hash digest
SHA256 852eb7a7cb50c8460e111987f8bcd40729ae36f936e5c2e90eaf1d148806e082
MD5 fec43882c60c5c5d05b01cbf3feec271
BLAKE2b-256 fa1161ff8be34c4d6d1e166a9f2936a4110f281f2a6bb3895004ad25b60438e1

See more details on using hashes here.

Supported by

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