I am using webbrowser library because this project is supposed to store bookmarks instead of my browser. Storing bookmarks in a app is useful only if there is a way to open them via the app. I was initially serving the bookmarks as hyperlinks but then came across a problem. Web browser's were not allowing me to open locally stored web pages. So I decided to open the webpages through webbrowser library as client viewing the page and server are on same machine.
-- Relevant discussion on this forum https://groups.google.com/forum/#!topic/django-users/rSqSftkl5mg
Ask in case any confusions.
On Monday, May 26, 2014 9:49:47 PM UTC+5:30, Andre Terra (airstrike) wrote:
On Monday, May 26, 2014 9:49:47 PM UTC+5:30, Andre Terra (airstrike) wrote:
Why are you using the webbrowser library? I don't see how it makes sense..Cheers,ATOn Mon, May 26, 2014 at 12:32 PM, Aseem Bansal <asmba...@gmail.com> wrote:
Thanks Shmengie. I was thinking of using class based views as it was pointed in tutorial that they are better but I was not sure which ones are good here. So I decided to prioritize making it work and then go for refactoring. CSS location I will change.The tutorials used include's but I didn't get the benefit of using that in a small project. I mean in a program I can think of independent units and turn them into functions but in HTML how do you go about breaking it into parts? I mean the thought process for deciding the parts. If I have many files then I can extract the common things but for a single file I am not sure how to go about that.Partials refers to the sub-templates. Correct?Custom template tags - I'll put that on my TODO list for later reading.
On Monday, May 26, 2014 7:28:02 PM UTC+5:30, shmengie wrote:Looks like you're getting a handle on django.
You're not using Class Based Views, but you import generic. Since you're getting familiar with django, you *might* want to hold off on delving into CBVs. They're very powerful and can reduce coding, but can be difficult to wrap your head around.
Once you've created your app with functions, then perhaps go back and wrap 'em in CBV's. CBV's have a lot of power, but while learning the basics, sticking with functions can be a lot less assimilate all at once.
In your template, you have CSS at the bottom. CSS is typically linked in the <head></head> section. I suppose most web browsers today are okay either way. Javascript/jquery is typically near the end of the html, as you have it.
I wish w3c/html5 spec'd tags for <css></css> and <script></script> locations. Javascript more than css links seem feel sloppy to me, ahh well, it is what it is.
Next, I suspect you might want to work on a base.html and working with {{include's}}. It's a fairly easy concept to grasp and some of the beauty of django's templating. I wouldn't recommend delving into custom template tags yet, but it's good to know they exist.
You're template is not complex, being familiar with partials is an easy way to keep it simpler.
-JoeTo view this discussion on the web visit https://groups.google.com/d/--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users .msgid/django-users/33c0987a- .9edb-42dc-b37a-28c6273d2253% 40googlegroups.com
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/44ba1e07-457c-40b7-b205-c179bf9de010%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment