Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Example Deployment #19

Open
Miserlou opened this issue Jan 12, 2013 · 2 comments
Open

Example Deployment #19

Miserlou opened this issue Jan 12, 2013 · 2 comments

Comments

@Miserlou
Copy link

Thinking about using this in an application, any chance I can take a peek at an example deployment to see the capabilities?

@magnetic-pi
Copy link

+1 for an example. This seems pretty straight forward to implement, however, what if I would like to have multiple fields on one screen? How would you suggest that I go adding another field?

https://github.com/sfyn/django-etherpad-lite/blob/master/etherpadlite/models.py#L146

Could I just add something like name2?

@DebVortex
Copy link

@jcostello84 if you are just want to add a few information, with no logic behind it, it is mostly better to use another model.

If you really want to add another field, just add it like the other ones in the model:

class Pad(models.Model):
    """Schema and methods for etherpad-lite pads """
    name = models.CharField(max_length=256)
    server = models.ForeignKey(PadServer)
    group = models.ForeignKey(PadGroup)
    name2 = models.CharField(max_length=256)

According to, that you modified a model what modifies the database, you have to write a migration to prevent existing django-etherpad databases to mess up. Fortunately, for django there is the migration tool "South" (which is allready a dependency of the project, according to my modifications). South can handle this for you: After your modification, just use schemamigration to let it generate:

$ python manage.py schemamigration etherpadlite

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants