Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Experiment models #45

Merged
merged 2 commits into from
Aug 26, 2015
Merged

Experiment models #45

merged 2 commits into from
Aug 26, 2015

Conversation

lmorchard
Copy link
Contributor

This PR now includes both FxA login and a first stab at Experiment models & a simple REST API. The two are not tied together yet, but that should hopefully be my next step.

If you can get this running in a Docker server, some things to try:

* django-allauth and dependencies added to requirements

  * Using a branch of allauth, for now, to work around an OAuth2 issue

* Added base template with sample global nav

* Added `idea_town.accounts` app with views for sign {up,in,out} and
  profile home

* Container env config pointing to stable-dev FxA instance

* initial_data_dev.json with some initial DB objects, loaded by
  `./bin/run-dev.sh` on container startup

  * User 'admin' with password 'admin'

  * FxA relier configured against stable.dev.lcip.org

  * Site record for 'ideatown.dev'

* .dockerignore to omit some unnecessary files from containers
@jaredhirsch
Copy link
Member

Cool, I'll take a look in a bit

return self.title


class ExperimentDetail(models.Model):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a property for the xpi url? or are we going to be hosting all of our experiments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, that's a question I had and I'd punted for now in the model.

We can (maybe should?) host the experiments, and can treat them as uploads like the images? Or, we might put them on AMO? Not sure what exactly we want to do there yet.

FWIW, I was thinking images (at least) would end up on S3 in deployment, since it's not usually good to keep a filesystem around on a VM in AWS. We could upload XPIs there, too, and manage them like the rest of the content in admin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we'll definitely need the experiments to be signed by AMO. AMO has an auto-signing tool built into the submission process; it was really easy to get the universal-search addon to pass the auto-review, and you get a private AMO URL for free along with the signing. That seems like the simplest starting point for hosting addons?

* Models for Experiment, ExperimentDetail, and UserInstallation

* Admin views for the models

* Added Django REST Framework as dependency

* Added serializers and view sets for REST API

* Tweak to ./bin/run-dev.sh to restart the dev server after a second
  when it crashes
@lmorchard
Copy link
Contributor Author

Quick commit update to make flake8 happier & pass on travis

@lmorchard
Copy link
Contributor Author

@6a68 said it's okay so BOOM

lmorchard added a commit that referenced this pull request Aug 26, 2015
@lmorchard lmorchard merged commit 2a2b407 into mozilla:master Aug 26, 2015
@lmorchard
Copy link
Contributor Author

FWIW, for further changes after this big bang, let's open up smaller issues for quicker reviews

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

Successfully merging this pull request may close these issues.

3 participants