Hi there. My first django Question here ;)
I am trying to make this work:
def _user_gotta_go_somewhere(request):
gotta_go_through = request.user.get_profile
().gotta_go_through_this_url()
if gotta_go_through and gotta_go_through != request.path:
return HttpRespons
Exactly. Thats what I need to learn :o)
Thanks alot :o)
On 21 Aug., 17:25, David Zhou wrote:
> On Aug 21, 2009, at 9:54 AM, MIL wrote:
>
> > this works fine but I dont want to repeat it in all my views:
> > def my_profile(request):
> > gotta_go_through =
Since I had the pleasure of getting help in here once I will try
again :o)
I have read about the mark_safe, and I would like to use it, but it
just returns the value "False"
What am I doing wrong?
i my view:
from django.utils.safestring import mark_safe
...
context = RequestContext
Since I had the pleasure of getting help in here once I will try
again :o)
I have read about the mark_safe, and I woul like to use it, but it
just returns the value "False"
What am I doing wrong?
i my view:
context = RequestContext(request, {
'title' : title,
'p_
Hi. Im sorry. I closed the question again, cause I found out that it
worked just fine :o)
Thanks for helping though :o)
On 25 Aug., 02:51, Karen Tracey wrote:
> On Mon, Aug 24, 2009 at 7:01 PM, MIL wrote:Since I had
>
> the pleasure of getting help in here once I will try
>
>
Hi guys :o)
Im attempting to create a template tag but I get a strange response.
it returns "None" where I put the {% if blog_detail %} tag
Here is my template tag
class BlogNode(Node):
def __init__(self, user, varname):
self.user, self.varname = user, varname
d
Okay. Seems logic. But Im not sure what I should do.
So what would you do?
Thanks
On 26 Aug., 12:09, Daniel Roseman wrote:
> On Aug 26, 12:44 am, MIL wrote:
>
>
>
> > Hi guys :o)
>
> > Im attempting to create a template tag but I get a strange response.
> >
=self.user)
except ObjectDoesNotExist:
context[self.varname] = None
return ""
On 26 Aug., 14:58, Daniel Roseman wrote:
> On Aug 26, 1:51 pm, MIL wrote:
>
> > Okay. Seems logic. But Im not sure what I should do.
>
> > So what
""
Thanks alot for your help :o)
Have a nice night
On 26 Aug., 14:58, Daniel Roseman wrote:
> On Aug 26, 1:51 pm, MIL wrote:
>
> > Okay. Seems logic. But Im not sure what I should do.
>
> > So what would you do?
>
> > Thanks
>
> Add return &q
Hi again. Sorry to disturb you again, but I ran into another issue
related to this template tag I wrote.
I get the following error:
TemplateSyntaxError at /
Caught an exception while rendering: Truncated incorrect DOUBLE value:
'user'
I am not sure what it means exactly, but I beleive the erro
Hello :o)
I would like to know how to get the model name of an object.
sort of like object.get_model_name or something like that
Is there a way to that.
I tried altering my model something like this, but it doesnt work:
def get_model_name(self):
return '%s'%(class)
T
Thanks, both of you :o)
I tried using it directly in my template like
{{object.__class__.__name__}}
But that didnt work.
So I did it by adding this to my models:
def get_model_name(self):
return self.__class__.__name__
And it works
Thanks again :o)
On 27 Aug., 13
Hi :o)
I am attempting to create a simpler way to create my links. and I
developed this template tag:
class LinkNode(Node):
def __init__(self, object):
self.object = object
def render(self, context):
model_name = self.object.get_model_name()
ore about it all.
Have a good day
Michael
On 29 Aug., 04:51, Karen Tracey wrote:
> On Fri, Aug 28, 2009 at 10:34 PM, MIL wrote:
>
> > Hi :o)
>
> > I am attempting to create a simpler way to create my links. and I
> > developed this template tag:
>
&g
ect)
>
> Not that you need it for this tag, since simple_tag works, but you may want
> to
> write something fancier someday.
>
> Bill
>
> On Fri, Aug 28, 2009 at 10:34 PM, MIL wrote:
>
> > Hi :o)
>
> > I am attempting to create a simpler way to create m
I experience problem with special chars like æøå in filename when
using models.ImageField.
What am I doing wrong?
models.py
picture = models.ImageField(upload_to='pics', blank=True,
verbose_name='Picture of you')
Using model forms
Let say I want to upload picture named "æøå.jpg"
If I do tha
16 matches
Mail list logo