Integration with Cookiecutter Django #200
Unanswered
timcwilson
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Interesting! I'm looking at https://github.com/pydanny/cookiecutter-django/tree/master/%7B%7Bcookiecutter.project_slug%7D%7D and I see what you mean.
I would think this would be because
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Hi Adam,
Thanks for helping. I can get Hello World on my page now. I'll give you
some more feedback in a few days when I've got some more of my project
working, but for now:
The problem with many "instruction/how to" documents is that on the one
hand the examples are too simple, but on the other too complex. What I mean
in this case is that the example needs to fit into a real django project
not just a bare bones django project. So, you know django thoroughly, and
this package thorougly, but people implementing this may not. One of the
problems I had was trying to put the {% load unicorn %} {% unicorn_scripts
%} {% csrf_token %} into my base.html, but using it in one of my other
templte pages that extends base.html. This is possibly obvious to someone
who knows django well, but anti-intuitive to a django beginner. Even though
I watched the video and read the Installation and Components pages, things
were different to my real world application. If you do a demo video with an
django app it may be clearer....even extend the standard django tutorial.
So if the video started with I've just created the django tutorial polls
app and you start your integration from there, you would be simulating
putting unicorn into a semi-real-world app rather than just a bare-bones
minimum.
At the same time, while the django part is too simple, I'm not interested
yet in getting two of the same components on the same form.....so my eyes
ignore component key and drift down to the example component. Maybe split
the Component page into Your first component and Component Details.
Anyway, thanks again for helping and for the project. I'll star it in
github as soon as I get my dynamic search going later today :-).
Regards,
Tim
…On Thu, May 6, 2021 at 8:55 PM Adam Hill ***@***.***> wrote:
I had to add BASE_DIR = APPS_DIR
Ok I can update the command to handle that better.
Instead of just {% load static %} can you do {% load static unicorn %}.
If there is anything on https://www.django-unicorn.com/docs/installation/
that is confusing or would be helpful to change let me know.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#200 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3LNHWH3423WDFOI6JACNTTMJYSFANCNFSM44BU5QCA>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for django-unicorn Adam, it looks like the best and most painless way to integrate javascript interactions, but I am having trouble integrating with my Cookiecutter project.
With Cookiecutter, the apps are a subdirectory further down under the project directory - something that is alleged to be 'best practice.'
Could you please give some instructions on how to integrate with a non-standard django layout. I keep getting error messages like "Invalid block tag on line 3: 'unicorn'. Did you forget to register or load this tag?"
Beta Was this translation helpful? Give feedback.
All reactions