You are not logged in.

Change Language:

Profile for ravi_krishna

Name ravi_krishna
Email Address n/a
Posts9
  • Re: Modifying Field After Sync DB
    Board » Django » Models
    did that solved your problem ?
  • Re: Modifying Field After Sync DB
    Board » Django » Models
    u can insert a new field by sql console.
    Commands to do so : Type these in terminal

    mysql -u root -p

    use your_databasename;

    //if your adding an email field
    ALTER TABLE your_databasename ADD email VARCHAR(30);

    --- Last Edited by ravi_krishna at 2011-04-10 22:41:55 ---
  • Re: Getting error while connecting with postgresql
    Board » General Category » General Discussion
    There seems to be a problem with your psycopg2 installation – Python does not find it.

    You can try to load it manually using the Python interpreter and see if it works:
    $python
    importpsycopg2

    If you get an ImportError exception, your installation is erroneous.To get a list of all directories Python looks for modules, use sys.path:
    $ python
    >>> import sys
    >>> print sys.path
  • How to add data from a scv file to a sqlite browser.
    Board » Django » Views
    Hi,
    I have a csv file having data in three columns. i want to add those data to the sqlite database as three seperate tables.
    the code i wrote for adding the first table is given below, which is working fine.

    def category(request):
    reader = csv.reader(open("/home/user/Desktop/ACOUSTIC_APP_CONTENT.csv", "rb"))
    for row in reader:
    if (len(str(row0))>0):
    print row0 instruments_category=Zomdbinstrumentcategory(z_ent=1,z_opt=1,zenabled=1,zidnumber=1,zname=str(row0))
    instruments_category.save()
    #print instruments_category
    return HttpResponse("True")
    ------------------------------------

    there are 3 columns like
    WINDOW1 WINDOW 2 WINDOW3
    Table 1-name1 xx dfsfs
    tt sdfsdf
    uu sfsfsd
    hh
    name 2 ff sdfs
    dd sdfds
    ss fdgfdgf
    name 3 yy
    gh


    The csv fil is of this order...the window 2 elements shud come under the corresponding data in window 1; and window 3 elements should come under the corresponding window 2 elements.. Please help me in writing the code for this application.
  • How to pass the data submitted in 1 page to next page?
    Board » Django » Views
    Hi,
    I have 2 pages. My first page has a form( simple html form) with 3 fields.I want to display the data entered in first page ,to second page. I am a beginner with Django framework. Somebody please help me. I will post my 'VIEW' n 'html file for the first page ' here.

    VIEW:
    def index(request):
    return render_to_response("page1.html")
    def result(request):
    return render_to_response("page2.html")

    HTML code for form:
    <form action="/result" method="GET">
    Petrol Bunk:<input type="text" name="petrol"><br><br>
    Lattitude : <input type="text" name="latitude"><br><br>
    Longitude: <input type="text" name="longitude"><br><br>
    <input type="submit"name="st" />
    </form>

    Somebody please give me a reply.
  • How to insert a search form inside Django?
    Board » Django » Views
    Hi,
    I want to include a search button inside my Django, which retrieves data from some google API or Wikimapia API, But i am stuck with adding a search option inside Django. i am a beginner with Django and Python programming. Can somebody please help me with this.
    Ravi
  • Indentation Error
    Board » Django » Models
    Hi,,This is my url.py file, when i run this it shows indendation error at line 25. But i dont see an indendation error. Can somebody help me.


    from django.conf.urls.defaults import *
    from django.conf import settings

    # Uncomment the next two lines to enable the admin:
    from django.contrib import admin
    admin.autodiscover()

    urlpatterns = patterns('',
    #if settings.DEBUG:
    # urlpatterns += patterns('django.views.static',
    # (r'^static_media/(?P<path>.*)$',
    # 'serve', {
    # 'document_root': '/path/to/static_media',
    # 'show_indexes': True }),)

    )
    # Example:
    # (r'^mysite/', include('mysite.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/',include('admin.site.urls')),
    (r'^$','mysite.polls.views.index'),
    (r'^index','mysite.polls.views.index'),
    (r'^detail/(?P<poll_id>\d+)','mysite.polls.views.detail'),
    (r'^results/(?P<poll_id>\d+)','mysite.polls.views.results'),
    (r'^vote/(?P<poll_id>\d+)','mysite.polls.views.vote'),
    (r'^latest','mysite.polls.views.latest'),
    (r'^page1', 'polls.views.page1'),
    (r'^page2','polls.views.page2'),
    (r'^page3','polls.views.page3'),
    #(r'^site_media/(?P<path>.*)$')
    #django.views.static.serve', {'document_root': '/path/to/media'})
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
    {'document_root': '/root/Desktop/mysite/temp1/images'})
    )

  • how to use django.static.views
    Board » Django » Models
    How can we display image using the django.static.views ? Where all should be edited for it like views,models,settings.py,urls.py,.... Can somebody please give me a solution. I am a beginner with django.
    RaviKrishna
  • How to use ImageField in Django?
    Board » Django » Models
    Hi,
    I am a beginner with Python n Django. Can somebody help me how to use an ImageField in Django..tried out the tutorial but not working out..Where all(views,models,urls.py,settings.py,...) should we make editings inorder to work. Please help me
    Ravi Krishna

    --- Last Edited by ravi_krishna at 2010-05-12 01:42:25 ---


Powered by Sphene Community Tools