Oh yeah i see.
Brilliant sorted it! Thanks for your help Melvyn.
--
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+unsubscr...@googlegroups.com.
To p
On Wednesday 29 March 2017 09:16:17 Will Holmes wrote:
> url(r'^(?P\d+)$/', views.viewEvent, name='viewevent'),
name = viewevent
> def get_absolute_url(self):
> return reverse('cal:viewEvent', args=[str(self.id)],
> current_app='cal')
name = viewEvent
> Sorry about the load of
I am making a calendar app which has a custom template tag that takes the
python HTML template function and overlays objects from the Events model on
the correct days. I am trying to get the displayed objects to have a link
directly to an object detail/edit view and am trying to use
/41592766/django-include-media-css-js-in-class-based-views
Am Montag, 9. Mai 2016 10:25:49 UTC+2 schrieb guettli:
>
> I have a custom Django template tag which creates HTML.
>
>
> This HTML needs some JS and CSS.
>
>
> How can I extend the media list with my custom template t
which creates HTML.
>
>
> This HTML needs some JS and CSS.
>
>
> How can I extend the media list with my custom template tag?
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe fro
gt;>>
>>> Thanks,
>>>
>>> Al
>>>
>>> On Thursday, September 1, 2016 at 8:09:29 AM UTC-4, ludovic coues wrote:
>>>>
>>>> I wouldn't do it this way.
>>>> Personally, I would make the POST request in the view func
1, 2016 at 8:09:29 AM UTC-4, ludovic coues wrote:
>>>
>>> I wouldn't do it this way.
>>> Personally, I would make the POST request in the view function, put
>>> the return value in the context. The template isn't a good place to
>>> hav
ally, I would make the POST request in the view function, put
>> the return value in the context. The template isn't a good place to
>> have logic. It should only take data and format them.
>>
>> 2016-09-01 5:33 GMT+02:00 Al Johri :
>> > Hi Django Users,
&g
, put
> the return value in the context. The template isn't a good place to
> have logic. It should only take data and format them.
>
> 2016-09-01 5:33 GMT+02:00 Al Johri >:
> > Hi Django Users,
> >
> > I want to make a custom template tag wher
t; I want to make a custom template tag where the tag's renderer needs to make
> a POST request.
>
> https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/#writing-the-renderer
> https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/#thread-safety-considerati
Hi Django Users,
I want to make a custom template tag where the tag's renderer needs to make
a POST request.
https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/#writing-the-renderer
https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/#thread-safety-considera
I have a custom Django template tag which creates HTML.
This HTML needs some JS and CSS.
How can I extend the media list with my custom template tag?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this
I got it working thanks. My template tag file is as follows:
from django import template
from django.utils import timezone
register = template.Library()
@register.simple_tag
def rowcolour(dt):
diff = timezone.now() - dt
if diff.days > 14:
return "pinkrow"
else:
return "greyrow"
--
You receive
On Wednesday, 15 October 2014 19:30:01 UTC+1, Daniel Grace wrote:
>
> Hi,
> I'm encountering the following problem with a token in my custom template
> tag:
> Request Method: GET
> Request URL: http://127.0.0.1:8000/flows/
> Django Version: 1.7
> Exception Type:
Hi,
I'm encountering the following problem with a token in my custom template
tag:
Request Method: GET
Request URL: http://127.0.0.1:8000/flows/
Django Version: 1.7
Exception Type: ValueError
Exception Value:
need more than 2 values to unpack
Exception Location: C:\landy\cresta\flow\templat
Hello,
I am currently writing a custom template tag and I need to access the
request object within the tag code.
When using tag helpers (*simple_tag*, *inclusion_tag *and *assignment_tag*)
you can register them with an additional takes_context=True parameter that
makes the request object
Hi all,
I'm trying to retrieve an object from a custom template tag. This is possible?
I explain here with details what I'm expecting to do?
http://stackoverflow.com/questions/15450003/django-how-to-retrieve-an-object-from-a-custom-template-tag
Any clues? What is the best way to av
I had the same issue, fixed it with a variation on Jim D.'s solution.
import bookmarks
then bookmarks.models.Bookmark.objects.filter(...)
On Tuesday, October 14, 2008 11:38:20 PM UTC-7, Chris Amico wrote:
>
> I have a simple bookmarks model based on the one in James Bennett's href="http://code.
Well holy crap!! context['user'] worked perfectly! I thought I would have
to come up with some crazy workaround!
Thank you kindly sir.
On Sunday, 29 July 2012 15:03:13 UTC-4, Ash Courchene wrote:
>
> So I made a custom template tag that allows pieces of content to be edite
>
> class EditableNode(template.Node):
> def __init__(self, location_name):
> self.location_name = location_name.encode('utf-8').strip("'")
> def render(self, context):
> obj = Placeholder.objects.filter(location=self.location_name)
> if request.user.is_authenticated():
> for x in obj:
> return
So I made a custom template tag that allows pieces of content to be edited
by the site administrator with the click of a link.
For instance, if i put {% editable 'index_block_one' %}, it would return
whatever content is in the Placeholder model I created with the name
"index_
Hello,
I can't make this feature
> *{% some_special_tag _("Page not found") value|yesno:_("yes,no") %} *
to work with this custom template tag -
http://djangosnippets.org/snippets/1289/ with django 1.4.
The result from {% breadcrumb _("Create") %} is _(
On Thu, Mar 29, 2012 at 5:42 PM, Nikhil Verma wrote:
> Hi All
>
> I am still not able to solve this problem .Any more suggestions ?
>
> Thanks
>
Because there is no solution. You must rewrite the custom tag to set a
variable in the context, which you can then test in your 'if' tag.
The link in m
Hi All
I am still not able to solve this problem .Any more suggestions ?
Thanks
On Thu, Mar 29, 2012 at 10:03 PM, Tom Evans wrote:
> On Thu, Mar 29, 2012 at 5:22 PM, Josh Cartmell
> wrote:
> > I think something like this would work:
> > {% with price_for_pax service pax '' as pfp %}
>
> It wo
On Thu, Mar 29, 2012 at 5:22 PM, Josh Cartmell wrote:
> I think something like this would work:
> {% with price_for_pax service pax '' as pfp %}
It won't. The {% with %} tag cannot arbitrarily call custom tags.
Cheers
Tom
--
You received this message because you are subscribed to the Google G
r
whatever equaled service.price, and then use it more directly.
Regards,
Josh
On Mar 29, 1:54 am, Tom Evans wrote:
> On Wed, Mar 28, 2012 at 4:59 PM, Nikhil Verma
> wrote:
> > Hi all
>
> > i have a custom template tag that takes some argument and calculates the
> &g
On Wed, Mar 28, 2012 at 4:59 PM, Nikhil Verma wrote:
> Hi all
>
> i have a custom template tag that takes some argument and calculates the
> result.
> I want to compare that value obtained from that custom tag with another
> variable.
>
> Custom template tag
> {
Hi all
i have a custom template tag that takes some argument and calculates the
result.
I want to compare that value obtained from that custom tag with another
variable.
Custom template tag
{% price_for_pax service pax '' %}
variable :
{{service.price}}
What i want is {% if ser
Hi everybody,
I have a weird problem with a custom template tag I made. The template
tag is built on top of django-voting app and provides upvote and
downvote counts, while standard django-voting tags only provides total
number of votes and score.
Here is the snippet I wrote: http
Hi,
lets say I want my templatetag to collect menu items from all the
rendered template pieces.
I thought of writing custom templatetag which would work as following:
this would be called in "sub-template"
{% register_menu_item "some item" "/someItem/view" %}
and finally the "main" template woul
hello,
you can just add a context variable 'submitted' to your context in
your view's get_context_data
konstantin
On Aug 15, 4:06 am, doniyor wrote:
> Hi There,
>
> I am heading well now, but have still some confusing things here..
>
> this is my html file, where i want to get a success message
Hi There,
I am heading well now, but have still some confusing things here..
this is my html file, where i want to get a success message after the
form is submitted:
__
{% load forms %}
{% if submitted %}
Thanks, I've added a function to the Enty models. It doesn't in some cases I
get good returns now. But not always.
Content is the name of the app. There is no PK-relation on the Category
class, but only the below on the Entry class.
class Entry(models.Model):
categories = models.ManyToManyF
re of the
categories for that Content instances Entry instance
You could do a custom template tag like yours:
{% get_related_entries content_instance.entry as related_entries %}
That tag would do something like the following :
#fetching primary key only since we don't need the whole thing
ca
The obj simulates a single Entry in a template for use in the shell.
I'm trying to put this in a custom template tag, so a list of related
entries can be shown with a blog entry. I cooked up the following:
{% load content_tags %}
{% get_related_entries content.
On Fri, Apr 29, 2011 at 5:11 PM, Daniel Roseman wrote:
> On Friday, 29 April 2011 21:24:44 UTC+1, Kenny Meyer wrote:
>>
>> Hello,
>>
>> I have the following inclusion tag in templatetags/show_submissions.py :
>>
>> ## BOF
>>
>> register = template.Library()
>>
>> @register.inclusion_tag('competiti
On Friday, 29 April 2011 21:24:44 UTC+1, Kenny Meyer wrote:
>
> Hello,
>
> I have the following inclusion tag in templatetags/show_submissions.py :
>
> ## BOF
>
> register = template.Library()
>
> @register.inclusion_tag('competition/templatetags/show_submissions.html')
> def show_submissions(parti
Hello,
I have the following inclusion tag in templatetags/show_submissions.py :
## BOF
register = template.Library()
@register.inclusion_tag('competition/templatetags/show_submissions.html')
def show_submissions(participant):
submissions = Submission.objects.get(participant=participant)
My mistake. There was a small typo. It was called __init.py__, not
__init__.py. I fixed it and it works now.
Thanks,
Nate
On Sun, Dec 19, 2010 at 9:20 PM, Nate Reed wrote:
> Karen, thanks for your reply. The module myapp/templatetags does
> have an __init__.py file. There is no __init__.p
Karen, thanks for your reply. The module myapp/templatetags does
have an __init__.py file. There is no __init__.pyc file, though.
n...@nate-desktop:~/work/django-projects/myproject/myapp$ ls templatetags/
mytags.py __init.py__
On Sun, Dec 19, 2010 at 8:59 PM, Karen Tracey wrote:
> On Sun, De
On Sun, Dec 19, 2010 at 8:40 PM, Nate Reed wrote:
> When I try to import my module in the shell I also am unable to import it:
>
> >>> from django.templatetags import mytags
> Traceback (most recent call last):
> File "", line 1, in
> ImportError: cannot import name mytags
> >>> from myapp.temp
Hi, I'm using Django 1.2.1 and I'm having problems trying to load my
template tags:
{% load mytags %}
TemplateSyntaxError at /myapp/
'mytags' is not a valid tag library: Template library mytags not
found, tried django.templatetags.mytags
It's defined in myproject/myapp/templatetags/mytags.py.
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this gro
Hello,
I think you should use something like alt="{{ object.title }}" /> in your template: you want to output images'
url in your template, not the "object" itself. You'll find explanations
in [1] and [2].
Regards
[1]
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.
I have the following code that fails to display object images. But
displays normal images fine.
My Model
class News(models.Model):
title---
image = models.ImageField(upload_to='images')
body
Template tag coding
from django import template
register = template.Library()
from -
Thank you Daniel!!
I'll try it!! :)
On Sep 3, 8:45 pm, Daniel Roseman wrote:
> On Sep 3, 9:27 am, funcrush wrote:
>
> > Hi, all.
> > I wrote acustomtemplatetagpackage in aappthat named Blogs.
> > And I madeotherappnamed SMS.
> > But I don't know how to use thecustomtemplatetagthat located Blogs
On Sep 3, 9:27 am, funcrush wrote:
> Hi, all.
> I wrote a custom template tag package in a app that named Blogs.
> And I made other app named SMS.
> But I don't know how to use the custom template tag that located Blogs
> in SMS app.
> If anybody know, please help me.
&g
Hi, all.
I wrote a custom template tag package in a app that named Blogs.
And I made other app named SMS.
But I don't know how to use the custom template tag that located Blogs
in SMS app.
If anybody know, please help me.
thank you :)
--
You received this message because you are subscrib
ite a custom template tag and use it in a
> template and from a view?? Or is there already something like this out
> there
You could write a function that does what you need and can be used in
views,
then write template tag as an thin adaptor around this function - so
that
you can use it in tem
I need to write a custom tag. I have a hierarchy of objects that I
want to turn into a chaptered document. But I want to be able to build
and display the document in a template AND generate a PDF or other
format from a view. Can I write a custom template tag and use it in a
template and from a
Thanks for advice!
On Oct 4, 2009 9:23 PM, "AmanKow" wrote:
> custom tag is a function - cant you just assing its return in view > into
variable and send this...
The usual way to go about this would be to modify your tag to take an
optional "as var_name". When the tag has the optional portion,
> custom tag is a function - cant you just assing its return in view
> into variable and send this variable to template?
The usual way to go about this would be to modify your tag to take an
optional "as var_name". When the tag has the optional portion, you
would update the value into the varia
(troll alert)
What you need is to use WHIFF configuration templates
which allow recursive embedding of "tags" (applications really).
As far as I know WHIFF can't be used in Django because Django
can't embed an arbitrary WSGI application (I'd love to be wrong).
Nevertheless, please check out:
htt
On Sat, Oct 3, 2009 at 4:01 PM, Andrew wrote:
>
> Anyway, I thound that's not possible, so I will need to create
> specific custom tag for this.
>
> On Oct 3, 2:07 pm, Andrew wrote:
>> Hello,
>>
>> is there any way to use custom template tag inside {if}
Anyway, I thound that's not possible, so I will need to create
specific custom tag for this.
On Oct 3, 2:07 pm, Andrew wrote:
> Hello,
>
> is there any way to use custom template tag inside {if} or ifequal
> tag?
>
> I have custom tag "getpreference" which ac
Hello,
is there any way to use custom template tag inside {if} or ifequal
tag?
I have custom tag "getpreference" which accepts one parameter and
returns string value or empty "" string.
I want to check if value is not empty inside {if} or maybe {ifequal}
tag, how
On Thu, Oct 1, 2009 at 8:47 PM, shacker wrote:
>
> Found the problem. There were no namespace problems in my template
> tag, but there were (are) in the external app I'm using, which is the
> RSS aggregator used by the djangoproject.com site itself:
>
>
> http://code.djangoproject.com/browser/dja
On Oct 1, 4:00 pm, Karen Tracey wrote:
>
> Yes, you must simply ensure you name things in such a way that the models
> module you want to access is not hidden by something else. The original
> problem noted in the thread you reference resulted from re-using the
> application's name (bookmarks) a
On Thu, Oct 1, 2009 at 6:16 PM, shacker wrote:
>
> Google apparently won't let me reply to an older thread:
>
> http://groups.google.com/group/django-users/browse_thread/thread/94239f017df4b12f
> so starting a new one.
>
> I too was hitting the "No module named models" problem when creating a
> t
Google apparently won't let me reply to an older thread:
http://groups.google.com/group/django-users/browse_thread/thread/94239f017df4b12f
so starting a new one.
I too was hitting the "No module named models" problem when creating a
template tag. I had the tag working perfectly when it communicat
On Jun 15, 10:47 pm, Alex Gaynor wrote:
> On Mon, Jun 15, 2009 at 4:39 PM, greatlemer wrote:
>
>
>
>
>
> > Hi everyone,
>
> > I was creating some custom template tags and attempted to import my
> > models through the following import at the top of the file:
>
> > from ..models import *
>
> > Unfo
On Mon, Jun 15, 2009 at 4:39 PM, greatlemer wrote:
>
> Hi everyone,
>
> I was creating some custom template tags and attempted to import my
> models through the following import at the top of the file:
>
> from ..models import *
>
> Unfortunately this seems to be attempting to import from django.m
Hi everyone,
I was creating some custom template tags and attempted to import my
models through the following import at the top of the file:
from ..models import *
Unfortunately this seems to be attempting to import from django.models
(which doesn't exist) rather than myapp.models and therefore
This is the final code which works in case it helps anyone else.
Thanks again.
In the template:
{% page_links category %}
In templatetags file
@register.tag(name="page_links")
def get_page_links(parser,token):
tag_name, category = token.contents.split()
return PageLink(cate
You understood perfectly. It was just another case of my not
understanding the documentation. Your explanation makes perfect
sense.
Many thanks.
On Jan 27, 6:45 pm, Eric Abrahamsen wrote:
> On Jan 28, 2009, at 1:52 AM, phoebebright wrote:
>
>
>
>
>
> > I have duplicated as best I can the proc
e.objects.filter
> (is_live=True).select_related().order_by('order')
>
>else:
>pages = False
>
> self.pages = pages
>
>def render(self, context):
>context['pages'] = self.pages
>
>return '
I have duplicated as best I can the processing for handling variables
in custom template tags mentioned in an earlier post but it's not
working for me as I need the value of the variable before I parse it.
Is there another way of making the variable available?
The tag is being called from the tem
On 15 oct, 09:19, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> On Wed, 2008-10-15 at 01:08 -0700, bruno desthuilliers wrote:
>
> [...]
>
> > FWIW, I just don't understand why each an every example in the
> > Django's manual insists on using this projectname.appname scheme.
>
> "Insists" is a
I came across this thread and was having the exact same problem.
*Exactly* the same... I had tried everything you tried to no avail.
I actually fixed it by taking a hint from something that came out of
following along with your debug session in my own code.
I'll put my solution in terms of your
I guess it was easier for me to type it myself than search through the
new documentation. :)
Erik
On 20.10.2008, at 5:49, James Bennett wrote:
>
> On Sun, Oct 19, 2008 at 4:20 PM, Erik Allik <[EMAIL PROTECTED]> wrote:
>> In the compilation function of your template tag, you can force the
>> p
On Sun, Oct 19, 2008 at 4:20 PM, Erik Allik <[EMAIL PROTECTED]> wrote:
> In the compilation function of your template tag, you can force the
> parser to parse until tag named "endyourcustomtag" by calling nodelist
> = parser.parse(("endyourcustomtag", ). This will return the contents
> of your blo
Thank you!
Sia
On Oct 19, 5:20 pm, Erik Allik <[EMAIL PROTECTED]> wrote:
> In the compilation function of your template tag, you can force the
> parser to parse until tag named "endyourcustomtag" by calling nodelist
> = parser.parse(("endyourcustomtag", ). This will return the contents
> of
In the compilation function of your template tag, you can force the
parser to parse until tag named "endyourcustomtag" by calling nodelist
= parser.parse(("endyourcustomtag", ). This will return the contents
of your block tag as a list of nodes. Finally you can "drop off" the
end tag by ca
Hi,
I can't understand how template tags such as if, for and ifequal
manage to have an accompanying endif, endfor and endifequal, and I
can't have it. Or I can't manage to find out how to do it. So, I
basically want to do something like:
{% customTag %} hello {% endcustomTag %}
and within my cu
I think it's fixed now. After much refreshing (I'm editing in Coda) a
bookmarks.pyc file appeared. Once that was gone, the tag library did
load correctly. I have a different error coming up now, which I'll try
to fix or post separately if I can't.
Thanks for the help and patience, folks.
On Oct
OK, tried all that, got pretty much the same results:
>> import bookmarks
>>> dir(bookmarks)
['__builtins__', '__doc__', '__file__', '__name__', '__path__',
'models']
>>> bookmarks.__file__
'/home/chrisamico/lib/python2.5/bookmarks/__init__.pyc'
>>> from bookmarks import templatetags
>>> dir(temp
oh well.
check that you have an __init__.py file in the templatetags directory
try this:
in bookmark_tags.py (and do keep the name that way, or later you will be
caught by this)
right before the import line throw it in into the debugger:
import pdb; pdb.set_trace()
in the debugger try:
>>> i
Tried that. Still no good. I renamed the file as bookmark_tags.py and
deleted every .pyc file in the app. Nothing in my templatetags
directory actually compiled--neither __init__.py nor bookmarks.py
(even after being renamed).
Like I said before, when I take out the import line (from
bookmarks.mo
this gets me every time.
the error is yes because the template tag is called bookmarks.py
and its inside a module called bookmarks.py
rename it to bookmarks_tags.py ...
and now
DELETE THE DAMNED OLD bookmarks.pyc file !
python is still finding the old compiled file.
its happened to me
Wish it were that easy. The app is installed, and it works everywhere
else. If I take out the {% load bookmarks %} from the template, the
rest of the app works fine. I have a view that bookmarks an object,
and it checks if a user has bookmarked that object first.
This is how I did it in the view
Seems like the problem's got to be with the "from bookmarks.models
import Bookmark" line.
The "No module named models" part of your error message suggests that
Django doesn't know about your bookmarks/models.py ... if that app is
on your Pyton path, any chance that it's just not listed in your
IN
The templatetag file is indeed called bookmarks.py. I thought of that,
tried renaming it as bookmark_tags.py, and got the same error. I'll
add that the bookmarks app lives on my python path, not in any
particular project, since I'm trying to make this as reusable as
possible.
At one point, I trie
On Oct 15, 7:38 am, Chris Amico <[EMAIL PROTECTED]> wrote:
> I have a simple bookmarks model based on the one in James Bennett's href="http://code.google.com/p/cab/source/browse/trunk/models.py?
> r=130">Cab application. I'm using a generic relation so it can
> live in its own app and a user can
On Wed, 2008-10-15 at 01:08 -0700, bruno desthuilliers wrote:
[...]
> FWIW, I just don't understand why each an every example in the
> Django's manual insists on using this projectname.appname scheme.
"Insists" is a rather strong word, since nowhere does it say "do this or
else". Also, out of al
On 15 oct, 08:45, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
(snip otherwise sound advises)
> although I would also
> recommend using full paths when importing (ie from
> projectname.bookmarks.models).
No. *Don't*. If you do so, imports will break when renaming the
directory or trying to reuse
I have a simple bookmarks model based on the one in James Bennett's http://code.google.com/p/cab/source/browse/trunk/models.py?
r=130">Cab application. I'm using a generic relation so it can
live in its own app and a user can bookmark any object on the site
(I'm planning on reusing this app on a c
template filter is approx:
>
> @register.filter
> @stringfilter
> def get_file_version(value, arg):
> if arg in STATIC_ASSETS:
> value = STATIC_ASSETS[arg] + arg;
> else:
> value = arg;
> return value
>
> 2) simple custom template tag
> templates
STATIC_ASSETS:
value = STATIC_ASSETS[arg] + arg;
else:
value = arg;
return value
2) simple custom template tag
templates look like:
template tag code:
@register.simple_tag
def get_file_version(arg):
value = arg
if arg in ASSET_LIST:
value = ASSET_LIST[arg] +
Hi! Yes, in fact on the development server it works fine. On the
production server I'm using lighttpd/fcgi, and I have stopped and
restarted both approximately 800 times. It's very strange. I feel
like it must be something to do with my server configuration. I have
the exact same versions of
On 28 Apr 2008, at 1:35 am, Jay wrote:
> And I think that's it. This is really driving me crazy. Is there
> anything I'm forgetting? Anything obvious? I would be extremely
> grateful if someone could give this a once-over and let me know what
> I'm missing.
If you're running on Apache, have
Even more frustrating is that I just checked in the python shell and
can successfully load paginate:
#python
Python 2.5.1 (r251:54863, Mar 7 2008, 03:39:23)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Hi, all. I think I have an uncommon problem here--I've been looking
into it for hours, and it's driving me crazy.
I'm trying to install a custom paginator template tag in Django
revision 7403. I'm getting the error message:
'paginate' is not a valid tag library: Could not load template library
2008/1/13, Alex Koshelev <[EMAIL PROTECTED]>:
>
> 'templatetags' instead of 'templatetag'
> '{% load feed_import %}' instead of '{% load feedimport %}'
My error wasn't that (I made a mistake writing here). It was a failed
import inside the tag, and that caused the error without the correct
error
'templatetags' instead of 'templatetag'
'{% load feed_import %}' instead of '{% load feedimport %}'
On 13 янв, 19:47, Alessandro <[EMAIL PROTECTED]> wrote:
> I'm trying to create a custom template tag. I've added a feedimport
> app in
The correct directory for your tags is "templatetags", not
"templatetag"
On 13 янв, 19:47, Alessandro <[EMAIL PROTECTED]> wrote:
> I'm trying to create a custom template tag. I've added a feedimport
> app in my project, added it on my installed apps,
I'm trying to create a custom template tag. I've added a feedimport
app in my project, added it on my installed apps, and inside it I've
created a templatetag directory with a file feed_import.py
Both feedimport and templatetag dirs have an empty __init__.py file.
I'
On Dec 5, 2007 7:09 PM, Michal Ludvig <[EMAIL PROTECTED]> wrote:
>
>
>
> > Michal Ludvig wrote:
>
> > > for the project I'm working on I needed to create a custom template tag,
> > > call it 'mytag'.
>
> > > If I use it
on I needed to create a custom template tag,
> > call it 'mytag'.
> >
> > If I use it as {% mytag something %} everything goes fine (where
> > 'something' is a string passed to the template).
> > However I can't add any filters to tha
Michal Ludvig wrote:
> for the project I'm working on I needed to create a custom template tag,
> call it 'mytag'.
>
> If I use it as {% mytag something %} everything goes fine (where
> 'something' is a string passed to the template).
> However I ca
Rune Bromer wrote:
> On Dec 5, 2007, at 11:59 AM, Michal Ludvig wrote:
>
>> Hi all,
>>
>> for the project I'm working on I needed to create a custom template
>> tag,
>> call it 'mytag'.
>>
>> If I use it as {% mytag something %} e
1 - 100 of 119 matches
Mail list logo