Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8031065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:58:13+00:00 2026-06-05T00:58:13+00:00

I’ve been banging my head against this for a while, but can’t seem to

  • 0

I’ve been banging my head against this for a while, but can’t seem to figure it out.
I’ve got an app with a set of custom template tags:

from django import template
from crowd.models import Payment, Project, ProjectCategory

register = template.Library()


@register.filter
def is_customer(user, project):
   try:
      return Payment.objects.filter(user=user, project=project).count() > 0
   except:
      return False

That throws:

'project_tags' is not a valid tag library: ImportError raised loading crowd.templatetags.project_tags: No module named models

The app tree looks like:

crowd/
   -- __init__.py
   -- models.py
   templatetags/
      -- __init__.py
      -- project_tags.py

Importing from just models and crowd.models both give me the same error.

Traceback: here

Update

I was working on something unrelated when I noticed this was broken, so I reverted to an earlier, known working version of the project. Still the same problem, so I think Daniels answer about the PYTHONPATH is correct, however, how can I repair this?

>>> import sys
>>> sys.path
['/Users/****/Documents/dev/product/src/Product', ...]

The __init__.py’s are all there all the way down, and crowd is in Product, so shouldn’t it be on the path?

Update 2

I’ve done some investigating in the shell:

>>> from crowd.models import *
>>> from crowd.managers import *
>>> from crowd.constants import *
>>> from crowd.templatetags import *
>>> from crowd.templatetags import project_tags
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/Murph/Documents/dev/product/src/Product/crowd/templatetags/project_tags.py", line 4, in <module>
    from crowd.forms import SearchForm
  File "/Users/Murph/Documents/dev/product/src/Product/crowd/forms.py", line 5, in <module>
    from crowd.models import Payment, Project, ProjectUpdate, GalleryPhoto
ImportError: No module named models
>>> 

Still don’t know why specifically that’s failing, especially since the blanket import works.

Update 3

Took me a while to see that the shell command was giving a more useful message than the django one, which led to this:

Turns out it wasn’t even related to project_tags directly, it just wasn’t a very useful error message. The import in project_tags.py of:

 from crowd.forms import SearchForm

was calling:

from crowd.models import Payment, Project, RewardLevel, ProjectUpdate, GalleryPhoto

in forms.py, which should have been:

from models import Payment, Project, RewardLevel, ProjectUpdate, GalleryPhoto

I’ll add this as the answer when I can, apparently can’t until 8 hours later.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:58:15+00:00Added an answer on June 5, 2026 at 12:58 am

    Took me a while to see that the shell command was giving a more useful message than the django one, which led to this:

    Turns out it wasn’t even related to project_tags directly, it just wasn’t a very useful error message. The import in project_tags.py of:

     from crowd.forms import SearchForm
    

    was calling:

    from crowdfunder.models import Payment, Project, RewardLevel, ProjectUpdate, GalleryPhoto
    

    in forms.py, which should have been:

    from models import Payment, Project, RewardLevel, ProjectUpdate, GalleryPhoto
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.