Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

I'm a django noob so I need the next step #2

Open
conradstorz opened this issue Jun 24, 2015 · 12 comments
Open

I'm a django noob so I need the next step #2

conradstorz opened this issue Jun 24, 2015 · 12 comments

Comments

@conradstorz
Copy link
Contributor

I got the manage.py to run. This was the result:

02:25 ~/rideontime/project (develop)$ ./manage.py check
System check identified no issues (0 silenced).
02:25 ~/rideontime/project (develop)$ ./manage.py test                                                                                              
Creating test database for alias 'default'...
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Destroying test database for alias 'default'...
02:26 ~/rideontime/project (develop)$ 

I don't know if that is correct. I don't know how to run the rideontime code.

@powersurge360
Copy link
Owner

The project is still in it's infancy at the moment, so I'm afraid there's not much to see right now. All that's been done to this point is gluing together libraries.

To create the database, run project/manage.py syncdb. Note that you may need to install some geo utilities prior to this working, documentation is available here.

Once the database is created, you can import the gtfs feed with project/manage.py importgtfs project/fixtures/feeds/louisville_feed.zip.

Finally, start the server with project/manage.py runserver. The server will be running at http://locahost:8000. Currently, only the admin interface is available, you should be able to login using http://localhost:8000/admin using the account you created during the syncdb step. If everything was done correctly to this point you should now be able to browse the louisville gtfs feed in the database.

Once I get my head around GTFS feeds, I will begin working to provide a RESTful API to build a client against.

I'll get a better README fleshed out this evening in the meantime and will close this issue then unless you have any further trouble.

Thanks for checking it out!

@conradstorz
Copy link
Contributor Author

Does this error mean anything to you Kevin? I get it when trying to run pip
install -r requirements.txt

Double requirement given: python-dotenv==0.1.2 (from -r
./requirements/base.txt (line 8)) (already in python-dotenv==0.1.2 (from -r
./requirements/base.txt (line 6)), name='python-dotenv')

I merged your changes into my fork of the project. I'm also trying to run
it inside of a venv

Also,
I get this

ImportError: No module named dotenv

When I try to run project/manage.py check

On Wed, Jun 24, 2015 at 12:20 PM, Kevin Diale [email protected]
wrote:

The project is still in it's infancy at the moment, so I'm afraid there's
not much to see right now. All that's been done to this point is gluing
together libraries.

To create the database, run project/manage.py syncdb. Note that you may
need to install some geo utilities prior to this working, documentation is
available here
https://docs.djangoproject.com/en/1.8/ref/contrib/gis/install/geolibs/.

Once the database is created, you can import the gtfs feed with project/manage.py
importgtfs project/fixtures/feeds/louisville_feed.zip.

Finally, start the server with project/manage.py runserver. The server
will be running at http://locahost:8000. Currently, only the admin
interface is available, you should be able to login using
http://localhost:8000/admin using the account you created during the
syncdb step. If everything was done correctly to this point you should now
be able to browse the louisville gtfs feed in the database.

Once I get my head around GTFS feeds, I will begin working to provide a
RESTful API to build a client against.

I'll get a better README fleshed out this evening in the meantime and will
close this issue then unless you have any further trouble.

Thanks for checking it out!


Reply to this email directly or view it on GitHub
#2 (comment)
.

[email protected]
text or voice 502-509-7257

@powersurge360
Copy link
Owner

Sorry about that, I had a duplicate entry in requirements/base.txt. It's removed now.

@conradstorz
Copy link
Contributor Author

I just got another chance to try your code Kevin. I have only been able to
report problems so far and I hate to bother you but I am still not able to
get past the requirements.txt file.

Screencap follows:

(ride)09:11 ~/Programming_Code/Python/rideontime
(develop)$ pip install -r requirements.txt
Collecting git+
https://github.com/powersurge360/django-multi-gtfs@feature/django-1.7-upgrade
(from -r ./requirements/base.txt (line 4))
Cloning https://github.com/powersurge360/django-multi-gtfs (to
feature/django-1.7-upgrade) to /tmp/pip-ei8_hL-build
Requirement already satisfied (use --upgrade to upgrade):
multigtfs==0.4.3 from git+
https://github.com/powersurge360/django-multi-gtfs@feature/django-1.7-upgrade
in /home/conrad/lib/python2.7/site-packages (from -r
./requirements/base.txt (line 4))
Collecting click==4.0 (from -r ./requirements/base.txt (line 1))
Using cached click-4.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): Django==1.8.2 in
/home/conrad/lib/python2.7/site-packages (from -r ./requirements/base.txt
(line 2))
Requirement already satisfied (use --upgrade to upgrade): jsonfield==1.0.3
in /home/conrad/lib/python2.7/site-packages (from -r
./requirements/base.txt (line 3))
Collecting psycopg2==2.6.1 (from -r ./requirements/base.txt (line 5))
Using cached psycopg2-2.6.1.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to
pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found

