Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install steps - Fixes syntax of update_templates django command #35

Merged
merged 1 commit into from
Jun 3, 2013

Conversation

antoviaque
Copy link
Contributor

The command rake django-admin[update_templates], mentioned in the installation instructions, didn't seem to work:

[edx-platform] antoviaque@antoviaque-laptop ~/prog/edx/edx-platform (master)
$ rake django-admin[update_templates]
django-admin.py update_templates --traceback --settings=lms.envs.dev --pythonpath=.
Unknown command: 'update_templates'
Type 'django-admin.py help' for usage.
rake aborted!
Command failed with status (1): [django-admin.py update_templates --traceba...]
[...]
Tasks: TOP => django-admin
(See full trace by running task with --trace)

Looking at the rakefiles, I saw rake cms:update_templates, which seemed to run fine for me (and both the LMS & CMS seemed to work fine afterwards) - not completely sure this is the same thing though:

[edx-platform] antoviaque@antoviaque-laptop ~/prog/edx/edx-platform/rakefiles (master)
$ rake cms:update_templates
(in /home/antoviaque/prog/edx/edx-platform)
django-admin.py update_templates --traceback --settings=cms.envs.dev --pythonpath=.
2013-06-01 10:35:53,904 WARNING 9931 [xmodule.x_module] x_module.py:297 - No resource directory templates/customtag found when loading CustomTagDescriptor templates
2013-06-01 10:35:53,913 WARNING 9931 [xmodule.x_module] x_module.py:297 - No resource directory templates/poll found when loading PollDescriptor templates
2013-06-01 10:35:53,977 WARNING 9931 [xmodule.x_module] x_module.py:297 - No resource directory templates/foldit found when loading FolditDescriptor templates
2013-06-01 10:35:54,019 WARNING 9931 [xmodule.x_module] x_module.py:297 - No resource directory templates/abtest found when loading ABTestDescriptor templates
2013-06-01 10:35:55,171 WARNING 9931 [xmodule.x_module] x_module.py:297 - No resource directory templates/graphical_slider_tool found when loading GraphicalSliderToolDescriptor templates

(Also fixed a broken indentation, I can remove this part if needed, or isolate to a different patch.)

@Slater-Victoroff
Copy link
Contributor

Hmm, strange. That worked on the machines we tested on. Might be system specific, and there should probably be a zshell check around those lines anyway. What distro are you running? I'll see if I can replicate the error on a virtualbox.

@antoviaque
Copy link
Contributor Author

@Slater-Victoroff It's an Ubuntu 13.04 (raring), with virtual environments and a manual install (which means I could be responsible for the issue :p)

It seems that the contentstore app is only imported with the rake cms:update_templates command, but not with the rake django-admin[update_templates] (ie https://gist.github.com/antoviaque/5691631 vs https://gist.github.com/antoviaque/5691586 ). I'm not very familiar with rake so I'm not sure why from a quick glance.

Btw, if you fix this differently to keep the rake django-admin[update_templates] call, note that there seem to be a typo in the scripts/create-dev-env.sh: rake django-admin[update-templates] (a dash instead of an underscore).

@antoviaque
Copy link
Contributor Author

Ah - I've just noticed that the two commands simply differ in the settings they load: rake cms:update_templates uses cms.envs.dev for its config, which contains contentstore in its INSTALLED_APPS (which contains the update_templates command), while rake django-admin[update_templates] uses _l_ms.envs.dev, which doesn't load contentstore.

@Slater-Victoroff
Copy link
Contributor

Hmm... this is probably something that got changed in our switch to open source, and I don't believe we're using the contentstore anywhere in this version. Typo fix is good, probably add a flag in for contenstore making
rake django-admin[update-templates]
as the default and some sensible flag to switch that line to
rake cms:update_templates

@antoviaque
Copy link
Contributor Author

@Slater-Victoroff Ok. To make sure I understand precisely what you're asking me to do - we would use rake django-admin[update_template] in the script (I think you meant to use the underscore), and set system to cms instead of lms in https://github.com/edx/edx-platform/blob/master/rakefiles/django.rake#L61 when action is update_template. Correct?

@Slater-Victoroff
Copy link
Contributor

Yes, that's what I was thinking, it's a little roundabout, but it presents a more uniform interface for interacting with the edx-platform. @jkarni what are your thoughts on this?

@jzoldak
Copy link
Contributor

jzoldak commented Jun 3, 2013

The command needs to either be:
rake django-admin[update_templates,cms]
or
rake cms:update_templates

They do the same thing. I'm good with either.
👍

jtauber added a commit that referenced this pull request Jun 3, 2013
Install steps - Fixes syntax of `update_templates` django command
@jtauber jtauber merged commit c0859cb into openedx:master Jun 3, 2013
@antoviaque antoviaque deleted the install-update-templates branch June 3, 2013 19:44
@cvong
Copy link

cvong commented Jun 21, 2013

I tried to install edx on centos and when I ran the command (rake django-admin[update_templates,cms] or
rake cms:update_templates), I still got the errors.

2013-06-21 18:51:47,342 WARNING 28785 [xmodule.x_module] x_module.py:309 - No resource directory templates/customtag found when loading CustomTagDescriptor templates
2013-06-21 18:51:47,347 WARNING 28785 [xmodule.x_module] x_module.py:309 - No resource directory templates/poll found when loading PollDescriptor templates
2013-06-21 18:51:47,451 WARNING 28785 [xmodule.x_module] x_module.py:309 - No resource directory templates/foldit found when loading FolditDescriptor templates
2013-06-21 18:51:47,485 WARNING 28785 [xmodule.x_module] x_module.py:309 - No resource directory templates/abtest found when loading ABTestDescriptor templates
2013-06-21 18:51:47,508 WARNING 28785 [xmodule.x_module] x_module.py:309 - No resource directory templates/graphical_slider_tool found when loading GraphicalSliderToolDescriptor templates

Please let me know how to fix it. Thanks.

Chi-Hou

sarina pushed a commit that referenced this pull request Apr 2, 2015
Story #35 As a coach I can see and edit the json for the grading policy.

Story #34 Recalculate grading policy

Repair the broken test for grading by providing an explicit POC context for the request to run in

I am not certain this is the right way to do this, might be better to test the session facility by setting the session for self.client, but this will do for now.
nedbat pushed a commit that referenced this pull request Apr 7, 2015
Story #35 As a coach I can see and edit the json for the grading policy.

Story #34 Recalculate grading policy

Repair the broken test for grading by providing an explicit POC context for the request to run in

I am not certain this is the right way to do this, might be better to test the session facility by setting the session for self.client, but this will do for now.
ormsbee pushed a commit that referenced this pull request Apr 11, 2015
Story #35 As a coach I can see and edit the json for the grading policy.

Story #34 Recalculate grading policy

Repair the broken test for grading by providing an explicit POC context for the request to run in
ooduye pushed a commit to ooduye/edx-platform that referenced this pull request May 25, 2016
…/redirect-scheme-setting

* python-social-auth/redirect-scheme-setting:
  add missing import and move setting prop outside of FEATURES
  [#118695049] Replace upstream python-social-auth with fork version
  [#118695049] Use redirection scheme set in lms.env.json
mumarkhan999 pushed a commit to mumarkhan999/edx-platform that referenced this pull request Mar 4, 2019
Add convert_datetime method in base_transformer.py to convert current datetime into expected utc datetime.
yoann-mroz referenced this pull request in weuplearning/edx-platform Nov 30, 2020
yoann-mroz referenced this pull request in weuplearning/edx-platform Nov 30, 2020
ECOM-6634

Fixes #35
Sujeet1379 pushed a commit to chandrudev/edx-platform that referenced this pull request Nov 17, 2022
…x#35)

We continue to use history.replace for building the MFE URL, which we don’t want saved in history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants