I installed django bootstrap5 but it seems to have messed up the css and fonts and i can't seem to figure out what went wrong..I have a website am trying to clone, innitially things looked pretty the same until i tried installing django bootstrap and django tailwinds, well i later uninstalled tailwinds but the mess is still there. here is the pic of the changesThe current changes in the interface
Here is what it looked like innitially and how the website itself looks like website fonts
Related
I am quite new to django so I am sorry if I have overlooked something simple.
This is my current website: https://www.michealnestor.com
I am trying to remake it using react and django, and a lot of it is different, however I want to keep the functionality of being able to run my js apps from the website: https://www.michealnestor.com/projects EXAMPLE: https://www.michealnestor.com/projects/sortingalgorithms/ .
I want to be able to upload project folders, with html, css and js in them from the admin page, and then be able to open these projects from my website. I am not sure how to do this though.
I have tried manually placing such a folder in a templates folder in my app, and I have managed to use a view to load the html file, but this file can't seem to find the css and js.
Maybe I am going about this the wrong way, in any case I would appreciate some guidance!
So I 'm working on a project in django - it's like a variation of a blog. There will be 4 mini blogs within the website and the admin for each can create new posts - so they can also add an image to their post.
Now that django has recently been update (django 3.0 is here), I was wondering, what is the best way to store and serve these images in production? Could someone maybe link to a part in the documentation? I don't think this will come under staticfiles will it? I searched the documentation with keywords like "Media", "Serving images" etc but didn't really find much.
EDIT: The project is quite small and I want to save files inside a folder of my django project.
I hope someone can help out with this one. I have been using djangocms to build a simple frontend centric website for a client so they can maintain their own content. There is nothing fancy in this setup. Just a few template.html files, a little css and djangocms to pull it all together. There are no other forms, models, views or anything at this stage. Just pure djangocms.
Originally I was working with django 1.8.6 and the image picker seemed to work fine. I could upload my files and next to each one there is a selector icon which works and all was great. See below image. This was using cmsplugin-filer.
Then I tried to upgrade the website to Django version 1.11.13 and I started to run into this problem. The file select that you see above is no longer available to the user. I have spent days working on this and in my travels I found that apparently cmsplugin-filer is now deprecated. So I removed it and switched to the recommended djangocms-filer install thinking that might solve my problem...but no. After many many hours of head scratching I figured it must be something in my project throwing things out, so I have done a 100% clean install using the prescribed djangocms-installer. Other than connecting it to a postgresql database, it is a completely vanilla installation, and yet it still does not work. All I get is the image below. A simple tick box but no way of selecting the image nor anyway of saving what I have selected. Uploading files is fine and I can create folders and images upload into them perfectly fine.
Below is a snapshot of my pip freeze showing everything installed in my virtualenv and the associated versions.
My settings file is almost 100% standard so I don't understand why I can't get this to work. Note: If, when I am adding the plugin to my template, I don't select the Choose File Button but simply drag an image into the grey rectangle, it all works fine. My file gets uploaded into the unsorted uploads folder and the image is selected into my template all in one go, but using the choose file route, where I have more control over my files and how they are stored, doesn't.
Does anyone have any idea what I might be missing please?
UPDATE:
Django CMS overrides some static files and there are some old ones in your browser cache. You need to clear your caches or open the page using incognito window.
My co programmer developed a django plugin for use in a django project and on his setup, the plugin works. he can write a placeholder in the django template being used and load that with the custom plugin via the django-cms structure view. I tried doing the same thing but i noticed that the placeholder i put in the html in the same place he put it in isn't appearing in the structure view. the only placeholders appearing in the structure view and can be edited are static placeholders. placeholders entered like the ones in the django tutorial
http://docs.django-cms.org/en/release-3.3.x/introduction/templates_placeholders.html
and are placed with this code
{% placeholder "custom_name" %}
aren't appearing in the structure view. i couldn't find a similar scenario here in stackoverflow. I have a fairly similar setup to my co programmer too. i copied the same repo he's working on and i even used a dump from his postgres database in case there's something wrong with my own setup but still no luck. there are no DEBUG errors appearing in the console or the webpage so I am out of ideas. Has anyone encountered a similar situation? The django-cms we are using is version 3.1.0.
Thanks
I just found out earlier today what was wrong. I didn't notice immediately, that the page i was trying to edit was not a django-cms managed page which is why the placeholder wasn't working in it. In django-cms managed pages, the placeholder is working properly.
Thanks
I'm looking for a way to upload images to a django filefield through a tiny mce plugin.
I've tried using IBrowser using these instructions and figured I could then just write a python script in place of the php script that comes with the plugin. But I can't even get the button to display with those instructions, let alone rewrite it so that it works with django.
So I'm wondering if there is a well know way to create an upload image button that works with django and will upload to your server or if I can get ibrowser to work in this way.
Currently, tinymce is served to my django admin following the django wikis suggestions. I've tried adding ibrowser with the following file structure:
-tinymce
-plugins
-ibrowser
-editor_plugin.js
-editor_plugin_src.js
-...
but the button doesn't appear.
Again I'm all ears on how to get this to work with the ibrowser plugin or with a better solution.
django-filebrowser is an app that has tinymce support. You will also need to install django-grappelli as a requirement though which will significantly change the appearance of your admin