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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:30:53+00:00 2026-05-14T19:30:53+00:00

I am working on a Django app and I have a class which reads

  • 0

I am working on a Django app and I have a class which reads the contents of a file and returns a Django model. My question is where do I store this class in the file system? All this does is reads the file, populates a Django model and returns it.

Thanks

  • 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-05-14T19:30:54+00:00Added an answer on May 14, 2026 at 7:30 pm

    There is nothing special about a Django application: it’s just a Python package. Technically you can put the class anywhere you can import.

    With that being said, it’s best to keep related code bundled together. It sounds like a good place for this particular class is in the file that declares the Model it returns.

    On the other hand it might be logical to throw it into the application’s __init__.py file.

    You could also make a utils, etc, admin, scripts . . . folder/package to put utility classes and scripts if it’s meant to be used for administration and site maintenance.

    In the end it’s more about how you want to organize your project, but technically it can live just about anywhere.

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

Sidebar

Related Questions

I'm working on a django app right and I'm using cherrypy as the server.
Hey, i am currently working on a django app for my studies, and came
I'm working on a little django app for reserving prints of paintings. Customers go
I'm working on a blog application in Django. Naturally, I have models set up
I am working through the examples in a Django book that I have, but
I'm using django-ajax-selects , which is a freely available django app providing jquery autocomplete
I'm working on a Django app for hosting media (specifically audio and images). I
In a django app, I have models for a Word (to be learned), a
Am working with django Publisher example, I want to list all the publishers in
I am working on an django application that will return what historically was a

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.