Code

Opened 9 years ago

Closed 9 years ago

#176 closed defect (invalid)

Database settings should not be kept in settings.main for ease of packaging.

Reported by: moof@… Owned by: adrian
Component: Tools Version:
Severity: normal Keywords: django-admin database settings distribution
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I'm currently developing a project which I hope will be reusable. This obviously includes a certain amoutn fo setting thins up in settings.main. However, when it comes to packaging this project, I'm goign to have to keep remembering to remove my database setting from the file before uploading. Ditto if I want to keep my project in a public svn repository.

I propose moving the database settigns by default to settings/db.py which will be imported from within main.py

This file will be created by django-admin startproject but a new command should be added to just add the skeleton db.py file to projects that have been distributed without it.

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by moof@…

Looking at it, it's a bit more complex than that, isn't it?

I suppose what I'm trying to do is remove things like INSTALLED_APPS from the main settings file.

Or maybe I'm just not getting how to distribute an application.

comment:2 Changed 9 years ago by Moof <moof@…>

  • Resolution set to invalid
  • Status changed from new to closed

Hmm, now I've played with it a bit more, I get it. No need to change. Sorry for the bother.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.