[Solved] Re: database tables are not being created

2017-08-09 Thread jjanderson52000
Andreas, Thank you for the help. It turned out my __init__.py file was missing in my migration directories. Once added, everything ran great. Jim On Monday, August 7, 2017 at 3:33:18 PM UTC-4, jjander...@gmail.com wrote: > > > I have been working on a django application for several months, lea

Re: database tables are not being created

2017-08-07 Thread jjanderson52000
Andreas, The apps are included in the INSTALL_APPS in settings.py With regard to the models file, I'm not sure what you are referring to. In my application there is a driectory 'models' and in that directory, there is a separate file for each model and inside each of those files there is a cl

database tables are not being created

2017-08-07 Thread jjanderson52000
I have been working on a django application for several months, learning as I go. I have run into a problem now and I'm not sure what I should be doing next. Up until now my admin has worked, but I had a problem and a colleague told me he was pretty sure it was a pycharm bug. He suggested that

url patterns question

2017-06-19 Thread jjanderson52000
I'm trying to write a simple Django app and I have encountered a few problems handling URL patterns. Any help will be appricated. Problem 1 My first problem is that I would like to parse a url that is known up until the last part of the URL. So for example, if I use the following

Re: saving data from both a model and a derived model

2017-05-26 Thread jjanderson52000
James, I just found what I was looking for. It looks like Model.validate_unique() is the test that I am looking for. Jim On Tuesday, May 23, 2017 at 6:44:01 PM UTC-4, jjander...@gmail.com wrote: > > I have a model class, 'A_base', and a 2nd model class, 'A_derived'. When I > save an object of

Re: saving data from both a model and a derived model

2017-05-26 Thread jjanderson52000
James, I'm thinking about my last question more. If each object of the given type must be unique, there must be a manager in Django which keeps track of uniqueness. I will start searching for how I check for unique objects, but if you have a quick response, that will help. Jim On Tuesday, Ma

Re: saving data from both a model and a derived model

2017-05-26 Thread jjanderson52000
James, As always, thank you for looking at this. Can you clarify for me? I though that setting UNIQUE meant that the database objects, i.e objects already in the database had to be unique. From your response, my understanding that uniqueness applies to any object of the model type in memory.

saving data from both a model and a derived model

2017-05-23 Thread jjanderson52000
I have a model class, 'A_base', and a 2nd model class, 'A_derived'. When I save an object of A_derived, I want the data from both my base and derived class to be saved. Example code looks like this: class A_base(models.model): name = models.CharField(max_length=50) class A_deri

tutorial on using dbshell?

2017-05-22 Thread jjanderson52000
I'm working with Django 1.10.3 and I'm trying to look at the database tables generated by Django using makemigrations and migrate. I was looking to use 'python manage.py sql', but it looks like that is no longer available. In a recent question to Django users, I was advised to use dbshell whic

Re: sqlite3 table not found

2017-05-22 Thread jjanderson52000
James, I will read up on dbshell and give it a try. Thanks for the pointer. Yes, I ran both 'makemigrations' and 'migrate' prior to posting. If I can figure out how to close out the thread, I will. Jim A. On Sunday, May 21, 2017 at 12:03:42 PM UTC-4, James Schneider wrote: > > > > On May 21,

sqlite3 table not found

2017-05-21 Thread jjanderson52000
Hi, I'm fairly new to Django and I'm very much still in the learning process. I'm using Django 1.10.3 on a project and have just added some new models. When I run the server and enter a URL to visit one of my views, I get an error, an excerpt of which is shown below: File "/home/jja/testen

Setting up an App and getting an import error

2017-04-05 Thread jjanderson52000
Hi, I'm setting up a Django app using Django 1.10.3 and python 3.5.2. When I run the following command in my 3.5.2 virtual environment: *python manage.py runserver*prior to entering the app in INSTALLED_APPS in settings.py, my webpage comes up fine. When I add the following line to INST

class tags 'block' now working

2017-03-23 Thread jjanderson52000
Hi, The plans are to use classytags on the website at work and I'm going through the documentation and running some experimental code as I go. This is being run on with classtags 0.8.0, python 3.5.2, and django 1.10.3. I've written some templates and using classy tags, written an inclusion tag