Re: Automatic reverse migrations

2017-04-14 Thread Andrew Godwin
Hi Paul, I have tried this in the past, but it's basically an unsolvable problem in the generic case. Databases do not take well to snapshotting or changing schema, and some operations are naturally irreversible. If you find a way that works well, I suggest you write it up so others can learn from

Automatic reverse migrations

2017-04-14 Thread paul
In a modern Continuous Delivery environment, it's expected that there is an automated process for deploying code, and therefore performing database migrations. This is all straightforward. I haven't been able to find any good solutions for automatic rollback though. The main problem that I see

Activating VirtualEnv on Windows

2017-04-14 Thread Lorenz Schümann
Hey, newbie here. I've followed the instructions on https://docs.djangoproject.com/en/1.11/intro/contributing/ regarding Virtualenv. And at the point where it says for Windows, to activate the Virtualenv, type $ source ~/virtualenvs/djangodev/Scripts/activate, I found out through StackExchange

Project layout

2017-04-14 Thread Rich Shepard
As a Django newcomer I'm still confused about project layout naming conventions. Following the author's layout in '2 Scoops' chapter 3 for a project I'm building for my own use to manage prospects and clients, I ran cookiecutter pointing to pydanny's cookiecutter-django. I have several subdirec

Re: Totally Lost on "python manage.py runserver"

2017-04-14 Thread ludovic coues
Have you tried "sudo apt-get install sqlite" ? The package might be called sqlite3 or sqlite-dev or something like that 2017-04-14 6:16 GMT+02:00 Michael Durkin : > I am at a loss. My Google-Fu seems to be sub-par as I cannot find an answer > to what I'm looking for. > > I am running Ubuntu, using

Re: model functions to interact with other models

2017-04-14 Thread Antonis Christofides
First, common practice is to name methods with lower case and underscores. Now, you probably don't need User.get_start(), because if "user" is a "User" you can usually type in something like "user.event_set.latest()". If the query is more complicated and you use it many times, I think it's OK to cr

Project layout

2017-04-14 Thread Rich Shepard
As a Django newcomer I'm still confused about project layout naming conventions. Following the author's layout in '2 Scoops' chapter 3 for a project I'm building for my own use to manage prospects and clients, I ran cookiecutter pointing to pydanny's cookiecutter-django. I have several subdirect

makemigrations keeps detecting changes to my Attachment model

2017-04-14 Thread comeon
Hello, I have made an Attachment model that saves files to my filesystem using a custom storage (that doesn't save if the file already exists and uses _that_ file instead, and ./manage.py makemigrations always gives the following: Migrations for 'backend': backend/migrations/0012_auto_20170414

Re: How To style a Django formset for fileField

2017-04-14 Thread m712 - Developer
My apologies. I have solved this problem myself. I separated my models to their own files because they got over 2K lines, and I named the file the attachment model lives in Attachment.py. Because the module-level function getUploadPath and Attachment's getUploadPath both have the same name, Django'

Totally Lost on "python manage.py runserver"

2017-04-14 Thread Michael Durkin
I am at a loss. My Google-Fu seems to be sub-par as I cannot find an answer to what I'm looking for. I am running Ubuntu, using Python 3.6.0 (pyenv handles different Python versions for me), have installed SQLite and Apache and ran "pip install django" to get Django on my machine. I have run

Re: How To style a Django formset for fileField

2017-04-14 Thread m712 - Developer
Ahaha, apologies again. I am very new to mailing lists and ended up replying to someone who didn't reply to me. Please remove my messages if possible. Sorry! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and sto

Re: How To style a Django formset for fileField

2017-04-14 Thread ludovic coues
What version of django are you using ? On 14 Apr 2017 1:53 am, "Rohit Chopra" wrote: > stackoverflow question > > > > > > down votefavorite >