Hi Praveen
It's not always an easy task being a developer.
However, I don't see the point in using Django, if you're not also
using all of the tools that available because you need a designer that
only know strict HTML, and don't know anything about the process. With
all the vars and tags you're
Hi Briel again my senior gave me other idea and they gave me a nice
reason why they want me to use get_absolute_url()
Given our new understanding of what the best practice is, the workflow
for a template designer, who shouldn’t need to know or understand
programming, is:
1. Ignore the documen
Thank you so much Briel. Really you gave me a nice explanation and the
same think i was thinking but was not able to make understand to my
senior. let me put your idea to my senior and lets see what they say..
but really i appreciate you and for your politeness.
On Jan 8, 6:43 pm, Briel wrote:
>
Hi Praveen
I personally would prefer naming the urls rather than using the
get_absolute_url.
Both can accomplish your goal, but naming the urls is a more robust
and in other ways a better solution.
If you in a week decide that the url should not be /category/... but
instead /whatever/... you woul
You can use reverse() in your get_absolute_url method, it works the
same as the url template tag in using your url patterns to generate
the url.
http://docs.djangoproject.com/en/dev/topics/http/urls/?from=olddocs#reverse
On Jan 8, 12:58 pm, Praveen wrote:
> Hi Briel i am totally confused now.
Hi Briel i am totally confused now.
My senior told me to write get_absolute_url
so i wrote get_absolute_url like this
class Listing_channels(models.Model):
list_channel = models.CharField(max_length = 20)
visibility = models.BooleanField()
def __unicode__(self):
return self.l
Using urls with names will solve your problem.
Basically if you change your urls.py like this:
url(
r'^category/listing_view/(?P\w+)/$',
'mysite.library.views.listing_view',
name = 'name_for_this_view'
),
What I have done is to add a name to the url for convenience
Hi Malcolm i am very new bie of Django. i read through
get_absolute_url but do not know how to use.
What you have given the answer i tried with that and its working fine
but my senior asked me what will happen if i change the site name then
every where you will have to change url
mysite.library.vi
Thank you so much Malcolm.
every one gives only the link and tell to read but your style of
solving the problem is amazing. how you explained me in a nice way
that i can never ever find in djangoproject.com.
Thanks you so much malcom
On Jan 8, 3:23 pm, Malcolm Tredinnick
wrote:
> I'm going to tr
Hi.
Instead of manually writing the url, you can instead use the {% url %}
tag, then Django would figure out what the correct url is. If you are
using url tags you should considder using named urls. The link with
url tag would end up something like this: {{n.list_channel}}
read about the url tag
I'm going to trim your code to what looks like the relevant portion of
the HTML template, since that's where the easiest solution lies.
On Thu, 2009-01-08 at 02:02 -0800, Praveen wrote:
[...]
>
> list_listing.html
>
>
> Sight Seeings
>
> {%if listing_result %}
> {% for n in listing_re
MODELS.py
class Listing_channels(models.Model):
list_channel = models.CharField(max_length = 20)
visibility = models.BooleanField()
def __unicode__(self):
return self.list_channel
class Listing(models.Model):
name = models.CharField(max_length=20)
descriptio
12 matches
Mail list logo