Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id BB12A1B5234A for ; Wed, 23 May 2012 10:27:13 -0300 (ADT) Received: from mail-lb0-f174.google.com ([209.85.217.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SXBaq-0003SK-El for pgsql-www@postgresql.org; Wed, 23 May 2012 13:27:13 +0000 Received: by lbbgm6 with SMTP id gm6so5059388lbb.19 for ; Wed, 23 May 2012 06:26:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=LW9xWGDf6AvnWAtToYD5IbYpT1zal1A6etn7jMebJkI=; b=fIiyYr4m4fm0507rqy8ENMBk/DsQs6kBSXYdBcJ6dt8kghkr23RaniMGg2ulapc0DP VtSq99q0StXXwy//DqqJZ2r0hUzCTHQQLXFOfMEeze7CO2XnkuSuW4dQMJCm+PWSScJ7 XpTrCTST9ZKQR6loqzV4pugKm3kutYONJg7wL/HpuuiHpU4Tpnzt2GZ4Yw3nbH9naZkE wkodiHGwsBrtzmrXeEZhsVEhg0atptpR7kZaqG64WWU6YFXP11F3oCZps1bgCRguKlFp mZV/XRKhS9AORsBA1haTIu4eE7cY6smN75ZNxDr3Us063bmX2jcWTtwa7/joRuaFSY4s THNA== MIME-Version: 1.0 Received: by 10.112.98.225 with SMTP id el1mr8439391lbb.30.1337779619270; Wed, 23 May 2012 06:26:59 -0700 (PDT) Received: by 10.152.21.234 with HTTP; Wed, 23 May 2012 06:26:59 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 May 2012 15:26:59 +0200 Message-ID: Subject: Re: pgweb dev install hurdles From: Magnus Hagander To: Josh Kupershmidt Cc: "w^3" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkoOeICBpR7lEjQQFpeclfZM8iKJoPCM9XwCKCIpawmX6yHhYlwc3g8OxbApr/9Cdf4Ca7Q X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201205/52 X-Sequence-Number: 20676 On Sat, May 19, 2012 at 10:42 PM, Josh Kupershmidt wro= te: > Hi all, > > I finally got around to trying out pgweb locally, following the > instructions in dev_install.rst. The first hurdle I hit was due to Ah, great. Clearly these instructions haven't been updated along changes, and were in need of some fixing :-) > DATABASE_NAME not being set in settings_local.py, which results in the > manage.py exception: > "You need to specify NAME in your Django settings file." > > Since step 3 of dev_install.rst recommends creating the "pgweb" > database for this application, the suggested overrides for > settings_local.py in step 4 should include a DATABASE_NAME pointing > there. Yup, correct. > Next, while trying to load in community_login.sql per step 6 of the > dev_install instructions, I encountered this: > > josh@vboxdeb:~/src/pgweb/sql$ psql pgweb -f community_login.sql > BEGIN > CREATE FUNCTION > CREATE FUNCTION > psql:community_login.sql:87: ERROR: =A0relation "users_old" does not exis= t > LINE 4: ...lower(username)=3Dlower($1) UNION ALL SELECT 1 from users_old = ... > > I didn't see anywhere the "users_old" relation was defined, other than > a mention in ./tools/migrate/1_crunch_in_sql.sql. I was able to work > around this problem by making a dummy users_old table with the > appropriate columns, but perhaps this table should be included in the > schema? Hmm. That's really a part of the migration only and shouldn't be used on a new system. What would be better would be to redefine the community_login function not to use it I think. OTOH, in that case it doesn't really work exactly the same way. Hmm. Yeah, i guess creating a dummy table is what will be needed. It won't ever be re-run on the master after all... > Then, when I ran load_initial_data.sh, I ran into this: oh wow. Clearly nobody has run that for a while :-) > I hacked up ./pgweb/core/fixtures/data.yaml to include a > "firstreldate" (copied from "reldate", no idea if that was right) and > "eoldate" until load_initial_data.sh worked OK. > > Attached is a patch containing the few fixes/kludges I used to get > pgweb running locally. Thanks! Applied, including the changes for the SQL. --=20 =A0Magnus Hagander =A0Me: http://www.hagander.net/ =A0Work: http://www.redpill-linpro.com/