Best way to learn Django considering Python versions and etc.

2013-12-10 Thread Bruce Whealton
Hello all, So, I started looking at recommended reading on Django and a couple books referred me to first go through "The Definitive Guide To Django." I have to admit some concern about reading a book on Django that is some 5 plus years old. I've come to think of this as the infor

Help with defining Models for ManyToMany and OneToMany relationships...

2016-04-23 Thread Bruce Whealton
Hello all, So, I setup django in a virtualenv on my Ubuntu environment. I was reading the docs and thought I had things right for creating the 3 models I wanted with this application. I am using Postgresql. I have the Postgresql driver for Python/Django installed in the virtualenv.

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-04-26 Thread Bruce Whealton
OK, for starters, I understand the need for Null=True and blank=True. So, jumping down...Not sure a better way to do this but I will leave my comments for reference including my models and then respond to the questions So sorry for my delay, I wasn't well this past weekend. >> >> My proble

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-04-26 Thread Bruce Whealton
Mike, So, I tried your idea for reorganizing the models, and just removed Organization and instead setup ContactOrOrganization as a class. It seemed to work ok, in terms of migrating fine. However, the database now lacks a ContactsOrOrganization table. Oops, my mistake, it does hav

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-04-26 Thread Bruce Whealton
Having followed all the suggestions, I am now stuck. I have simplified the database by removing one model. I get to the point of python manage.py makemigrations and it returns with what looks right. However, the migrate command just throws out a bunch of errors. For some reason, it is looki

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-05-02 Thread Bruce Whealton
erver or if one should just do that locally and then import it. Thanks for any advice, This should be part of a larger posting on workflows moving from development to production. Thanks, Bruce On Saturday, April 23, 2016 at 10:30:45 AM UTC-4, Bruce Whealton wrote: > > Hello all, >

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-05-02 Thread Bruce Whealton
there is data in the database, how will this be handled? I'll give it a try and see what happens. It is just the development machine that has the data. Thanks, Bruce On Monday, May 2, 2016 at 11:48:52 AM UTC-4, Michal Petrucha wrote: > > On Mon, May 02, 2016 at 08:37:43AM -0700, Bru

Help with moving a development project to production

2016-05-02 Thread Bruce Whealton
Hello all, I have been developing a django project and app on a Ubuntu system. My production system is Centos 6 based ( I think, not Centos 7). First off, what should I commit to the repo? I setup a virtualenv using virtualenvwrapper. This included a bin directory, include directory

Why don't I see my category ForeignKey field in related Model

2016-05-11 Thread Bruce Whealton
Hello all, I think that my problem here is Django specific and not necessarily a reflection on my understanding of relational databases (hopefully). I did post about this previously and thought I had figured out what to do. I have a Django app that stores information on Contacts.

Re: Why don't I see my category ForeignKey field in related Model

2016-05-13 Thread Bruce Whealton
You are absolutely right. So, I just need to figure out how to change things in the models.py. I'm not sure if django needs a third model or not. Thanks for helping where something should have been easier for me, Bruce -- You received this message because you are subscribed to the Google Group

How to implement a ManyToManyField with a View

2016-05-26 Thread Bruce Whealton
Hello all, I started a similar thread but couldn't find it. I was creating a Personal Information Management Project, with Project name mypim. My first app was a contacts app. This has two Class based Models in the models.py in the contacts directory. My first view works fine, where I disp

Questions about Deploying django for production using apache and mod_wsgi.

2016-05-26 Thread Bruce Whealton
Hello all, I have a few questions of which I am not finding answers. 1) If I export my development db (Postgresql) and then import it into production database, won't I be pulling in a very weak password that I used for development? I guess I can just change that. 2) Should I export all t

Re: How to implement a ManyToManyField with a View

2016-05-27 Thread Bruce Whealton
I have that in the contacts/views.py However, I don't know if it needs the context dictionary to have something which would connect a contact to many categories. Thanks, Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Django in Production and Virtualenv

2017-06-06 Thread Bruce Whealton
Hello all, There is a topic of confusion for me related to Apache and mod_wsgi. I have been using two cloud providers DigitalOcean and PythonAnywhere. The latter actually let me get a home page being served by apache and not the development server ( which actually isn't even an op

Isolated virtualenv and mod_wsgi - how do I do this on Apache

2018-06-28 Thread Bruce Whealton
Hello all, For a long time, this has perplexed me and I cannot find the answer. It is a crucial recommendation for deploying Django (or any Python app for that matter) into production. Here is the issue. I have two web hosting accounts, one is VPS with ssh root access. The other i