Error: pg_config executable not found.

Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-4xK3aQ/psycopg2

On Wed, Jun 24, 2015 at 12:20 PM, Kevin Diale [email protected]
wrote:

The project is still in it's infancy at the moment, so I'm afraid there's
not much to see right now. All that's been done to this point is gluing
together libraries.

To create the database, run project/manage.py syncdb. Note that you may
need to install some geo utilities prior to this working, documentation is
available here
https://docs.djangoproject.com/en/1.8/ref/contrib/gis/install/geolibs/.

Once the database is created, you can import the gtfs feed with project/manage.py
importgtfs project/fixtures/feeds/louisville_feed.zip.

Finally, start the server with project/manage.py runserver. The server
will be running at http://locahost:8000. Currently, only the admin
interface is available, you should be able to login using
http://localhost:8000/admin using the account you created during the
syncdb step. If everything was done correctly to this point you should now
be able to browse the louisville gtfs feed in the database.

Once I get my head around GTFS feeds, I will begin working to provide a
RESTful API to build a client against.

I'll get a better README fleshed out this evening in the meantime and will
close this issue then unless you have any further trouble.

Thanks for checking it out!


Reply to this email directly or view it on GitHub
#2 (comment)
.

[email protected]
text or voice 502-509-7257

@powersurge360
Copy link
Owner

Since you initially installed the app, I've moved over to using postgis.

I believe this is the easiest way to get it on windows (although I am not sure, please do due diligence).

You will also need python dev headers and postgresql dev headers to compile the postgres driver.

@conradstorz
Copy link
Contributor Author

I will be glad to keep following your development of this project. If I
annoy you please tell me. I don't have much spare time right now but I will
try to install it with dependencies soon. BTW you mentioned windows but I
am running Linux Mint FYI.
On Jul 1, 2015 10:58 AM, "Kevin Diale" [email protected] wrote:

Since you initially installed the app, I've moved over to using postgis.

I believe this https://chocolatey.org/packages/postgis-9.3 is the
easiest way to get it on windows (although I am not sure, please do due
diligence).

You will also need python dev headers and postgresql dev headers to
compile the postgres driver.


Reply to this email directly or view it on GitHub
#2 (comment)
.

@powersurge360
Copy link
Owner

Gotcha.

So linux mint ought to be even easier, sudo apt-get install python3-dev postgresql postgis libpq-dev should get you all of the system dependencies for postgres.

You'll also need some additional dependencies for running GeoDjango, those are detailed here.

Ride on Time is being developed against python 3 atm, but I'm not aware of anything preventing it from running on python 2 from the same codebase at this point.

@conradstorz
Copy link
Contributor Author

Okay. Would you like me to test against Python 2? I can run Python 3 or 2
if that helps.
On Jul 1, 2015 11:33 AM, "Kevin Diale" [email protected] wrote:

Gotcha.

So linux mint ought to be even easier, sudo apt-get install python3-dev
postgresql postgis libpq-dev should get you all of the system
dependencies for postgres.

You'll also need some additional dependencies for running GeoDjango, those
are detailed here
https://docs.djangoproject.com/en/1.8/ref/contrib/gis/install/#installation
.

Ride on Time is being developed against python 3 atm, but I'm not aware of
anything preventing it from running on python 2 from the same codebase at
this point.


Reply to this email directly or view it on GitHub
#2 (comment)
.

@powersurge360
Copy link
Owner

I'm not officially supporting python 2 atm, but feel free to try it out if you'd like.

Maybe once I get the thing built I'll work on adding python 2 support but I didn't want anything to get in my way of getting it done this early in the game since it's just a hobby project so far.

@conradstorz
Copy link
Contributor Author

It seems that you are smart to develop in python 3 as long as your
dependencies are available for python 3.

As a newcommer to python (less than 4 years and no production code
experience) I watch the debate over 3. Besides the whole unicode string
issue, there are subtle scope(namespace ?) differences. I was just reading
about one of those surrounding try/except code. Seems that python 2 has a
wide scope for variables inside of try/except but python 3 limits the same
variable declaration as local inside the trap.

Anyway, I look forward to getting your code running under python 3 :-)
On Jul 1, 2015 11:55 AM, "Kevin Diale" [email protected] wrote:

I'm not officially supporting python 2 atm, but feel free to try it out if
you'd like.

Maybe once I get the thing built I'll work on adding python 2 support but
I didn't want anything to get in my way of getting it done this early in
the game since it's just a hobby project so far.


Reply to this email directly or view it on GitHub
#2 (comment)
.

@powersurge360
Copy link
Owner

Have you had any trouble going forward? Is this clear to close?

@conradstorz
Copy link
Contributor Author

I haven't been able to do any testing this week. I'll update you as soon as
I do.

On Wed, Jul 8, 2015, 11:54 PM Kevin Diale [email protected] wrote:

Have you had any trouble going forward? Is this clear to close?


Reply to this email directly or view it on GitHub
#2 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants