I’m working (well, investigating at the moment) with a very old SQL server database primarily used for another system written using MS Access (connecting with ODBC). I’m finding that I am having to create views for each table that I use in my Django project named along the lines of dbo.AppName_ModelName.
The screen shot shows the STAFF table recreated in a sandpit database and the PollsterSystem_vwSTAFF view needed to service a vwSTAFF model class.
The Model class is then
class vwSTAFF(models.Model): STAFF_CODE = models.CharField(primary_key=True, max_length=50) EMPLOYEE_NUMBER = models.CharField(max_length=30) #User name PASSWORD = models.CharField(max_length=10) class Meta: managed=False
This all works fine but it’s ugly as sin. Is there a way of persuading Django to not insist on the application prefix?