MSSQL server database question

2021-10-14 Thread hebers
Greetings. I was given a task of creating a django app that will use a database. However, I am not given admin rights to create a database on MSSQL Server, and I can only create tables inside an assigned database with existing tables. I have tried migrations on an existing database (py manage

Re: Multi Database Question

2010-03-19 Thread Russell Keith-Magee
On Fri, Mar 19, 2010 at 10:19 PM, mbdtsmh wrote: > This makes alot of sense and works in my case - many thanks. > > However, still unclear as to how to specify which table should be > created in which database when you do want to syncdb to both > databases. I may have 2 tables in models.py that I

Re: Multi Database Question

2010-03-19 Thread mbdtsmh
This makes alot of sense and works in my case - many thanks. However, still unclear as to how to specify which table should be created in which database when you do want to syncdb to both databases. I may have 2 tables in models.py that I want to point to db_1 and 3 tables in models.py I want to s

Re: Multi Database Question

2010-03-19 Thread Daniel Roseman
On Mar 19, 8:44 am, mbdtsmh wrote: > Hi all - I'm trying out the multi database options in django 1.2 beta > on a new project. I can connect to two databases which is great. > > However, I'm not sure what to do in my models.py file??? > > I have a single class in models.py that points to a table o

Multi Database Question

2010-03-19 Thread mbdtsmh
Hi all - I'm trying out the multi database options in django 1.2 beta on a new project. I can connect to two databases which is great. However, I'm not sure what to do in my models.py file??? I have a single class in models.py that points to a table on a different database (existing table of data

Re: ORM / General Database Question

2008-04-02 Thread Malcolm Tredinnick
On Wed, 2008-04-02 at 08:06 -0400, Chris wrote: > I've done this without questioning it ever since I can remember : no > matter what, assign a primary key to everything. > > Is this necessary when you have a ForeignKey relation? Can the > ForeignKey be the unique identifier in the table? Yes, b

ORM / General Database Question

2008-04-02 Thread Chris
I've done this without questioning it ever since I can remember : no matter what, assign a primary key to everything. Is this necessary when you have a ForeignKey relation? Can the ForeignKey be the unique identifier in the table? --~--~-~--~~~---~--~~ You receive

Re: So how would YOU... (database question)

2007-05-25 Thread John M
Well, most dyno's (http://en.wikipedia.org/wiki/Dynamometer) should allow you to download the output to a file, and using Tim's example for loading, you should be able to put the data into the django app pretty easy. Here's what I would try, create a CSV or XML file for testing and loading into y

Re: So how would YOU... (database question)

2007-05-25 Thread Tim Chase
> H... that is intriguing. Probably overkill for my immediate needs, > but I see how a simplified version might do it for me. And definitely > opens up some intriguing possibilities. > > John, how do you think you'd hook a dyno up to the app... that could > be VERY useful, given this little a

Re: So how would YOU... (database question)

2007-05-24 Thread [EMAIL PROTECTED]
H... that is intriguing. Probably overkill for my immediate needs, but I see how a simplified version might do it for me. And definitely opens up some intriguing possibilities. John, how do you think you'd hook a dyno up to the app... that could be VERY useful, given this little app's future.

Re: So how would YOU... (database question)

2007-05-24 Thread John M
Tim, Brilliant idea. I'm a car nut and what you've built would allow a Dyno to be plugged into his django app and record all the data for a particular car, and then just have a view that pulled out the max hp or torque. Very coolmultiple measurements associated with a given vehicle: > > class

Re: So how would YOU... (database question)

2007-05-24 Thread Tim Chase
> First, hp and torque are both kinda meaningless unless you know where > they're at in the powerband, so I need hp "@" rpm (wherever the HP > peak is). Same for torque: torque lb.ft. @ rpm. > > Ideally, what I'd like is something that stores the values separately > (I can always return the value

So how would YOU... (database question)

2007-05-24 Thread [EMAIL PROTECTED]
I've started work on an automotive site. For fairly obvious reasons, I need to have horsepower and torque in the database. This presents a couple of issues. First, hp and torque are both kinda meaningless unless you know where they're at in the powerband, so I need hp "@" rpm (wherever the HP pea

Re: Database question

2006-12-01 Thread Todd O'Bryan
Do both. Have one table for entries, but include a ForeignKey to a class/table called Ministry (or Section, or Category, or whatever). Then all your blog entries will be in one big table, but you will be able to request only the ones that fit the category you're interested in. To create a new pag

Re: Database question

2006-12-01 Thread Kenneth Gonsalves
On 01-Dec-06, at 8:05 PM, Eric Lake wrote: >> 1) If it is all in one table then doing a search for information >> on the >> entire site would be easier. >> 2) If they are separated then adding a new page later would be >> done by >> just adding a new class to the model.py. i would go for on

Re: Database question

2006-12-01 Thread Eric Lake
That sounds good. I will start playing around with this and see if I can get something up with it. Thanks again for all of your help. On Dec 1, 12:52 pm, "Guillermo Fernandez Castellanos" <[EMAIL PROTECTED]> wrote: > > It almost seems that I could do away with the MINISTRY_CHOICES piece > > and j

Re: Database question

2006-12-01 Thread Guillermo Fernandez Castellanos
> It almost seems that I could do away with the MINISTRY_CHOICES piece > and just use the tags because if a tag name does not already exist the > admin interface will allow one to be created from the Entries page. If > that is the case then if I want a page to only display the posts for > music (a

Re: Database question

2006-12-01 Thread Eric Lake
OK. So does the following code look like it would work the way that we have been discussing? from django.db import models from django.contrib.auth.models import User # Create your models here. MINISTRY_CHOICES = ( ('MUS', 'music'), ('SIN', 'singles'),

Re: Database question

2006-12-01 Thread Guillermo Fernandez Castellanos
> Thank you. That is what I was thinking but I wanted to get others > opinions first. This will also help stay with the DRY ideals. I guess > the real difficult part would be if a new ministry is added to the > list. If I understand how it works I would have to make changes in the > model and then

Re: Database question

2006-12-01 Thread Eric Lake
Thanks for the comments. I am still in a planning phase and new to django as well. I will have to wrap my head around the tag stuff but these are great ideas. On Dec 1, 11:13 am, "Guillermo Fernandez Castellanos" <[EMAIL PROTECTED]> wrote: > > Thank you. That is what I was thinking but I wanted t

Re: Database question

2006-12-01 Thread Chris Ryland
On Dec 1, 9:59 am, "Eric Lake" <[EMAIL PROTECTED]> wrote: > Thank you. That is what I was thinking but I wanted to get others > opinions first. This will also help stay with the DRY ideals. I guess > the real difficult part would be if a new ministry is added to the > list. If I understand how it

Re: Database question

2006-12-01 Thread Eric Lake
Thank you. That is what I was thinking but I wanted to get others opinions first. This will also help stay with the DRY ideals. I guess the real difficult part would be if a new ministry is added to the list. If I understand how it works I would have to make changes in the model and then modify th

Re: Database question

2006-12-01 Thread Guillermo Fernandez Castellanos
Cheers, I would do it in a single table. Maybe i would add a field to the Post like: MINISTRY_CHOICES = ( ('MUS', 'music'), ('SIN', 'singles'), ('STU', 'students'), ) ministry = models.CharField(ma

Re: Database question

2006-12-01 Thread Eric Lake
Does anyone have a suggestion? On Nov 29, 9:24 pm, "Eric Lake" <[EMAIL PROTECTED]> wrote: > I am working on a church site that will have multiple areas. There will > be pages for each of the different ministries like music, singles, > students, etc. I am wanting a blog like function for each of t

Database question

2006-11-29 Thread Eric Lake
I am working on a church site that will have multiple areas. There will be pages for each of the different ministries like music, singles, students, etc. I am wanting a blog like function for each of these pages where the responsible people will be able to log in to the admin site and add news to

Database question

2006-11-29 Thread Eric Lake
I am working on a church site that will have multiple areas. There will be pages for each of the different ministries like music, singles, students, etc. I am wanting a blog like function for each of these pages where the responsible people will be able to log in to the admin site and add news to t

Re: General Database question re: multi user apps

2006-04-09 Thread Sandro
Thanks very much for your quick responses. I understand how the posts table will interact with the user's table under a foreignkey, my main concern was whether it would be better to have 1000's of records in one table or 100's of records in multiple tables. I am glad that you both pointed out th

Re: General Database question re: multi user apps

2006-04-09 Thread Arthur
> In the past I always worked with flatfiles so every user had their own > folder on the filesystem and all of their data was within that folder. > Does this mean that every user should have their own table to hold > their blog posts or I should have one blog_post table and throw > everyone's post

Re: General Database question re: multi user apps

2006-04-09 Thread Malcolm Tredinnick
On Sun, 2006-04-09 at 14:19 +, Sandro wrote: > I guess I am still new with databases so my question is regarding how I > should setup my models for a site where users can create accounts and > have their own private blogging areas. > > In the past I always worked with flatfiles so every user

General Database question re: multi user apps

2006-04-09 Thread Sandro
I guess I am still new with databases so my question is regarding how I should setup my models for a site where users can create accounts and have their own private blogging areas. In the past I always worked with flatfiles so every user had their own folder on the filesystem and all of their dat