[378] Learn Django: Extending the wiki with wikiwords and search (2/3)
in series: Learn Django: Create a Wiki in 20 minutes
video tutorial by Siddhi
Name:
[1982] Siddhi
Member:
30 months
Authored:
4 videos
Description:
I'm an entrepreneur from Chennai, India and I have my own company `Silver Stripe Software <http://www.silverstripesoftware.com>`_ where I develop tools for agile software development using Python and ...
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
This is the second part of the Learn Django series. In this part, we'll extend the Wiki app from part 1 [View part 1 here if you haven't already].
We are going to add support for a menu and auto linking of wikiwords.In the process we will look at template inheritance, filters and custom filter libraries.
Finally, we'll see how to implement a search feature in under 20 lines of code using Django's newforms library and database query API.
Video Tutorials related by tag:
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 6467 (since July 30th)
- Plays in last week: 32
- Published: 29 months ago
Thank-yous, questions and comments
If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?
You may also want to see our ShowMeDo Google Group to speak to our active users and authors.
thanks again, very helpful
Thank you!
Your DIY Wiki in Django videos are excellent, well structured and very informative.
Keep up the good work! :)
This was excellent, very helpful.
I hope to see updates in the future for django 1.1,
like using
"from django import forms"
Thanks a lot for you django tutorials! Will there be more videos from you on django?
I have learned a lot, thank you for sharing your knowledge.
-- Kirill
This one is as good as the first one :-)
Thank you very much. You are a very good teacher. I would enjoy seeing even more of what you have to offer!
great tutorial!
Nicely done, Siddhi. I'm working through this with Django 1.1 now, and most of it is still relevant, only minor changes are required to make things work.
Siddhi,
I like the screencasts! Think they are very usefull. Please update them because i had to dive into the changes made in django since you have released your screencasts!
Really liked the rapid pace of this video and the part 1 video. Thanks for giving me a good overview of Django!
Another great video, Siddhi.
I'd like to see another video on forms from models ("Creating forms from models" on the docs.djangoproject.com site).
Is there any benefit to using forms from models? Or is the power of using forms as described here so much greater that forms from models would be a step backwards?
Thanks.
Awesome tutorial again.
I never though django will be so easy and powerful. I loved your way of presenting the information in step by step method, It did not scare me away at all and was hooked on to it till the end.
Its nice. I would suggest to use right click in copying text and files instead of using shortcut keys. This would help the viewers follow it more easily.
Hello,
I like very much your Tutorials. I am still very new to Django.
Do I need to learn first python?
best regards,
koko
thanks for the great video...very informative. More power and hope more videos to come.
Great Introduction to Django, I have the Book right next to me but now I also got the Basics and Motivation to really start learning :).
Another great video. I wonder if updated versions could be done for post Django version 1.0.
As much as I understand that part of the charm of open source software is supposed to be building up new versions of the documentation on your own, the little hiccups in command names and such can become un-charming when you are trying to learn on a deadline. Otherwise, mighty fabulous video.
Great add-on to the first tutorial. It's a little out of date with the 1.0.2 branch but figuring out the differences made me dig a little and read more of the documentation than I would have if everything had worked perfectly right off the bat.
Thanks! Keep up the good work. Maybe I'll be able to add a tutorial of my own before too long...
S
I'm very impressed by your your videos. I'm new in Django and because of your great flow with this framework, I'm sure that Django is the right choice for me. Thanks for all.
Excellent! My first time with Django and CGI for that matter. And I'm productive already!
very interesting but some conepts need more explanation
Very nice tutorial. Thank you ! Gives me motivation to start with this :)
thanks
Excellent video Siddi , you rule, this seemed to work in view.html
Thanks
{% extends "base.html"%}
{% load wikilink %}
{% load markup %}
{{content|wikify|markdown}}
Siddhi, I am an intermediate python coder. I need to set up a web interface for a program I am developing for the Molecular Biology Iab I am a student in. They are not into cmd line. I have done similar things in perl years back but have not had a need to do it in a while and, I dont do perl anymore. THANK you SO much for this video. It will save me so much time and has sold me on using django!
Augustine Dunn
Univ Cal Irvine
This is extremely useful. After writing a web app from scratch, I can really appreciate the power of using a framework like django. I look forward to viewing the third video in the series.
Hi Mark, newer versions of Django auto-escape the HTML. See this comment #20 above for details - http://showmedo.com/videos/video?name=1100010&fromSeriesID=110#comment1805
great video.
I'm have it working well although I'm getting a bunch of
<li>
one
</li>
in the middle of otherwise nice looking HTML.
Any ideas?
Great video, however; I'm getting a bunch of
<ul>
<li>
one
</li>
</ul>
Where I expected to see
<ul> <li> one </li> </ul>
i tried one more time and working good.
very useful, but i can watch only first 5 minutes of this video, something is wrong with file? i tried several times but after 5 minutes watching back to the begin, could you help ?
Hi, that should be name__contains (there are 2 underscores between name and contains)
I got this error:
TypeError at /wikicamp/SearchPage/
Cannot resolve keyword 'name_contains' into field
Anyone knows the reason of that?
I changed cleaned_data and wrote clean_data because I'm using Django 0.96 and it doesn't search anything.
Thanks for your time.
Hi!
I'm using Django 0.96 and when I replaced "cleaned_data" with "clean_data" I got this error when I tried to search something:
TypeError at /wiki/SearchPage/
Cannot resolve keyword 'name_contains' into field
Request Method: POST
Request URL: http://127.0.0.1:8000/wiki/SearchPage/
Exception Type: TypeError
Exception Value: Cannot resolve keyword 'name_contains' into field
Exception Location: /var/lib/python-support/python2.5/django/db/models/query.py in lookup_inner, line 938
I'd like to know why that happens and how to solve it...
Thanks for any help you can give me.
Siddhi
Thank you so much for Python Beginners like me
Hope for your next big shot!
Thanks again.
Very nice, is better than first
Thanks, Siddhi.
One suggestion: for SearchPage and other special pages, why not just use the url patterns with their own view functions? You've just implemented your own micro-dispatch when that's already provided by Django.
Thanks for all the comments! anonymous, you are just in time :) The third video in the series has been uploaded. It's available here - http://www.showmedo.com/videos/video?name=1100020&fromSeriesID=110
Really great work ! Thats a nice way to learn django!
If you have some time i would love to see more of your screencasts.
Informative and fun to watch. I've watched several times and then followed along. This is one of the top django screencasts I've seen.
Very good. Thank you for this. I'm starting to learn about Django and this is very useful.
Thanks a lot, this screencast was extremely useful... well explained even for newbies like me!
I hope something new will be published soon!
Cohiba
The problem in using a regexp is that is blindly converts all matches.
For example, say I have a link <a href="..">Check out MyPage here</a> then the filter will link up MyPage again even though it is already linked. So there are cases like this where we should not automatically do a conversion.
This is the problem with using regular expressions. The proper way is to parse the content with a HTML parser check that we dont make wikilinks in invalid situations.
by the way I like the following regex for finding wikiwords...
wikilink = re.compile( "(([0-9]?[A-Z][a-z]+[0-9]?)+)" )
allows for numbers and more than two words
excellent work... really helping me get a handle on django... you mention that there's a better way than regular expressions to find wikiwords... can you elaborate?
Great screencast... really helping me to get my head around Django... You mention there's a better way to do WIkiWords instead of using regular expressions... can you elaborate?
Great screencasts, hope more is comming?
Martin
Ok I understood why it's auto-escaped. That's because I use Django svn trunk release and it auto-escapes content as explained in http://www.djangoproject.com/documentation/templates_python/#filters-and-auto-escaping
I used mark_safe() to continue to practice and follow the screencast.
Hi Siddhi,
Thanks for this great screencast!!!!
Django seems to escape by default know (I've just tried the <hr> example). Do you think it is yet needed to write {{page_name|escape}} ?
Awesome tutorial, thanks a lot! I'm learning Django, and this really helps.
Please do continue the series if you have the time. A logical next step might be sessions and authentication... Thanks again, keep it up!
András
Thanks for all the comments!
Thanks Siddhi, I watched both of your screen casts and they are really great. You have done in a few minutes what my friends tried to do for days two years before :)
Waiting for the third in series...
Brilliant work Siddhi. I was trying to get a grasp on Django and this sold it for me.
Siddhi, Excellent series. Thank you very much for the work that you have put into this. In screencast #2, I found the explanation of writing your own filters was particularly helpful.
I have two specific topics that I would like to suggest for the next screencast. The first is generic views. You have been writing your own custom views. How hard would it be to convert to using generic views? A second topic would be the testing framework offered by Django. Could you write both a simple unit test and a test against a view? A demonstration for both of those types of tests would be quite helpful.
Thanks again for your work putting these together.
Siddhi...
Excellent introduction to template inheritance and forms in Django, I'm exploring Django as an alternative to Ruby on Rails, which I already have quite a bit of experience with, and your tutorials have really helped.
Jeff.
Thanks a lot for the tutorial. I especially liked the demonstration of writing a custom filter.
Great tutorial, Siddhi!
It's the first time I see newforms in action. Great complement to Django's own tutorial.
If you consider producing the next django tutorial in the series, I'd like to see django app testing or django with Ajax.
Really appreciate your work.
Thanks
Well impressed by both videos, so much ground covered in 40 minutes. Great for people who wonder whether Django is worth investing time into!
Hi Siddhi
watched both the videos ..... Great job !!!
Thanks
Siddi this is one of the best video around here. On place two is the first Part :)
thank you so much!
Very useful, clear and easy to understand. Thanks!
Hey Siddhi,
thanks for you quick reply. Im running 0.96. clean_data works perfectly!
thanks for your help. Looking forward to the next part (if there is actually gonna be a next part).
Hi house,
In the svn development version the field was changed from clean_data to cleaned_data. So if you are using 0.96 release or an older svn version then the field will be called clean_data. In newer svn versions it is called cleaned_data.
Hey Siddhi, awesome screencast! Thanks a lot. Keep doing it! Very good for beginners (like me) to get into django.
just one thing, if i try to search i get an error that 'SearchForm' object has no attribute 'cleaned_data'. the validation itself works flawless. if i leave the search field blank, it tells me that the field is required.
do you have any idea what could be wrong?
thanks for your help.
regards
Both first part and second part of your Learn Django Series are great!
KUDOS on how you build on the first part to introduce other aspects of Django. It's very instructive to see how it all fits together.
Looking forward to see you expand on this series.
Congratulations and Txs Siddhi!
Super work Siddhi!!! Big thanks, for your time here. If you're looking for suggestions what to 'ShowMeDo' next I would be thankful for an example of using newforms with a model, specially one form for two different model model objects.
Awesome screencast again, Siddhi!
Interesting topics, delivered in a well-paced, logical and easy to follow way.
I can't wait to see the next part of your series...:-)



