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 9243891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:54:27+00:00 2026-06-18T08:54:27+00:00

actually we have 2 models class Event(Basetable): title = models.CharField(max_length=150) event_description = models.TextField() image

  • 0

actually we have 2 models

class Event(Basetable):
    title = models.CharField(max_length=150)
    event_description = models.TextField()
    image = ThumbnailerImageField(upload_to=get_eventlogo_path, resize_source=dict(size=(700, 0), crop='smart'),)
    category = models.ManyToManyField("EventCategory")
    venue = models.ForeignKey(Venue,null=True)

class Venue(models.Model):
venue   = models.CharField(max_length=100)
address1 = models.CharField(max_length=200)
address2 = models.CharField(max_length=200,blank=True)
slug = models.CharField(max_length=150,blank=True,null=True)
country = models.ForeignKey(Countries,null=True,blank=True,on_delete=models.SET_NULL)
state = models.ForeignKey(States,null=True,on_delete=models.SET_NULL)
city = models.ForeignKey(City,null=True,on_delete=models.SET_NULL)

tastypie code

class EventResource(ModelResource):
venue      = fields.ForeignKey(VenueResource, 'venue')    

class Meta:
    queryset = Event.objects.filter(status='P').order_by('-id').distinct()
    resource_name = 'eventlist'
    filtering = {
        "slug": ('exact', 'startswith',),
        "title": ALL,
    }

my problem is i need to get event result using city which is in venue

ex http://www.example.com/api/v1/eventlist/?format=json&city=”chicago” but it is not coming help me

  • 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-18T08:54:28+00:00Added an answer on June 18, 2026 at 8:54 am

    You have to allow filtering by venue:

    filtering = { 'venue': ALL_WITH_RELATIONS
    
                   }
    

    This link will work.
    http://www.example.com/api/v1/eventlist/?format=json&venue_city_name=”chicago”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm investigating on how validates_presence_of actually works. Suppose I have two models class Project
I actually have two questions, the on in the title being the main one.
So I have the following models in my program: class User < ActiveRecord::Base has_many
I have the following Abstract: class A: clientname ... logs = models.ManyToManyField(B, blank=True, null=True)
I have two models : class Game before_save :update_teacher teacher end def update_teacher teacher.update_attribute(something,
(Django 1.x, Python 2.6.x) I have models to the tune of: class Animal(models.Model): pass
I have associated models like this: class Batch has_many :logs class Log belongs_to :batch
I actually have right now two questions: 1) What font faces are preferred for
I actually have two questions regarding exception/error handling in the iPhone app that I
I actually have 2 queries: How do I display the data of a variable

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.