Giter Site home page Giter Site logo

cloudxtreme / lv-090_lamp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olegoleg/lv-090_lamp

0.0 1.0 0.0 1.64 MB

WebApp for storing and managing ip addresses, lists and ip sources

Shell 0.08% Python 38.80% HTML 14.75% CSS 16.36% JavaScript 30.00%

lv-090_lamp's Introduction

LV-090_LAMP

WebApp for storing and managing ip addresses, lists and ip sources.

To participate in development you'll need to make some configuration and install certain programs and libraries.

We will be using this stuff:

  • Django - You probably already know what it is.
  • MySQL-python - Nice MySQL database connector for Python
  • SQLAlchemy - Famous database toolkit for Python, we will use it's database pooling features
  • netaddr - A pure Python network address representation and manipulation library
  • django-debug-toolbar - Displaying various debug information about the current request/response)
  • pygeoip - Pure Python API for Maxmind's binary GeoIP databases.
  • django-recaptcha - Django reCAPTCHA form field/widget integration app.
  • python-daemon - Python library to implement a well-behaved Unix daemon process.
  • django-dajaxice - Easy to use AJAX library for django.
  • django-dajax - Easy to use library to create asynchronous presentation logic with django and dajaxice.

So lets begin!

First off you'll need to clone this repo:

SSH: git clone [email protected]:andriykohut/LV-090_LAMP.git

HTTPS: git clone https://github.com/andriykohut/LV-090_LAMP.git

We will install python libraries using pip - a nice tool for installing and managing python packages. We need to install some dependencies for building mysqldb too (since pip builds all libraries from sources), on Ubuntu that's easy:

sudo apt-get install libmysqld-dev python-dev python-pip

Now we're ready to setup our libraries, just cd to cloned repo directory and execute this command, it will install all necessary libs:

sudo pip install -r requirements.txt

To use our project easily we need to add src/python to PYTHONPATH environmental variable, cd to src/python execute pwd to see absolute path to project (should look like this /home/user/LV-090_LAMP/src/python), then execute following command:

export PYTHONPATH=$PYTHONPATH:/home/user/LV-090_LAMP/src/python

This is just an example, you should use your absolute path. However this settings won't last, to keep them permanent you'll need to add them to your .bashrc or .zshrc shell profile. These files can be found at your home directory. You can edit them like this:

cd ~/ && nano .bashrc

Append whole export PYTHONPATH command to the end of yout shell profile file. Now you shuold be able to use package imports from project without relative imports or other heresy.

Now, we'll need to create a database for our project, cd to project's bin directory and execute ./create_database.sh (in script replace root with your mysql admin user and make shure that database with name ip_addresses doesn't exist) This will create all tables for our database.

Then go to project's etc directory and make your config files from examples:

cp dbapi.cfg.example dbapi.cfg
cp logging.cfg.example logging.cfg

Open dbapi.cfg file and input yor user settings for mysql server (user and password should be enough).

The last but not least is django local_settings.py config. Example can be found in web/ipconflux/ipconflux directory. Modify it to your preferences and save as as local_settings.py:

cp web/ipconflux/ipconflux/local_settings.py.example web/ipconflux/ipconflux/local_settings.py

You'll need to set USER and PASSWORD in DATABASES dictationary. Thats your database admin. Then specify path for static files directory (where css, js, etc. is stored), it should be your project absulute path + web/ipconflux/static directory. Change templates directory in TEMPLATE_DIRS variable /home/user/ipconflux/web/ipconflux/templates. Then add SECRET_KEY - you should have it already. Also add your RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY there. To compile localization messages you'll need to run django-admin.py compilemessages in web/ipconflux directory. Set path to directory with dictionaries: in local_settings.py change variable LOCALE_PATHS. That's all, now you can run python manage.py syncdb and enjoy development...

lv-090_lamp's People

Contributors

aglov avatar amuzychka avatar andriykohut avatar olegoleg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.