Posts by lennys (70)

Django Girls

Today I spent a few hours working my way through another tutorial. This one was found at djangogirls.com, and was another basic blog tutorial. I managed to get the thing working, and it's live at leonthegreat.pythonanywhere.com. Right now it just has the "lorem ipsum" placeholder text to make it look pretty. I haven't decided if I'm going to try and turn this one into something useful. I did get a couple of ideas for this blog from working through the DjangoGirls blog tutorial. I might be able to get the Summernote form working, I don't know. I'll probably take a shot at that tomorrow. The DjangoGirls tutorial was pretty thorough and well put together. There's more content than what I worked through today, so I'll be going over that in the near future. What I'd like to find is a tutorial that works through some more advanced stuff, similar to the projects I built while watching the CodeWithStein videos on YouTube. At some point I'm going to have to get another Django book too, but I might read through the old ones I have at home first. I could use a refresher.

Pics, part 2

So I was able to get the Summernote text editor working in the Django admin section, so I can use basic HTML formatting and pictures in my posts. The problem is that Django still isn't rendering the HTML tags properly. Django automatically "escapes" the tags, so in the published post they show up as plain text, instead of producing the paragraph and image tags. I have to research this one, so I may not come up with a solution any time soon. I'm still trying to figure out how to incorporate Summernote into the publicly-facing post form. Like I mentioned the other day, the issue is that this blog was built without a forms.py file in the blog app, whereas the tutorials I've seen so far all make use of a forms.py file. So I'm left trying to figure out how to make this work without a forms.py file. I'm going to continue working on this. I'm not sure what I'll add after I get Summernote working. I've been thinking about adding something that would enable me to resize the images I use, and I saw a blog post online that covered that, so maybe I can find a way to make it work. After that, I think I'll put in some work on my other websites. The main one has an issue with adding links to the main page, and the LS Enterprises site is just a very basic placeholder. There's still the question of getting Django's email functionality working too, I think I can figure it out and get it to work with my mail server, but that's on the back burner for now. I'm glad I'm making progress, even though it's slow. Today is a Saturday and I'm at work with nothing to do, so I will hopefully make some progress today on something useful. Update: I posted a question on StackOverflow about this. Internet, do your thing!

Pics

Incorporating pictures into this blog is hard. I've been going over the code for about 4 hours now, and I was able to get the WYSIWYG working in the admin area, but not on the make-a-blog-post page. I'm still working on it, but I think this is going to take a day or 3 to figure out. The problem is that this blog was initially built without a forms.py file in the blog app, where the tutorials I've looked at all use a forms.py file. So I'm left trying to figure out how to make this work using the other .py files I have. I created a new forms.py in the blog app and added some code to it, and I **think** it's working, but since this is outside of my area of expertise it's slow going. Luckily it's been relatively quiet here at work, or otherwise I wouldn't be able to do this stuff. The WYSIWYG looks pretty slick, it's got image uploads built-in so if I can get it working that'll save me the trouble of manually writing code to support the pictures. It's also got text formatting so you can use HTML tags in your writing. Back to the grindstone...

First Previous 19 20 21 22 23 Next Last

My Other Sites

Built with Python and Django

Sites I Like

A Random Collection

Tools I've Used

Mainly Software Stuff