Code

Opened 6 years ago

Closed 6 years ago

#5822 closed (invalid)

Integration of Django and Ajax

Reported by: kalnasha@… Owned by: nobody
Component: Uncategorized Version: 0.96
Severity: Keywords:
Cc: kalnasha@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

This is Anusha. I am a beginner in using Django. My project's goal is to display dynamic webpages i.e, update the page contents periodically using AJAX technology. I am getting several doubts in the process.I created an application in which I am able to query a database and display the results (http://localhost/cricketInfo/Sachin would display all Sachins profile). But I dont understand how to dynamically update these contents. Assuming that the data modifications occur frequently, so providing dynamic views is of higher priority.

My first doubt is that, I didn't understand the underlying client-server architecture i.e, what modules are comprised by the server and client respectively.

Secondly,I am using LAMP virtual machine to run my application. Once I start the server(python manage.py runserver 8000), the requests are being accepted only on local machine i.e, I am able to view output only on local machine (http://localhost:8000/cricketInfo/Sachin). I am not able to view the results from any other machine browsers(http://IP:port/cricketInfo/Sachin). Is this because, I am using a virtual machine or should I make any modifications to settings.py or so?? What should I do to make the application accessible from anywhere as www.anu.com/cricketInfo/Sachin like a website.

Thirdly, I want to make automatic updates to the page contents periodically using AJAX. For this, should we integrate our AJAX code in templates i.e, html files i.e, html files act as clientside script? Does views.py act as serverside script? If it is so, in case of dynamic updates when we make a xmlHttpRequest how does the server make out which function should be executed in the views.py? [ As the AJAX request : xmlHttp.open("GET","server-side script -- views.py",true) ]

I donno if they are very silly doubts, but I am not able to proceed further. I would be very glad if you can clarify them for me.

Regards,
Anusha

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by ramiro

  • Resolution set to invalid
  • Status changed from new to closed

Please don't ask this kind of end user support questions to the Django ticket system, it's used to track bugs to the source code of django itself. Post them to the django-users mailing list instead.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.