Re: Forms in Django

2016-03-20 Thread Fred Stluka
Stanislav, If you have any more questions, feel free to post them here. BTW, one thing I forgot to mention about the flexibility of the ORM is that you can have it access multiple databases from the same app, by setting DATABASE_ROUTERS to refer to a class that tells it things like which DB to

Re: Entering initial data into django database

2016-03-20 Thread Lawrence Muriuki
Ok..thanks..it worked...Created a script to create the fixture file and update it with every record...what a community this is! On Sunday, March 20, 2016 at 12:50:30 PM UTC-7, ludovic coues wrote: > > First, you should create a fixture file with some sample data. Two > entry, just like in the

Re: Entering initial data into django database

2016-03-20 Thread ludovic coues
First, you should create a fixture file with some sample data. Two entry, just like in the documentation is good. This way, you know you have a working fixture file. Then, you write a python function which take a list of bet and output a fixture file just like the exemple you have done. Finally,

Re: Entering initial data into django database

2016-03-20 Thread Lawrence Muriuki
Thanks ludovic, here is my code for the scraper.. from .models import Betting import re import requests import urllib from bs4 import BeautifulSoup urls= "https://sms.betyetu.co.ke/tomorrow.html; htmlfile = urllib.urlopen(urls) htmltext = htmlfile.read() soup = BeautifulSoup(htmltext,

Re: Entering initial data into django database

2016-03-20 Thread ludovic coues
There is a page in the documentation dealing with initial data [1]. The good news is that you don't have to write more code. You insert your data in a file and load it with the manage.py command. Out of the box, JSON, XML and SQL are supported. [1]

Entering initial data into django database

2016-03-20 Thread Lawrence Muriuki
Hi All, I have built a web scraper to scrape a website and get all match fixtures for a particular day. Wanted to know how to insert that initial data into django database and where that code should live..I have currently put the code in init.py but it looks and sounds wrong according to a

Error on using 'manage migrate'

2016-03-20 Thread Alexander Shmugliakov
Hello, I'm making my first steps with Django (and Python) development and I'm still struggling with the tutorial. The back end database I'm using is DB2 (installed on Windows Sever 2008), I am connecting to it from my Windows 7 Professional machine using IBM DB2 ODBC Driver. The database name

Forms in Django

2016-03-20 Thread Stanislav Vasko
Hello, as a noob in Django, i will ask noob question about Forms, because i cant find. I have working app, based on Bootstrap with theme and custom css. Rather than Django admin i want to create/edit data from my fields. I tried to use Django forms, but no luck. It looks... bad :) Its simple,

Re: Unable to parse connection string: "" when using django cache

2016-03-20 Thread Nandakumar Chandrasekhar
Thanks I had not caught that but I am not sure if that is the issue. On Thu, Mar 17, 2016 at 7:39 AM, wrote: > As an aside, it looks like you're including CommonMiddleware twice. > > -- > You received this message because you are subscribed to a topic in the > Google Groups

Deploy Django to Heroku - Push rejected

2016-03-20 Thread Bernardo Garcia
I am trying deploy my Django application to heroku and I get an error when I perform git push heroku master command Do you know the reason which I get this error? uleague) ➜ pickapp git:(master) ✗ git push heroku masterCounting objects: 195, done.Delta compression using up to 8

MySql Memory tables doubt...

2016-03-20 Thread Jose Galvan
Hi, I am developing a web site to make queries and create new entries in a old Mysql order entry system so I need to use the Raw SQL django functionality more than ORM. In the process I need to use a temporary mysql table ( like a memory table that is alive while the session is active), my