Bootstrap Datepicker Example - django-crispy-forms

I cannot seem to get the bootstrap datepicker from http://www.eyecon.ro/bootstrap-datepicker/ to work using the example from https://gist.github.com/maraujop/2812529.
The only thing I am unsure of is where to put the datepicker folder after downloading it? I put it in my static folder and while I get no errors the only thing that shows up on my form for a date field is a blank looking box next to the field but nothing comes up when pressing it.
This doesn't seem like it should be that hard but for whatever reason, this isn't working.
Any suggestions(something that works).
Thanks

Take a look at django-bootstrap3-datetimepicker which you can install with pip and add to INSTALLED_APPS. Works very well for me.
There's an alternative listed in the docs for Bootstrap2, but I've not used it so can't comment on how well it works.

Related

Where should I place a language dictionary for module-checkout for magento 2?

I am trying to translate the "Go to Checkout" of Magento 2. If I place the file in /vendor/magento/module-checkout/i18n/de_DE.csv it works. Content of de_DE.csv:
"Go to Checkout","Zur Kasse"
But this seems as a bad idea as adding/changing stuff in /vendor is bad practice at least.
I have tried to place it practically everywhere, but no luck...
You can achieve the same by overriding it in your custom theme like given in below example. More over doing the changes in the vendor/magento is not advisable.
app/design/frontend/{{Vendor}}/{{Theme}}/i18n/de_DE.csv
Once all the translations are set save the file and run the below given command in the terminal.
Clear cache (bin/magento cache:clean) and check your changes.
Hope this will make your day!.
Thanks
You can add your csv file in app/i18n/vendorname/modulename, it will get translated everywhere the site., In your case you are saying that tried with place the translated file in vendor..So you can just override that in your custom theme too..Like path app/design/frontend/VendorName/CustomModuleName/Magento_Checkout/i18n/.csv,
And run the commands like upgrade deploy compile if it is necessary..
And clean cache too..
Hope this will help.

Only image added not the extension

I recently re-installed VSC and I'm having a strange issue in my HTML files.
I remember I was used to using the autocomplete function to get an instant list of the images I wanted to insert, then I was choosing one and then VSC would add it to my code in the form of filename.jpg
This time, when I try to do the same thing, I only get the filename and then I have to type the extension manually.
What am I missing?

Tiny MCE v2.1 code editor

Call me old fashioned, but there is nothing I can do but only to use the old version of Tiny MCE, which is 2.1.
So, what I'm trying to do is to add a "download" attribute to tag, after I open HTML editor I type this attribute, when saving it simply disappears. There is no official documentation to this old version on the official site. The new ones doesn't mention anything about this feature at all. overall editor look. code editor look
Also, I tried to add "download" in the extended valid elements configuration:
extended_valid_elements: "code[class|dir ,however no success as well.
Did anyone by any chance faced the same problem?
Could use a little bit of help.
Well, if anyone ever encounters the same problem, which I highly doubt, you would need to open tiny_mce.js file, and on the line 1928 there will be "A : "id|class|style|title|download" ", this is the place, where I added "download". Afterwards I was able to add this attribute in the HTML code editor.

Finding the file that is being loaded on the fly in joomla

im using a joomla template in my localhost. I would like to edit one of the on-screen module's position. i used chrome and firefox to inspect the elements and even changed the properties. it works the way i want, but the problem is, im not sure where these actual files are residing in my localhost. There are 100s of files and its frustrating there isn't an easy way to find out the exact file that i have to edit.
I understand that joomla contents are generated on the fly and thus it isn't easy to find the exact file. I have also seen some of the past related questions in stackoverflow.com, asked by desperate users like myself, nothing works.
Im hoping someone knows of a tool or a trick that can help me. I even tried indexing the localhost folder (c:\wamp\www\demo) to search file contents, it doesn't seem to work for some reason.
Pls help.
The position of the module is almost certainly determined only by the css in your template. Using web inspector in Firefox or Chrome you can see which file (and the file path) of any styles that are currently being applied to the module, so you can simply modify the rules in that files.
I love Mac
Since my files are in the localhost, i have been trying to search for the div class that is generated on the fly, but my pc couldn't thoroughly search the contents of the file.
On my mac, i searched for the div class word and hey! it showed me a list of files that contained the div class and i found the file in a matter of seconds! how cool is that!!
Thanks Guys, hope this helps someone too!

docpad: getting info on what exactly did got wrong

Docpad is throwing warnings at me all the time:
warning: Something went wrong while rendering: ...
I would love to know some more about what exactly went wrong. Are there any settings that I can tweak to make the output more helpful? In this particular case, the template is an ecofile.
I have tried the -d option, but can't see that it helps.
I would love a special debug mode, where each layout, document, partial etc are rendered inside a border with the name of the file rendered. If the variables available inside the file could be serialized and shown in a popup or something, I would be thrilled. :-)
That special mode sounds a lot like what TraceGL will soon be able to offer. TraceGL seems amazing, but I can't seem to get it to work with DocPad yet.
For the meantime, do the debugging instructions on the DocPad Website help at all?

Resources