Sunday, February 28, 2016

Re: Integrate appliction into Django

I haven't had a look at the github link, but if all you want to do is to display plots (I'm assuming these are images) and text files, then all you need to do is to serve these files from the views to the templates. 

You can store these plots/text files in a directory which is accessible to your views. A good place for this would be the static files. This way the users can download them to. 
Assuming that the plots and the text files are different for different users, you need to pass user specific parameters to your view, which in turn would use GNSSTracking and save the plots/text files in the static folder with some unique name. You can then pass these unique names to your template and then display them. If there is any user specific data you need to store, then you define models based on whatever data you need to save.

If none of this makes any sense, then I suggest you first understand the basics of Django.


On Sunday, February 28, 2016 at 6:20:30 PM UTC+5:30, Alain Muls wrote:
Hi All,

I made a program that creates 4 plots and text files about the location of GNSS (Global Navigation Satellite Systems) based on TLEs downloaded from NORAD.

I would like  to use this program in django (I started with edge-django as my template). But I don't know how to start with it. How would I define a model/view for displaying the plots and text files and how can I allow users to download these results?

Thanks for your help
Alain

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce6a4ada-5a0a-4ce6-a5a0-851786ab81ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment