title: Django Forum App Project Structure
body: <p><strong>EDIT: I'm new to this site but if you are going to down vote me, could you perhaps explain why? I've searched Google, this site and others but have not found anything that makes any sense and I thought this was a site to ask questions and get some help.</strong></p>
  
  <p>I've got a Custom PHP Forum that I am trying to convert to Python/Django as a learning experience and I'm having some problems. I've been reading up on Django and it is encouraged that our application is split into multiple apps. I went through the 6 part tutorial and many other parts of the documentation but I'm left with some questions.</p>
  
  <p>Let's assume that I have about 30 tables.</p>
  
  <p>Tables such as:
  posts_index, posts, users, user_groups, user_activity, user_sessions, forums, payment_gateways, payment_logs, etc for a basic forum</p>
  
  <p>I'm having issues structuring my models. With PHP all I needed was index.php, /admin/index.php, view_forum.php, view_thread.php and a few others, everything could pull directly from the database and I had no issues but now I have to deal with apps/modules.</p>
  
  <p>I'm thinking I'd need to structure my apps in a manner similar to this:</p>
  
  <pre><code>/admin/ app
  /forums/ app
  /view_forum/ app
  /view_thread/ app
  /forums/view_forum/ app (instead of just /view_forum/, could be a sub app)
  /forums/view_thread/ app (instead of /view_thread/, could be a sub app)
  </code></pre>
  
  <p><strong>My problem and only question here is dealing with global state. For example Users/Group/Session/Logging/Permission information is going to need to be shared across multiple apps through importing in the other apps models file. To do this I need to reference their model information, what is the correct way to handle this?</strong></p>
  
  <p>Would either of these be acceptable?</p>
  
  <ol>
  <li><p>Create a ton of different apps such as /users/ which would model my users_groups, users, user_sessions, another app for /posts/ that would include models for posts_index, forums, and so forth with these models existing but not actually being used publicly, they would be used in other apps only. They would be imported in areas such as the /view_forum/ app since when viewing a forum I might need to determine if the user is logged in, is a member of a particular group, etc and because of that would need access to a number of the hidden apps and hence would be imported from the hidden app.</p></li>
  <li><p>What if I just had one single app, instead of it being an app it would just be my entire project. This sounds like the best solution to me but it seems to be suggested if we cannot summarize the entire application into a sentence it needs to be broken up. If I went with one single app being used as my entire project, my models file will have 30+ different models, is this acceptable? I assume not but figured I'd ask.  </p></li>
  </ol>
  
  <p>Do either of the above make any sense? If not what would you do fix it? I'll admit I'm lost so any feedback would mean a lot.</p>
  
  <p>I'm new to Python/Django and am trying to figure things out. I hope I am clear on what I am trying to do. I'm more than welcome to any advice. I've been trying to play around with things but I figure it would be better to ask for advice from more experienced developers. I'm not a professional programmer and am still learning so please be nice :).</p>