makler's Introduction
How to taste it what you need is: - python 2.5 or higher installed. NOTE: Django framework works with any Python version from 2.4 to 2.7 (due to backwards incompatibilities in Python 3.0, Django does not currently work with Python 3.0; - django framework installed (http://www.djangoproject.com/ take the latest one) - python-aspects-1.3 (http://www.cs.tut.fi/~ask/aspects/index.shtml) Before any further actions performed, remember to edit * settings.py file: - specify absolute path to db file -> DATABASE_NAME = 'D:\\currworkspace\\dj_test\\sqlite.db' - specify absolute path to templates directory -> TEMPLATE_DIRS = ( "D:/currworkspace/dj_test/src/templates", ) * urls.py file: - specify absolute path to media root folder -> (r'^makler/media(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'D:/currworkspace/dj_test/src/templates/makler/media'}), how to run web app: - cd dj_test/src/dj_test folder - run "python manage.py runserver" - take a look at localhost:8000/makler page from your browser how to run tests: - set your PYTHONPATH, for example "set PYTHONPATH=%PYTHONPATH%;D:\currworkspace\dj_test\src" - cd to tests\parser, for example: "cd D:\currworkspace\dj_test\src\tests\parser" - run "python bunch_test.py" internalization: * To use internalization in your py scripts: from django.utils.translation import ugettext as _ ... SPORTS_CHOICES = ( ('basketball', _('Basketball')), ('football', _('Football')), ('hockey', _('Hockey')), ) Now, your Basketball, Football and Hockey strings will be translated into current locale. * To use internalization in your html files(remember that the flow is different for javascript files): place {% load i18n %} some where in the begginning of html(or even template if any): {% load i18n %} ... {% trans "Room count:" %} * To generate messages file run(in project folder): - python manage.py makemessages -l ru # to generate messages for ru language - python manage.py compilemessages # to compile messages - restart server There is much more about internalization, see http://docs.djangoproject.com/en/dev/topics/i18n PLEASE CONFIGURE YOUR IDE TO USED WHITESPACES INSTEAD OF TABS
makler's People
makler's Issues
Create support for attaching images for the advertisement
Assignee Eugene K
Add details page for viewing details of an advertisement
Currently we have no details page
You need to
- update method handler at views.py
- create html page at templates folder
- page should output images also. Currently we have no support to add images, so let the page to display some stub images (No fixed count for now, let it be from 3-6 images)
Create a form for the root page
- The form should contain all needed validation returning back and highliting errors if something wrong(You need to edit views.py and according templates for that)
- Let all that fields be in a form too:
Name:
Sports:
Room count:
Phone numbers:
Cost.value: undefined
Cost.currency: undefined
Cost.period: undefined
Address.street1: undefined
Address.street2: undefined
(Don't pay attentionf for Name and Sports fields, they are added for developing autocomplition now)
take a look at that tutorial page:
http://docs.djangoproject.com/en/dev/topics/forms/?from=olddocs
Eugene M thats on you for now
Create some test layout for the main and details pages
Assignee Eugene K
Need a javascript component for multiple street selection
Add internalization support
See pybbs according issue
Assignee Eugene K
Create base search page for lease category
Lease search form
Search aspects:
- by ragion
- by room count
- by streets
- by coast
Ragion and streets fields are text area component with autocomplition feature.
Room count - text component with numbers allowed only
Coast field - need to investigate what component can be used, any help appriciated
Search page will be organized as a part of main page filtering output advertisement list online.
RnD task: replace aspect-python dependency with python decorators if possible
Create grabber aplication to grab adv from third sites
For now let it be some console python application
- It is on your decision what params app should take. As I remember we were talking about url, and pattern, correct me please if i've ommiteed something
- Application should store result on the file system for now, create according variable for that in settings.py to configurate the path
- lets keep results in such a format: root folder
"grabber" - give it more reasonable name please
----> "targetsite1.com.ua"
---> "current time grabbing in milliseconds"
---> "adv.txt" or jther name you prefer, that is file containing adv text
---> "md5"
---> "targetsite2.com"
----> "time milliseconds"
.....
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.