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

Quick Tutorial - 18: Forms and Validation With Deform - Missing assets path #2493

Closed
arianmaykon opened this issue Apr 13, 2016 · 4 comments
Closed

Comments

@arianmaykon
Copy link
Contributor

In step 18 of quick tutorial, the root path of CSS/JS assets is missing in the wikipage_addedit.pt file, which causes a error.

It should be:

    <tal:block tal:repeat="reqt view.reqts['css']">
        <link rel="stylesheet" type="text/css"
              href="${request.static_url('deform:static/' + reqt)}"/>
    </tal:block>
    <script src="${request.static_url('deform:static/scripts/jquery-2.0.3.min.js')}"
        type="text/javascript"></script>
    <tal:block tal:repeat="reqt view.reqts['js']">
        <script src="${request.static_url('deform:static/' + reqt)}"
                type="text/javascript"></script>
    </tal:block>

instead of:

    <tal:block tal:repeat="reqt view.reqts['css']">
        <link rel="stylesheet" type="text/css"
              href="${request.static_url(reqt)}"/>
    </tal:block>
    <script src="${request.static_url('deform:static/scripts/jquery-2.0.3.min.js')}"
        type="text/javascript"></script>
    <tal:block tal:repeat="reqt view.reqts['js']">
        <script src="${request.static_url(reqt)}"
                type="text/javascript"></script>
    </tal:block>

And the jquery-2.0.3.min.js file is missing.

arianmaykon added a commit to arianmaykon/pyramid that referenced this issue Apr 13, 2016
arianmaykon added a commit to arianmaykon/pyramid that referenced this issue Apr 14, 2016
stevepiercy added a commit that referenced this issue Apr 14, 2016
Issue #2493: Fixing Quick Tutorial Step 18 - CSS/JS Paths
stevepiercy pushed a commit to stevepiercy/pyramid that referenced this issue Apr 14, 2016
… on Step 19 - Database

(cherry picked from commit 122a516)
stevepiercy pushed a commit to stevepiercy/pyramid that referenced this issue Apr 14, 2016
@arianmaykon
Copy link
Contributor Author

#2494 (comment) fixed this issue, closing it

stevepiercy added a commit that referenced this issue Apr 14, 2016
Fix Issue #2493: Fixing Quick Tutorial Step 18
@stevepiercy
Copy link
Member

Fixed by #2494 and #2497

@arianmaykon
Copy link
Contributor Author

arianmaykon commented Apr 18, 2016

Guys, first, i'm sorry for taking more of your time, i'm very ashamed to ask that, but something changed or i think my PR did't fixed the problem.

I have checked out the master branch on a new machine (Linux Mint 17, with pyenv and python 3.5.1), and when running the tutorial step 18 again, none of the assets are loaded, printing the reqts property (https://github.com/Pylons/pyramid/blob/master/docs/quick_tutorial/forms/tutorial/views.py#L31) this is what is shown:

{'css': [], 'js': ['deform:static/scripts/jquery.form-3.09.js', 'deform:static/scripts/deform.js', 'deform:static/scripts/jquery.maskedinput-1.3.1.min.js', 'deform:static/tinymce/tinymce.min.js']}

This time no CSS is returned, and the js assets are now with the full path, but this time, without jQuery, im not very experienced in Python, so this can be some mistake or my environment.

Can someone confirm that?

If its confirmed i can make another PR, the original file would be nice this time, but loading the missing jQuery from a CDN or something like that.

Thanks for this great software.

@arianmaykon
Copy link
Contributor Author

Here's the output of my pip list

$VENV/bin/pip list
Chameleon (2.24)
colander (1.2)
deform (2.0a2)
iso8601 (0.1.11)
Mako (1.0.4)
MarkupSafe (0.23)
PasteDeploy (1.5.2)
peppercorn (0.5)
pip (8.1.1)
Pygments (2.1.3)
pyramid (1.6.1)
pyramid-chameleon (0.3)
pyramid-debugtoolbar (2.4.2)
pyramid-mako (1.0.2)
repoze.lru (0.6)
setuptools (18.2)
translationstring (1.3)
tutorial (0.0.0, /home/maykon/Projects/OSS/pyramid/docs/quick_tutorial/forms)
venusian (1.0)
WebOb (1.6.0)
zope.deprecation (4.1.2)
zope.interface (4.1.3)

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

No branches or pull requests

2 participants