Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
Issue resolved. The problem was a similar usage of a url template tag without a namespace. All I had to do was check the correct line number in the template. Thanks to all. Time for a walk outside. On Tue, Apr 9, 2013 at 5:36 PM, Sithembewena Lloyd Dube wrote: > New trace below: I am stum

Re: {% url %} template tag not resolving app url in template

2013-04-09 Thread Sithembewena Lloyd Dube
Issue resolved. The problem was a similar usage of a url template tag without a namespace - in the same template. All I had to do was check the correct line number in the template. Thanks to all. Time for a walk outside. On Tue, Apr 9, 2013 at 5:36 PM, Sithembewena Lloyd Dube wrote: >

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
Hi Phillipe, I think that it really depends on how modular you would like your Django project to be. Do you want the stats generation functionality to be separately pluggable from the pie-charting functionality? Is your gather_data app large enough (number of models) to warrant breaking it down? I

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
By the way, the book mentioned above - "Two Scoops of Django" - makes very good reading for Django in general. On Sat, May 11, 2013 at 2:28 AM, Sithembewena Lloyd Dube wrote: > Hi Phillipe, > > I think that it really depends on how modular you would like your Django > proj

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
thembewena Lloyd Dube wrote: > Hi Phillipe, > > I think that it really depends on how modular you would like your Django > project to be. Do you want the stats generation functionality to be > separately pluggable from the pie-charting functionality? Is your > gather_data app large

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
at, May 11, 2013 at 2:28 AM, Sithembewena Lloyd Dube wrote: > Hi Phillipe, > > I think that it really depends on how modular you would like your Django > project to be. Do you want the stats generation functionality to be > separately pluggable from the pie-charting functionality?

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
hey say (quote): "In essence, each app should be tightly focused on its task. If an app can’t be explained in a single sentence of moderate length, or you need to say ‘and’ more than once, it probably means the app is too big and should be broken up. On Sat, May 11, 2013 at 2:35 AM, Sithembewen

Re: Use different apps or not?

2013-05-13 Thread Sithembewena Lloyd Dube
You're welcome. Enjoy the book! On Sun, May 12, 2013 at 9:54 PM, Philippe Schraepen < schraepen.phili...@gmail.com> wrote: > Thanks for the clarification! > I'll definitely read the book! > > On Saturday, May 11, 2013 12:28:50 AM UTC, Lloyd Dube wrote: > >> Hi Phillipe, >> >> I think that it rea

Re: Can´t get Django Administration page to show

2013-06-05 Thread Sithembewena Lloyd Dube
Hi Oliver, please provide more information. Did you follow all steps, such as: add your app/s to INSTALLED_APPS in your settings file, run the manage.py syncdb command, create an admin.py file where you register your model/s, comment out the lines that activate your admin site in urls.py? On Wed

Re: Can´t get Django Administration page to show

2013-06-05 Thread Sithembewena Lloyd Dube
You're welcome, Oliver :-) Regards, Sithu On Wed, Jun 5, 2013 at 6:51 PM, Oliver Hilmarsson < oliver.hilmars...@gmail.com> wrote: > Thanks, Sithu, I didn´t uncomment the lines in urls.py. It´s working now > :o) > > Regards, > Óliver > > > On Wednesday, June 5, 2013 11:47:49 AM UTC, Oliver Hilm

Re: Please help me in Django

2013-06-10 Thread Sithembewena Lloyd Dube
Start with the Django installation guide and tutorial. They will show you everything you need to know to get started. https://docs.djangoproject.com/en/1.5/intro/install/ https://docs.djangoproject.com/en/1.5/intro/tutorial01/ On Mon, Jun 10, 2013 at 12:57 PM, Abhimanyu Choithramani < life.abhi.

Re: Django-Tastypie and MySQL

2013-06-14 Thread Sithembewena Lloyd Dube
Hi Hélio, I happen to be using Tastypie for the first time as well and so far, the documentation is comprehensive enough. You could start here: http://django-tastypie.readthedocs.org/en/latest/tutorial.html http://django-tastypie.readthedocs.org/en/latest/cookbook.html http://django-tastypie.read

Using Fabric to clear database records

2013-06-14 Thread Sithembewena Lloyd Dube
Greetings, I've got a Django 1.5.1. project where I have a Video model (basically saving video metadata). I would like to create a fabfile in my project folder so that when I run 'fab production refresh', the list of videos saved in the production environment (Amazon EC2) should be cleared out and

Re: Using Fabric to clear database records

2013-06-14 Thread Sithembewena Lloyd Dube
Thank you, Avraham. On Fri, Jun 14, 2013 at 2:26 PM, Avraham Serour wrote: > manage.py flush > > > On Fri, Jun 14, 2013 at 3:16 PM, Sithembewena Lloyd Dube < > zebr...@gmail.com> wrote: > >> Greetings, >> >> I've got a Django 1.5.1. project where

Re: Django-Tastypie and MySQL

2013-06-14 Thread Sithembewena Lloyd Dube
Hey, The player belongs to a club. So in the player model you should have player_club = models.ForeignKey(Club) then remove the foreign key in the Club model. Also, notice casing - your variable names should be lowercase and if it's more than one word, join it with underscores. It's Python conve

Re: Django-Tastypie and MySQL

2013-06-14 Thread Sithembewena Lloyd Dube
I meant, delete the PlayerClub linking table/ model. The foreignkey relationship takes care of that need. On Fri, Jun 14, 2013 at 4:41 PM, Sithembewena Lloyd Dube wrote: > Hey, > > The player belongs to a club. So in the player model you should have > > player_club = models.

Re: Newbie with Demo issues

2013-06-14 Thread Sithembewena Lloyd Dube
Hi Strat, Tom is right - the issue is the name of the view in your template. Reverse takes the name of your view and builds it's url. In this case, you are calling the view 'detail/' (with a trailing slash) instead of 'detail'. Cheers, Lloyd On Fri, Jun 14, 2013 at 3:42 PM, Tom Evans wrote: >

Re: Django-Tastypie and MySQL

2013-06-14 Thread Sithembewena Lloyd Dube
Much better. I don't think that you have to put quotes when you define player_club. Just go, player_club = models.ForeignKey(Club) - you want to pass the Club model, not a string. Regarding the question, if the player can only belong to one club, then a foreignkey relationship is correct because i

Re: How can I have two unicode methods?

2013-06-25 Thread Sithembewena Lloyd Dube
I have previously achieved this by using an if statement as follows: if : return else: return What is your specific requirement, i.e. why do you need to implement this? On Wed, Jun 26, 2013 at 3:47 AM, yeswanth nadella wrote: > In my models file, I have the following unicode method-

Static files not served

2013-06-27 Thread Sithembewena Lloyd Dube
Hi all, I have a local development project where I put all static media in a 'static' subdirectory of my app (/project/app/static/). I then created a 'static' directory in the root folder of my project (/project/static/) and specified that as my STATIC_ROOT in settings.py. When I run the './manag

Re: Static files not served

2013-06-27 Thread Sithembewena Lloyd Dube
an html mailing list, but has anybody else encountered this? Another thing i noticed is that all this is not a problem when i view the templates from outside a Django project - i.e. as a standalone html website. On Thu, Jun 27, 2013 at 10:08 PM, Sithembewena Lloyd Dube wrote: > Hi all, &g

Re: Static files not served

2013-06-27 Thread Sithembewena Lloyd Dube
> Another thing i noticed is that all this is not a problem when i view the > > templates from outside a Django project - i.e. as a standalone html > website. > > > > > > On Thu, Jun 27, 2013 at 10:08 PM, Sithembewena Lloyd Dube < > zebr...@gmail.com > > > w

Re: Getting URL root

2013-07-01 Thread Sithembewena Lloyd Dube
It sounds like you want to get the subdomain. Havew a look at the urlparse module and its usage. http://stackoverflow.com/questions/6925825/get-subdomain-from-url-using-python On Tue, Jul 2, 2013 at 2:09 AM, Larry Martell wrote: > I have an app I distribute to clients. > > When I run the app on

Re: London based Django Dev: UX/UI (£300 per day)

2013-07-02 Thread Sithembewena Lloyd Dube
I'd churn out code for that budget. In my neck of the woods, it's nothing to scoff at. However, I have not seen the code, so I cannot say whether or not the time-frame and remuneration tally. It is an easy mistake to accept a time-frame and a rate without seeing code, only to find that the code ba

Re: Returning data from view to ajax call

2013-07-02 Thread Sithembewena Lloyd Dube
What data format is your view returning? Django views return HTTP response objects (by default, at least) - although Python lists (and other Python collections?) should work when passed into a view in its context (I have found Django querysets to be an exception). AJAX is Asynchronous Javascript,

Re: Python Fabric manage.py problem

2013-07-03 Thread Sithembewena Lloyd Dube
I had a similar issue - running manage.py through Fabric simply didn't pan out - even after following the Fabric documentation. Also tried the --noinput switch with no luck? I do not have a ready answer right now, but I do intend to look into this. I am sure it has (and is being) done plenty times

Re: 'SimpleLazyObject'

2013-07-12 Thread Sithembewena Lloyd Dube
What does the trace information say in your browser (or shell)? The trace should be giving more information - such as, in which line number of which file is the error showing up?. On Fri, Jul 12, 2013 at 8:45 PM, Kakar Arunachal Service < kakararunachalserv...@gmail.com> wrote: > I've got a Type

Travelport API integration with Django

2013-07-17 Thread Sithembewena Lloyd Dube
Hi, I am working on a component of a Django web application (travel booking engine) which aims to integrate with the Travelport Universal API. It would be great to find out if anyone here has had to do something similar and, if applicable, to hear how they handled the integration. The API provide

Django installation on vanilla Mac OSX 10.8.2 mountain lion

2013-08-02 Thread Sithembewena Lloyd Dube
Hi everyone, I just began using a new Mac at work (running OSX 10.8.2 Mountain Lion) and it seems such a mission to install Django. Python 2.7.2. is already installed. Following the official Django installation instructions, I get no further than trying to get wget-> which I will ned to compile wi

Re: Django installation on vanilla Mac OSX 10.8.2 mountain lion

2013-08-03 Thread Sithembewena Lloyd Dube
c. It's possible you could get > gcc on it's own: > http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/ > ... not sure if it applies to 10.8. > > _Nik > > On 8/2/2013 7:50 AM, Larry Martell wrote: > > On Fri, Aug 2, 2013 at 8:41 AM, Sithembewena Lloyd D

Re: Django for corporate web site

2013-08-06 Thread Sithembewena Lloyd Dube
Hi Sean, You definitely can do that in Django. On Tue, Aug 6, 2013 at 6:18 AM, Mike Dewhirst wrote: > On 6/08/2013 2:07pm, sean chen wrote: > >> I need to build a site for a small law firm. I looked at the poweredby >> pages http://www.djangosites.org/, but I found it shows sites for >> differ

Re: problem writing a view that displays http request

2013-08-09 Thread Sithembewena Lloyd Dube
Try the following: # In your case, just add 'include' to your conf.urls imports from django.conf.urls import include Then use it in the url declaration (see the official Django tutorial). On Fri, Aug 9, 2013 at 12:04 PM, Dinesh Gudi wrote: > *urls.py* > from django.conf.urls import patterns,

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'), W

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

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

Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
t 10:36 PM, Sithembewena Lloyd Dube wrote: > 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 < > zebr...@g

Capturing a search query + params in Django 1.5

2013-08-17 Thread Sithembewena Lloyd Dube
Hi, I have a simple web application in which I have a search box. When a user enters a query in the box and hits "search", they get a list of results via a popular search API. My issue is that I am using django-endless-pagination to paginate (no kidding!) the API response - after some formatting,

Re: Capturing a search query + params in Django 1.5

2013-08-19 Thread Sithembewena Lloyd Dube
Thank you, Daniel. That works great. On Sat, Aug 17, 2013 at 9:58 PM, Daniel Roseman wrote: > On Saturday, 17 August 2013 20:04:22 UTC+1, Lloyd Dube wrote: >> >> Hi, >> >> I have a simple web application in which I have a search box. When a user >> enters a query in the box and hits "search", th

Paginating YouTube API results

2013-08-26 Thread Sithembewena Lloyd Dube
Hi everyone, I am using django-endless-pagination to paginate YouTube API results. I have a view called 'search' and a url pattern as follows: url(r'^search/$', 'find_music.views.search', name='search'), In the view, I check request.method and handle it as follows: - if POST, get search term and

Re: Script to move django 1.4.3 to 1.5.1

2013-08-27 Thread Sithembewena Lloyd Dube
Error analysis + reading documentation = solution. Well, most of the time anyway. For help with errors, please share the errors? On Tue, Aug 27, 2013 at 7:37 PM, Harjot Mann wrote: > > > On Thursday, June 20, 2013 8:55:07 AM UTC+5:30, Deepak Sharma wrote: >> >> Okay but my situation is bit diff

Re: django 2 tables one query?

2013-08-28 Thread Sithembewena Lloyd Dube
Yes it is. On Tue, Aug 27, 2013 at 11:16 PM, piasek piasek wrote: > Hi > > I was wondering is it possible to get information about two tables in one > query? > I have two models > Team (id, name, active, country) and Player (id, first_name, second_name, > active, team) > where Player.team = For

Re: django 2 tables one query?

2013-08-28 Thread Sithembewena Lloyd Dube
http://stackoverflow.com/questions/16597709/randomize-a-django-queryset-once-then-iterate-through-it On Tue, Aug 27, 2013 at 11:16 PM, piasek piasek wrote: > Hi > > I was wondering is it possible to get information about two tables in one > query? > I have two models > Team (id, name, active, c

Re: django refreshing problem

2013-08-30 Thread Sithembewena Lloyd Dube
Clear your browser cache and check your preferences. Then restart the browser. On Fri, Aug 30, 2013 at 8:28 AM, Harjot Mann wrote: > On Mon, Aug 26, 2013 at 2:36 PM, Harjot Mann > wrote: > > In django whenever I make some template I need to refresh it. I am not > > getting what is the problem,

Re: Django driving me nuts

2013-08-31 Thread Sithembewena Lloyd Dube
Please describe your problem a bit more and/ or show code samples? We can help out if we understand the issue. On Sat, Aug 31, 2013 at 2:50 PM, Gerd Koetje wrote: > Why is it so hard to get as a former php programmer. > > I'm trying to cut my form in difrant sections , what seemed to work when i

Re: How to redorder app

2013-09-06 Thread Sithembewena Lloyd Dube
If you are referring to reordering fields, yes it is possible. For details, see the official Django tutorial's section on setting up the admin site at https://docs.djangoproject.com/en/1.5/intro/tutorial02/ HTH. On Fri, Sep 6, 2013 at 10:16 AM, Ranjith Kumar wrote: > Hello, > I trying to reorde

Re: Any good books for learning django?

2013-09-18 Thread Sithembewena Lloyd Dube
I asked PyDanny and Audrey for a free copy and they graciously obliged. Very good book, too. On Wed, Sep 18, 2013 at 12:29 PM, Yinka wrote: > These were not written for beginners, but they certainly can be helpful to > the beginnner: > >1. *Pro Django** ** > > http://www.amazon.com/Pro-

Re: We are hiring!

2013-10-15 Thread Sithembewena Lloyd Dube
There's a typo in your company name on your website (in the copyright message at bottom left) :-) On Tue, Oct 15, 2013 at 8:11 AM, Team UK wrote: > Independent freelance Django developers. 2 years minimum experience > required in Django/python, CSS, HTML5, Bootstrap and JS backbone. > > Please

Re: We are hiring!

2013-10-15 Thread Sithembewena Lloyd Dube
Are you only hiring UK developers? On Tue, Oct 15, 2013 at 8:11 AM, Team UK wrote: > Independent freelance Django developers. 2 years minimum experience > required in Django/python, CSS, HTML5, Bootstrap and JS backbone. > > Please email your CV. > > -- > You received this message because you

Re: New to Django

2013-10-15 Thread Sithembewena Lloyd Dube
Hi, Do the tutorial on the official Django website - it will show you where else to look when you are done :) On Tue, Oct 15, 2013 at 7:55 AM, Mahantesh U wrote: > Hi All, > > I am new to Django framework. I worked on Flask framework using python. > Please share the sites to learn Django easi

Re: New to Django

2013-10-15 Thread Sithembewena Lloyd Dube
You're welcome, Mahantesh :) Did you find the tutorial I mentioned? On Tue, Oct 15, 2013 at 3:56 PM, Mahantesh U wrote: > Thanks a lot Lloyd Dube :) > > > On Tuesday, October 15, 2013 5:38:33 PM UTC+5:30, Lloyd Dube wrote: > >> Hi, >> >> Do the tutorial on the official Django website - it will

Re: New to Django

2013-10-16 Thread Sithembewena Lloyd Dube
Hey guys, For those asking how to setup databases with Django, all this is covered in the section on how to install Django on the main website. https://docs.djangoproject.com/en/1.5/intro/install/ and, more specifically, https://docs.djangoproject.com/en/1.5/topics/install/#database-installation

Re: [ANNOUNCE] Django 1.6 and Django 1.4.10 released

2013-11-07 Thread Sithembewena Lloyd Dube
Thank you to everyone who's making this framework better :) On Thu, Nov 7, 2013 at 1:30 PM, Mário Neto wrote: > Thanks for all! =) > > > 2013/11/6 wudiweb > >> Thanks for all contributors >> >> 在 2013年11月6日星期三UTC+8下午11时09分45秒,James Bennett写道: >> >>> Django 1.6 and Django 1.4.10 are out today;

OneToOne relationship - id displayed in admin instead of object name?

2011-04-15 Thread Sithembewena Lloyd Dube
;from myproject.myapp.models import BlogUser >>>blog_user = BlogUser.objects.get(pk=1) >>>blog_user.blogger Mike I get the blogger object's name However, in the admin section the blogger id is displayed. How can I display the unicode representation of the blogger object? Than

Can a OneToOne field be used to generate the value of a SlugField in the same model?

2011-04-15 Thread Sithembewena Lloyd Dube
If so, how can it be done? I would appreciate any advice. Thanks. Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from thi

Detecting form mode in admin (create, edit, delete)

2011-04-18 Thread Sithembewena Lloyd Dube
Hi all, I wish to find out how I can detect current form mode in admin.py. What I am trying to do is to stop users changing a dropdown's selection when in edit mode. Any ideas? Thanks. -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the G

Re: Detecting form mode in admin (create, edit, delete)

2011-04-18 Thread Sithembewena Lloyd Dube
@Mengu, yes, precisely :) On Mon, Apr 18, 2011 at 1:20 PM, Mengu wrote: > you mean like if a new object is being added or edited in the admin? > > On Apr 18, 1:58 pm, Sithembewena Lloyd Dube wrote: > > Hi all, > > > > I wish to find out how I can detect current fo

Re: Detecting form mode in admin (create, edit, delete)

2011-04-18 Thread Sithembewena Lloyd Dube
estmodel/add/- means i'm adding > > > > if (document.location.href.indexOf("/add/") != -1) { > > > > } > > > > On Apr 18, 2:50 pm, Sithembewena Lloyd Dube wrote: > > > > > > > > > > > > > > > > >

Format a python date

2011-05-09 Thread Sithembewena Lloyd Dube
Hi all, I am using a jquery datepicker control on a page of mine, and it formats the date different than the django admin datepicker. (MM-DD-YYY). If I have a date in that format, how can I format it to DD-MM-? I have tried using strftime with no success. -- Regards, Sithembewena Lloyd

Re: Format a python date

2011-05-09 Thread Sithembewena Lloyd Dube
ery.ui.datepicker-ru.min.js</a> > "> > > And if you want your datepicker be custom formatted, then you can configure > it separately. > > $('#id_date').datepicker({dateFormat: 'yy-mm-dd'}); > > > > > On Mon, May 9, 2011 at 10:54

Parsing an XML feed using ElementTree

2011-05-24 Thread Sithembewena Lloyd Dube
teger (to see that the document is traversed) I get the same result - the int remains at 0. >>> i = 0 >>> for node in xml_content.getiterator('contest'): ... i += 1 ... >>> i 0 What am I getting wrong? Any hints would be appreciated. -- Regards, Sithemb

Re: Parsing an XML feed using ElementTree

2011-05-25 Thread Sithembewena Lloyd Dube
s+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> > > > -- > Brian Bouterse > ITng Services > > -- > You received this message because you are subscribed to the Google

Re: Parsing an XML feed using ElementTree

2011-05-25 Thread Sithembewena Lloyd Dube
P.S: I was aware that I posted a non-django question: I just took the chance that someone here may have needed to do the same. Thanks! On Wed, May 25, 2011 at 2:35 PM, Sithembewena Lloyd Dube wrote: > Hi Everyone, > > Thanks for all your suggestions. I read up on gzip and urllib

Detecting camera type from image file

2010-12-22 Thread Sithembewena Lloyd Dube
Hi all, Is there a method to detect what camera took an image in Python/ Django? -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegrou

Re: Detecting camera type from image file

2010-12-22 Thread Sithembewena Lloyd Dube
Thanks Thomas, looks like this can handle what I have in mind. Much appreciated. On Wed, Dec 22, 2010 at 3:44 PM, Thomas Weholt wrote: > Look at pyexiv2 or PIL. > > On Wed, Dec 22, 2010 at 2:36 PM, Sithembewena Lloyd Dube > wrote: > > Hi all, > > > > Is there a met

Changing a constraint with live data

2011-01-04 Thread Sithembewena Lloyd Dube
constraint and add the new one. Is there a straightforward way to do this? -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To u

Re: Changing a constraint with live data

2011-01-05 Thread Sithembewena Lloyd Dube
p, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups

Re: Changing a constraint with live data

2011-01-07 Thread Sithembewena Lloyd Dube
Thanks Shawn. Great to note that someone has thought of this before. On Wed, Jan 5, 2011 at 5:24 PM, Shawn Milochik wrote: > > On Jan 5, 2011, at 4:44 AM, Sithembewena Lloyd Dube wrote: > > Thomas and Shawn, thanks for responding. > > South looks pretty useful - I hope that it

Accessing the corresponding object for a form instance

2011-01-07 Thread Sithembewena Lloyd Dube
:* form = PersonForm(request.POST) form.save()* # how to return person's id here?* Thanks. -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googleg

Re: Accessing the corresponding object for a form instance

2011-01-07 Thread Sithembewena Lloyd Dube
up, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Regards, Sithembewena Lloyd Dub

Django API efficient enough for filtering tens of millions of records?

2011-01-18 Thread Sithembewena Lloyd Dube
have solved the sort of problem I describe, in Django + MySQL. Thanks. -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscr

Re: Django API efficient enough for filtering tens of millions of records?

2011-02-15 Thread Sithembewena Lloyd Dube
doing it with the > orm. > > > NB! DSE is a proof-of-concept project more than anything else. It > needs a good re-write, extensive testing and docs, but it might be > helpful. > > Thomas > > > > > > On Wed, Jan 19, 2011 at 2:35 AM, Nick Arnett > wrote: &g

Saving multiple records from admin list page

2011-02-15 Thread Sithembewena Lloyd Dube
admin user is also able to select an action to apply to multiple records. How can I modify my admin.py so that the save() override specified above fires for all records? Thanks. -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "D

Re: Saving multiple records from admin list page

2011-02-15 Thread Sithembewena Lloyd Dube
ng_request_status_notification_email(obj) Thanks. On Tue, Feb 15, 2011 at 11:16 AM, Sithembewena Lloyd Dube wrote: > Hi all, > > In my admin.py, I overrode the save() function of a model as follows: > > from myproject.myapp.functions import > send_staking_request_status_notification

Re: Saving multiple records from admin list page

2011-02-15 Thread Sithembewena Lloyd Dube
Courtesy of Django docs, by the way: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/actions/ On Tue, Feb 15, 2011 at 11:47 AM, Sithembewena Lloyd Dube wrote: > Solution found: I simply added a function call to the mailing function in > each action definition in admin.py as f

Re: Django API efficient enough for filtering tens of millions of records?

2011-02-20 Thread Sithembewena Lloyd Dube
Thanks Thomas :) On Tue, Feb 15, 2011 at 11:16 AM, Thomas Weholt wrote: > FYI: release version 0.5.0 of DSE yesterday. Source is available at > https://bitbucket.org/weholt/dse and pypi. > > Regards, > Thomas Weholt > > On Tue, Feb 15, 2011 at 10:10 AM, Sithembewena Lloyd

Querysets: returning a single item with the greatest id.

2011-02-23 Thread Sithembewena Lloyd Dube
Hi everyone, How would one fetch a single item with the largest id (or most recent date of creation) via the database API? -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Querysets: returning a single item with the greatest id.

2011-02-23 Thread Sithembewena Lloyd Dube
ary 23, 2011 05:04:29 am Tom Evans wrote: > > > On Wed, Feb 23, 2011 at 12:57 PM, Sithembewena Lloyd Dube > > > > > > wrote: > > > > Hi everyone, > > > > > > > > How would one fetch a single item with the largest

.htaccess + Django issues

2011-03-02 Thread Sithembewena Lloyd Dube
d, but the last one is not. What could I be getting wrong here? -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from thi

Re: How to know when an admin form is completly saved to DB?

2011-03-05 Thread Sithembewena Lloyd Dube
or more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goog

Django + WebFaction file: where to place the ie_css3.htc file?

2011-03-09 Thread Sithembewena Lloyd Dube
osted at WebFaction - the setup there isn't like typical GCI/ PHP sites, with a root folder and such. Any ideas please? -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Django + WebFaction file: where to place the ie_css3.htc file?

2011-03-09 Thread Sithembewena Lloyd Dube
Hi Kenneth, I am yet to ask WebFaction. Thanks for the suggestion, I did put the file next to the favicon (in MEDIA_ROOT) and IE still won't execute the VML. Thanks. On Wed, Mar 9, 2011 at 11:55 AM, Kenneth Gonsalves wrote: > On Wed, 2011-03-09 at 11:51 +0200, Sithembewena Lloyd Du

Re: Django + WebFaction file: where to place the ie_css3.htc file?

2011-03-09 Thread Sithembewena Lloyd Dube
Problem solved, thanks to the brilliant folks at WebFaction. *behaviour:url('/site_media/css/ie_css3.htc')* <= MEDIA_URL + rest of path. Gracias. On Wed, Mar 9, 2011 at 12:08 PM, Sithembewena Lloyd Dube wrote: > Hi Kenneth, > > I am yet to ask WebFaction. Thanks for the

Re: Django + WebFaction file: where to place the ie_css3.htc file?

2011-03-09 Thread Sithembewena Lloyd Dube
Yep, they are. Thanks to you Kenneth, for pointing me in the right direction! Had spent a lot of time wrecking my head over this one. On Wed, Mar 9, 2011 at 1:20 PM, Kenneth Gonsalves wrote: > On Wed, 2011-03-09 at 13:16 +0200, Sithembewena Lloyd Dube wrote: > > Problem solved, than

Re: What is the best server for Django

2011-03-09 Thread Sithembewena Lloyd Dube
eveloper & programmer > http://blog.eood.cn/ > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, sen

Re: What is the best server for Django

2011-03-09 Thread Sithembewena Lloyd Dube
P.S: by "custom modules", I really meant long-running processes. They also limit the number of users allocated per shared machine to maintain decent performance. On Wed, Mar 9, 2011 at 4:47 PM, Sithembewena Lloyd Dube wrote: > I guess it all depends on what one's needs are.

Django sitemap framework

2011-03-10 Thread Sithembewena Lloyd Dube
Hi everyone, Does Django Sitemap Framework handle paginated content? I have a Django sitemap generating URLs for articles, and the articles are paginated on the site. Thanks. -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups

Re: django-admin-py?

2011-03-17 Thread Sithembewena Lloyd Dube
gt; syncdb > test > testserver > validate > > C:\DjangoProject\djangotest> > > > Regards > glenn > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email t

Re: django-admin-py?

2011-03-17 Thread Sithembewena Lloyd Dube
Please also provide the Django version? Thanks. On Fri, Mar 18, 2011 at 12:16 AM, Sithembewena Lloyd Dube wrote: > Hello Glenn, > > What operating system are you on? You seem to have tried to use manage.py > correctly, but I suspect this has to do with your Django installation befor

Re: django-admin-py?

2011-03-17 Thread Sithembewena Lloyd Dube
ngo-admin.py to your Python path and let us know how that goes? On Fri, Mar 18, 2011 at 12:32 AM, Mike Ramirez wrote: > On Thursday, March 17, 2011 03:16:44 pm Sithembewena Lloyd Dube wrote: > > > Hello Glenn, > > > > > > What operating system are you on? You seem t

Limiting file upload type?

2011-03-25 Thread Sithembewena Lloyd Dube
Hi folks, I have a model with a FileField, and I need to chech that the file is .mp3 before it is uploaded. How would I go about this without the hack of getting the file name and slicing it? -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the

Trouble raising forms.ValidationError in save() override in admin.py

2011-03-30 Thread Sithembewena Lloyd Dube
/admin/browse/podcast/add/ Django Version: 1.2.3 Exception Type: ValidationError Exception Value: [u'A podcast file is required.'] Exception Location: C:\Websites\TPFRepository\thepokerfarm\..\thepokerfarm\browse\admin.py in save_model, line 212 Python Executable: C:\Python26\python.exe

Re: Limiting file upload type?

2011-03-30 Thread Sithembewena Lloyd Dube
se forms.ValidationError("A podcast file is required.") Just out of curiosity, what does your custom FielField look like? Many thanks! On Fri, Mar 25, 2011 at 5:20 PM, David De La Harpe Golden < david.delaharpe.gol...@ichec.ie> wrote: > On 25/03/11 13:48, Sithembewena Ll

Re: Trouble raising forms.ValidationError in save() override in admin.py

2011-03-31 Thread Sithembewena Lloyd Dube
to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Regards, Sithembewena Lloyd

Re: I want Develop django poll app tuturial

2011-03-31 Thread Sithembewena Lloyd Dube
quot;Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en.

Re: I want Develop django poll app tuturial

2011-03-31 Thread Sithembewena Lloyd Dube
^^ This would apply per poll. On Thu, Mar 31, 2011 at 4:50 PM, Sithembewena Lloyd Dube wrote: > Hi there, > > I think that you would need to get the count of votes for each poll, add > all votes and use the formula: > > vote_percentage = (poll_votes/total_poll_votes)*100 >

Reusing a code snippet

2011-04-12 Thread Sithembewena Lloyd Dube
ere: http://djangosnippets.org/snippets/1708/ Thanks. -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send em

Re: Reusing a code snippet

2011-04-12 Thread Sithembewena Lloyd Dube
DLEWARE_CLASSES tuple in settings.py. > -- > DR. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group,

Re: Reusing a code snippet

2011-04-12 Thread Sithembewena Lloyd Dube
sage because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at &g

Re: What happens if pk value gets too big?

2015-04-03 Thread Sithembewena Lloyd Dube
Hahaha ... I like how that ended, Russ :D Kind regards, Lloyd On Sat, Apr 4, 2015 at 12:57 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Sat, Apr 4, 2015 at 6:25 AM, Mike wrote: > >> Hi, >> Is there risk of getting too big PK value while adding and deleting rows >> for long t

Preparing virtualenvwrapper for Django 1.6 development

2014-08-22 Thread Sithembewena Lloyd Dube
Hi everyone, I am developing on a Windows 8.1 machine and wold like to setup virtualenvironment via virtualenvwrapper so as to have a properly set up Python development environment. I am referring to Jeff Knupp's guide at http://www.jeffknupp.com/blog/2013/12/18/starting-a-django-16-project-the-r

<    1   2   3   4   >