Re: Django can't find database

2016-10-22 Thread Jamie Lawrence
> On Oct 22, 2016, at 11:35 AM, Gary Roach wrote: > When I try to migrate, I get the following error: > >> psycopg2.OperationalError: FATAL: database "archivedb" does not exist > What's happening here? Are you certain the ‘archivedb’ database actually exists?

Re: Turn off migrations completely in Django 1.7

2015-04-27 Thread Jamie Lawrence
On Apr 27, 2015, at 7:01 PM, Mike Dewhirst wrote: > >> On 27/04/2015 9:54 AM, marcin.j.no...@gmail.com wrote: >> So what about that? I'm also interested in disabling migrations. > > Would it suffice to have all your models specify "managed = False" in the > Meta class? >

Re: Thinking about EAV database model for flexibility. How (in)compatible is it with the django model?

2014-12-22 Thread Jamie Lawrence
> >> On Tuesday, December 16, 2014 11:24:12 AM UTC+1, Felipe Faraggi wrote: >> Thanks for your responses Jamie and Erik, >> >> We've since reconsidered and will in fact, be creating a standard relational >> structure. >> >> Again, thanks for your

Re: Thinking about EAV database model for flexibility. How (in)compatible is it with the django model?

2014-12-15 Thread Jamie Lawrence
Just to add to Erik's very good advice on (not) using EAV, another thing to keep in mind is that the downsides of EAV tend to manifest after your app is hosting a substantial amount of data, at which point the exercise of sanitizing it in order to port it to a saner model can be *excruciating*.

Re: linux or windows

2013-05-31 Thread Jamie Lawrence
I don't count this as 'voluntary', except in the sense that I wasn't forced at the point of a gun, but I can say that it is possible to back a Django site with SQL Server. I do not recommend it, and the details vary based on which particular stack you are running. My recommendations are:

Re: How can I find and clean an user's session from an user's id?

2013-01-21 Thread Jamie Lawrence
It is ok. Really. In llvikgiimn. In. Go g -j I hurry. -- Sent from a phone, please excuse typos and terseness. On Jan 21, 2013, at 4:10 PM, Nikolas Stevenson-Molnar wrote: > I took a quick peek at the sessions implementation and it doesn't look > like this is

Re: index_together...shouldn't indexes be created AFTER populating the table?

2012-11-14 Thread Jamie Lawrence
Keep in mind that whatever RDBMS you are using is completely separate from your application. You can alter it out from under the app in any way you see fit. The code offers some convenience methods for generating things, but that doesn't tie the two together more than an expectation on the

Re: Setting an unusable password on an existing user

2012-09-22 Thread Jamie Lawrence
This isn't that rare - it is a common UX requirement. Set the value to something that cannot hash to any input. Depending on your setup, '0' could work, or any other nonsense value. If you have a strict DB schema, IIRC, there are some magic values that SHA will never generate, but I'd have to

Re: Problems with {% url %} in templates

2012-03-29 Thread Jamie Lawrence
On Mar 29, 2012, at 12:59 PM, Alasdair Nicol wrote: > Hi Jamie, > Don't include the (.*)$ in the regex for the include. The documented pattern > [1] for the include is > >(r'^d/events/', include('myproject.events.urls')), Ah, thank you, that was it. (I do need sleep - don't know how long

Problems with {% url %} in templates

2012-03-29 Thread Jamie Lawrence
I'm very confused… this has worked fine in the past. Django 1.3.1 In myproject/urls.py: urlpatterns = patterns('', (r'^d/events/(.*)$', include('myproject.events.urls')), […] in myproject/events/urls.py : urlpatterns = patterns('myproject.events.views', url(r'^add/$', 'add_view',

Re: Automated Processes

2012-03-02 Thread Jamie Lawrence
On Mar 2, 2012, at 12:10 PM, Scott Macri wrote: > I'm trying to figure out the best way to create an automated in a > python/django web application. My intention is to send an email > message in the future based on the given future date/time. What is > the best approach to do this? > > I was