Re: Live server tests from cron

2013-08-10 Thread Drew Ferguson
Hi I don't know anything about selenium. However, from what you are describing - trying to run an application from cron that requires an Xserver - is problematic i.e. there is generally no Xserver available that can be used so your "DISPLAY=:0.0" essentially has no effect. To get round this,

Re: django windows user

2013-08-10 Thread Aaron C. de Bruyn
Google is your friend. The first tutorial that came up when I searched for 'ssh for windows users' was this site: http://support.suso.com/supki/SSH_Tutorial_for_Windows Do you have an existing Linux server at your house or with a hosting provider? If managing a Linux server is too steep of a

Live server tests from cron

2013-08-10 Thread Larry Martell
I have some tests that use LiveServerTestCase and selenium. When I run them from the command line they work fine. But I want to run them from cron. I know I need to use pyvirtualdisplay, but I can't seem to get it to work. I have this in my test: from pyvirtualdisplay import Display

django windows user

2013-08-10 Thread Robin Lery
Hello, I am a windows user, and its great learning django and python as well. I am just curious that, when I happen to deploy my site for production, is it helpful to deploy in unix system. And if there is, please guide me to use ssh and other stuff that is required to deploy so. Any help will be

Re: Newbie: do I need to upload in order to access data?

2013-08-10 Thread Nigel Legg
The file is uploaded - ie it is copied onto the server drive. I don't think you can do stuff client side with Django - beyond my knowledge. Regards, Nigel Legg 07914 740972 http://www.trevanianlegg.co.uk http://twitter.com/nigellegg http://uk.linkedin.com/in/nigellegg On 10 August 2013 18:04,

Re: Django Calendar App Just Like Google Calendar

2013-08-10 Thread Tito Gonzales
I made a conector for DHTMLxScheduler for python/django with JS/Ajax. https://github.com/tgonzales/dhtmlx-scheduler-django Makes a clone and run with django 1.5, to customize visit http://dhtmlx.com/docs/products/dhtmlxScheduler/index.shtml Em sábado, 12 de janeiro de 2013 04h59min50s UTC-2,

Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
Sorted. I got owned by regex :-/ In urls.py, it should be: url(r'^watch/(?P[\w{}.-]{1,40})/$', 'find_music.views.watch', name='watch'), (see http://stackoverflow.com/questions/15951948/django-url-for-40-characters-alphanumeric ) Thanks. On Sat, Aug 10, 2013 at 10:36 PM, Sithembewena Lloyd

Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
P.S: The view looks like the following: def watch(request, video_id): return HttpResponse("This is the watch page for %s") % video_id On Sat, Aug 10, 2013 at 10:31 PM, Sithembewena Lloyd Dube wrote: > Hi, > > I am using the YouTube API to fetch video data and display it on

Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
P.S: The view looks like the following: def watch(request, video_id): return HttpResponse("This is the watch page for ...") % video_id On Sat, Aug 10, 2013 at 10:31 PM, Sithembewena Lloyd Dube wrote: > Hi, > > I am using the YouTube API to fetch video data and display it

Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
Hi, I am using the YouTube API to fetch video data and display it on a web page. As part of the html template I have an anchor tag with an href directing to my Django 1.5 app. as follows: The url definition in urls.py is as follows: url(r'^(?P\w+)$', 'find_music.views.watch', name='watch'),

Re: Django Calendar App Just Like Google Calendar

2013-08-10 Thread Margie Roswell
Does anyone have a module available that can do a calendar? The winter thread below involved a whole bunch of coding-from scratch. I'm not yet a super-coder... (I do have coding skillsets) and I'm just learning django, and python. I figure I'll learn django best if I have a real project; And the

Re: django ajax runtime error - URL doesn't end in slash

2013-08-10 Thread Robin Lery
Ok! Here it is: {% extends "base.html" %} {% block sidebar %} Articles Create Article Search {% csrf_token %} {% endblock %} {% block content %} Language is: {{language}} Session Language is: {{session_language}} {% if articles.count > 0 %}

Re: django ajax runtime error - URL doesn't end in slash

2013-08-10 Thread Jonathan D. Baker
Can you paste the markup for your search form? Sent from my iPhone On Aug 10, 2013, at 11:46 AM, Robin Lery wrote: > I am practicing from a tutorial where I have reached to create a search box > with jquery and ajax. Every thing is going good, except, when i press any key

django ajax runtime error - URL doesn't end in slash

2013-08-10 Thread Robin Lery
I am practicing from a tutorial where I have reached to create a search box with jquery and ajax. Every thing is going good, except, when i press any key in the search, I get an error, RuntimeError at /articles/search You called this URL via POST, but the URL doesn't end in a slash and you have

Re: Newbie: do I need to upload in order to access data?

2013-08-10 Thread Bob Aalsma
Thanks Nigel, this looks very promising ;) If I interpret your text correctly, this is based on the upload/save example I mentioned. I'm really interested in the meaning of parts your closing paragraph: - "This saves the file in 'media/documents/2013/08/10/datafile.csv'." - I think this

Re: Newbie: do I need to upload in order to access data?

2013-08-10 Thread Nigel Legg
I've based my process a minimal file upload - I think based on the answer to the link above. I use: models.py: class Document(models.Model): docfile = models.FileField(upload_to='documents/%Y/%m/%d') views.py: def list(request): # Handle file uploadf if request.method == 'POST':

Re: Iterating over fields in Formset

2013-08-10 Thread Sandeep kaur
On Sat, Aug 10, 2013 at 9:00 PM, Satinderpal Singh wrote: > > I think in the your views you are trying to save it under the formsets, try > to save the formsets under the form to save all the required rows. > What should be changed? This is my code : def

Re: Iterating over fields in Formset

2013-08-10 Thread Satinderpal Singh
On Aug 10, 2013 5:48 PM, "Sandeep kaur" wrote: > > On Fri, Aug 9, 2013 at 2:50 PM, Sandeep kaur wrote: > > I have my code for formset here : > > > > {% csrf_token %} > > > Your help would be really appreciated. > Waiting. > > -- > Sandeep Kaur >

Newbie: do I need to upload in order to access data?

2013-08-10 Thread Bob Aalsma
Hi, I'm trying to achieve the following: - user indicates a file on his/her machine - the program opens the file, reads the data and acts on that So far, I can find examples of indicating the file on the user's machine, but this is always combined with saving to database (which I don't

how to make distinct and order_by work together

2013-08-10 Thread doniyor
I am really stuck in this problem for a while. this is really challenging for me. .. tough one... i have two models. Location and Rate. each location has rates, possibly multiple rates.. let me give you my models: class Location(models.Model): name = models.TextField() adres =

Re: Iterating over fields in Formset

2013-08-10 Thread Sandeep kaur
On Fri, Aug 9, 2013 at 2:50 PM, Sandeep kaur wrote: > I have my code for formset here : > > {% csrf_token %} > Your help would be really appreciated. Waiting. -- Sandeep Kaur E-Mail: mkaurkha...@gmail.com Blog: sandymadaan.wordpress.com -- You received this message

Re: How can I order my list based on a field in a different table?

2013-08-10 Thread Eric Cheung
1) The model Word does not have the votes field, you cannot order the field it's not possessed. 2) You have to build a relation between the models first, check the relationships from Django Doc https://docs.djangoproject.com/en/dev/topics/db/models/#relationships On Friday, August 9, 2013

Re: How to store position of current/active navigation entry

2013-08-10 Thread DJ-Tom
I now came up with this solution: path = req.get_full_path() if path.startswith(entry['href']): entry['active'] = True thanks for helping :-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Problem with custom user model and built-in admin-forms...

2013-08-10 Thread DJ-Tom
Hi, I'm trying to get a custom user model to work with the built-in admin app, based on the sample code in the documentation https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#auth-custom-user Here is my code: https://gist.github.com/anonymous/91f2c30bdc48a4ca3248 I either get a

Re: problem with deploying django using mod wsgi

2013-08-10 Thread Kelvin Wong
Is your form (on page /mice/search_mice/) submitting to /mice/search or /search Check your form element in the html document. Is it pointing to the right URL? Maybe check your WSGIScriptAlias setting. Maybe verify your DocumentRoot setting. You might also want to check the request and