Re: How to structure this django application

2017-04-07 Thread Sithembewena Lloyd Dube
ot; <rshep...@appl-ecosys.com> wrote: > On Sat, 8 Apr 2017, Sithembewena Lloyd Dube wrote: > > My best recommendation for structuring Django projects (and for >> optimization and a myriad other goodies) would be the book Two Scoops of >> Django by Daniel and Au

Re: How to structure this django application

2017-04-07 Thread Sithembewena Lloyd Dube
Hey Rich, My best recommendation for structuring Django projects (and for optimization and a myriad other goodies) would be the book Two Scoops of Django by Daniel and Audrey Roy Greenfeld. I could say a lot but the bottom line is, check the book out. It's at https://www.twoscoopspress.com/

Re: Phone number field in form/ model

2016-12-14 Thread Sithembewena Lloyd Dube
Thanks guys! On Wed, Dec 14, 2016 at 9:47 PM, Michal Petrucha < michal.petru...@konk.org> wrote: > On Wed, Dec 14, 2016 at 09:36:06PM +0200, Sithembewena Lloyd Dube wrote: > > Hi, > > > > Has anyone captured phone number information using a Form/ModelForm >

Phone number field in form/ model

2016-12-14 Thread Sithembewena Lloyd Dube
Hi, Has anyone captured phone number information using a Form/ModelForm instance? I have the field as an IntegerField in my model and (for obvious reasons) it truncates the leading '0'. How have you solved this problem, anyone? -- Regards, Sithembewena -- You received this message because you

Djang freelance hourly rates

2016-08-28 Thread Sithembewena Lloyd Dube
Out of curiousity, what do those who are freelancing on Django projects charge per hour? -- Regards, Sithembewena -- 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

Re: Debugging DJango app on production for High CPU Usage

2016-02-29 Thread Sithembewena Lloyd Dube
New Relic. On Wed, Feb 24, 2016 at 6:59 AM, Web Architect wrote: > Hi, > > We have an ecommerce platform based on Django. We are using uwsgi to run > the app. The issue the CPU usage is hitting the roof (sometimes going > beyond 100%) for some scenarios. I would like to

Re: Home Page

2016-02-23 Thread Sithembewena Lloyd Dube
Have you done the tutorial? Django is suitable for everything you listed, it's just that you need to learn how to implement those things in Django. This means you need to know how to use Django. I suggest you do the tutorial first. On Tue, Feb 23, 2016 at 2:59 PM, Malik Rumi

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

Re: Serving static files and media in Django 1.7.1

2015-01-06 Thread Sithembewena Lloyd Dube
Tue, Jan 6, 2015 at 8:30 PM, Sithembewena Lloyd Dube <zebr...@gmail.com > > wrote: > >> Hi everyone, >> >> I have a Django 1.7.1 project structured as per documentation. In it, I >> have an app called "mainsite". In mainsite, I have >> templates/mainsit

Serving static files and media in Django 1.7.1

2015-01-06 Thread Sithembewena Lloyd Dube
Hi everyone, I have a Django 1.7.1 project structured as per documentation. In it, I have an app called "mainsite". In mainsite, I have templates/mainsite/index.html and static/mainsite/bootstrap.css. In the index template, I use {% load staticfiles %} and then for css I have the following link:

Re: ANN: Django website redesign launched

2014-12-17 Thread Sithembewena Lloyd Dube
I second Rakan's suggestion regarding the use of logos. Here's a perfect example of the concept (and how effective it is): http://www.pylonsproject.org/ On Wed, Dec 17, 2014 at 2:04 PM, Rakan Alhneiti wrote: > > God job everyone! > > Do you think the Overview page

Re: ANN: Django website redesign launched

2014-12-17 Thread Sithembewena Lloyd Dube
I like the new design. A lot. Thank you! On Wed, Dec 17, 2014 at 6:20 AM, Torsten Bronger < bron...@physik.rwth-aachen.de> wrote: > > Hallöchen! > > Cal Leeming writes: > > > [...] > > > > The footer menu contrast is a little bright with the white/light > > green, however it's worth noting that

Cannot import models from utility script

2014-10-05 Thread Sithembewena Lloyd Dube
Hi all, I am using Django 1.7 and I have a package called 'utilities' next to my app package like so: --> my project --> my_app -- __init__.py -- models.py --> utilities -- __init__.py -- do_something.py Inside do_something.py in utilities, I am getting

Re: Suggestions about building new ecommerce website

2014-09-08 Thread Sithembewena Lloyd Dube
As you are a one-man team and would like to minimise time to market and cost, I highly recommend Django. Fantastic community, fairly straight forward to learn framework. Rails has more magic than I find useful when learning and Django's admin rocks. On Mon, Sep 8, 2014 at 6:04 PM, Charly Román

Re: ORM performance

2014-09-03 Thread Sithembewena Lloyd Dube
Thanks to the OP for asking this, and to all who answered. Ben, special stars to you - you just shared some very valuable insight into efficieint use of the ORM (wasn't obvious to me). Kind regards, Lloyd On Thu, Sep 4, 2014 at 2:21 AM, Benjamin Scherrey wrote: > The

Re: [ANNOUNCE] Django 1.7 released

2014-09-02 Thread Sithembewena Lloyd Dube
Awesome! Thanks to everyone who's made this release possible. On Wed, Sep 3, 2014 at 12:13 AM, James Bennett wrote: > Django 1.7 is now available: > > https://www.djangoproject.com/weblog/2014/sep/02/release-17-final/ > > Alongside this are bugfix releases for 1.4, 1.5

Re: Django 1.7 tutorial: Use generic views

2014-08-30 Thread Sithembewena Lloyd Dube
I suggest typing: - manage.py shell - from polls import views - dir(views) What output do you get? i.e, nspect views like the regular python module that it is. On Sat, Aug 30, 2014 at 6:41 PM, Pitchblack wrote: > I need to use Jython instead of Python, I found that

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

Re: django beginner

2014-07-02 Thread Sithembewena Lloyd Dube
I suggest you do so. It is important to understand how the framework works before attempting to create your own projects or even using existing apps. On Wed, Jul 2, 2014 at 10:21 AM, ngangsia akumbo wrote: > no i did not > > -- > You received this message because you are

Re: django beginner

2014-07-02 Thread Sithembewena Lloyd Dube
Did you complete the entire tutorial? On Wed, Jul 2, 2014 at 10:14 AM, ngangsia akumbo wrote: > i do the installation, create the virtualenv, startproject, startapp, > create models, activate admin, > > i still confuse with one thing, if i randomly create this apps how do i

Re: The Django 1.7 tees!

2014-06-29 Thread Sithembewena Lloyd Dube
either of > those emails, then I don't know what's happened with your order - you might > want to contact TeeSpring support. > > Yours, > Russ Magee %-) > > On Sunday, June 8, 2014, Sithembewena Lloyd Dube <zebr...@gmail.com> > wrote: > >> Hi Russell, >>

Re: apps for hotel site

2014-06-25 Thread Sithembewena Lloyd Dube
That really depends on what functionality you want. Booking? Reporting? etc ... On Wed, Jun 25, 2014 at 3:41 PM, ngangsia akumbo wrote: > please what are the basic apps i need to include in my hotel website? > > > -- > You received this message because you are subscribed

Re: Any position for Django/Python Developer?

2014-06-18 Thread Sithembewena Lloyd Dube
Also search on Indeed.com. On Wed, Jun 18, 2014 at 6:20 PM, Sithembewena Lloyd Dube <zebr...@gmail.com> wrote: > Hey, > > Try www.djangogigs.com? Also, search LinkedIn - I always see stuff posted > there. Join the Django and Python groups. > > > On Wed, Jun 18, 201

Re: Any position for Django/Python Developer?

2014-06-18 Thread Sithembewena Lloyd Dube
Hey, Try www.djangogigs.com? Also, search LinkedIn - I always see stuff posted there. Join the Django and Python groups. On Wed, Jun 18, 2014 at 5:08 PM, Kannan wrote: > Guys, > I have not got a single reply. > Please let me know where I can search for a remote job or part

Re: The Django 1.7 tees!

2014-06-07 Thread Sithembewena Lloyd Dube
ve > access to any info beyond that. > > However, personally, I wouldn't take absence of a bank record to be > evidence of anything. Interbank currency arbitrage is a mess :-) > > Yours, > Russ Magee %-) > > > On Sunday, June 8, 2014, Sithembewena Lloyd Dube <zebr..

Re: The Django 1.7 tees!

2014-06-07 Thread Sithembewena Lloyd Dube
The actual shirts should have gone into production on Monday as well, and > generally ship within 2 weeks. US deliveries take 7-14 days from end of > campaign; international take 14-21 days. > > Yours, > Russ Magee %-) > > > On Mon, Jun 2, 2014 at 8:13 PM, Sithembewena Llo

Re: The Django 1.7 tees!

2014-06-02 Thread Sithembewena Lloyd Dube
Hey Russell, I placed an order for a small tee, but I see my card has not been debited in my bank statement? When do they get charged/ shipped? Thanks, Lloyd On Wed, May 21, 2014 at 2:17 PM, Sithembewena Lloyd Dube <zebr...@gmail.com> wrote: > Hi Russell, > > Thank you! I re

Re: The Django 1.7 tees!

2014-05-21 Thread Sithembewena Lloyd Dube
acing an order, so we've re-opened the campaign for one last run to make > sure everyone who wants a shirt can get one. You can place your order here: > > http://teespring.com/django17-v2 > > You have until the end of May. > > Yours, > Russ Magee %-) > > > > On Thu,

Re: [Tutor] PyCountry currency formatting woes

2014-05-08 Thread Sithembewena Lloyd Dube
Thank you all, babel works just fine. I also tried ccy, which isn't bad either - except that it returns non-unicode currency letters for countries in the Eurozone. On Mon, May 5, 2014 at 10:10 AM, Peter Otten <__pete...@web.de> wrote: > Sithembewena Lloyd Dube wrote: > &

Re: What is different of handling character code between pure Python and Django?

2014-05-06 Thread Sithembewena Lloyd Dube
That should be ".encode('utf-8') - it is separated by a dash. On Tue, May 6, 2014 at 4:31 PM, 杉田臣輔 wrote: > Hello > > Thank you for replying. > I tried to use the ".encode('utf8')" method before. > > I also tried your suggestion. But error happened like below. > > 'ascii'

Re: [Tutor] PyCountry currency formatting woes

2014-05-06 Thread Sithembewena Lloyd Dube
Thanks for this response, this is exactly what I needed to know. On Mon, May 5, 2014 at 6:26 AM, Marc Tompkins <marc.tompk...@gmail.com>wrote: > On Sun, May 4, 2014 at 1:55 PM, Sithembewena Lloyd Dube <zebr...@gmail.com > > wrote: > >> Thanks, i was actually ge

Re: PyCountry currency formatting woes

2014-05-04 Thread Sithembewena Lloyd Dube
:25 PM, Sithembewena Lloyd Dube <zebr...@gmail.com>wrote: > Hi everyone, > > I have a function which accepts an alpha2 country code and a price string, > where the aim is to get the country's currency and use the currency.letter > property of that currency to format the supplied

PyCountry currency formatting woes

2014-05-04 Thread Sithembewena Lloyd Dube
Hi everyone, I have a function which accepts an alpha2 country code and a price string, where the aim is to get the country's currency and use the currency.letter property of that currency to format the supplied price string. The above works fine so far - yet it falls over when called with

Re: The Django 1.7 tees!

2014-05-01 Thread Sithembewena Lloyd Dube
campaign for a week. > > Yours, > Russ Magee %-) > > > On Wed, Apr 30, 2014 at 11:58 PM, Sithembewena Lloyd Dube < > zebr...@gmail.com> wrote: > >> To Whom It May Concern, >> >> I am devastated that I could not place an order for one of the new Dja

The Django 1.7 tees!

2014-04-30 Thread Sithembewena Lloyd Dube
To Whom It May Concern, I am devastated that I could not place an order for one of the new Django 1.7 tees. Now that I am ready to go, the campaign has ended on the merchant website. May I please place an order for one? I'd dearly like a memento of this milestone release. Pretty please?

Re: Best way to learn Django considering Python versions and etc.

2013-12-11 Thread Sithembewena Lloyd Dube
Thanks for this - interesting. Another option would be Two Scoops of Django by PyDanny and Audrey. On Wed, Dec 11, 2013 at 5:41 AM, Ashutosh Das wrote: > > Hi > there is a great book for Django http://www.tangowithdjango.com/ > > -- > You received this message because you

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写道:

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: 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

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

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

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

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** ** >

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: >

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

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

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

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) >

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

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: 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

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

Re: Adding YouTube video id to url

2013-08-10 Thread Sithembewena Lloyd Dube
Dube <zebr...@gmail.com > 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...@

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 <zebr...@gmail.com > wrote: > Hi, > > I am using the YouTube API to fet

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 <zebr...@gmail.com > wrote: > Hi, > > I am using the YouTube API to fet

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: 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

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

Re: Django installation on vanilla Mac OSX 10.8.2 mountain lion

2013-08-03 Thread Sithembewena Lloyd Dube
d 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 Dube > > <zebr...@gmail.c

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

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

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

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: 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: 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

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.

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 > > > wrote: >

Re: Static files not served

2013-06-27 Thread Sithembewena Lloyd Dube
this is not 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 <zebr...@gmail.com >

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

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

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

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

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 <zebr...@gmail.com>wrote: > Hey, > > The player belongs to a club. So in the player model you should have

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

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 <tovm...@gmail.com> 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

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

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

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 <

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

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

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

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
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, Sithembewena Lloyd

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
at, May 11, 2013 at 2:28 AM, Sithembewena Lloyd Dube <zebr...@gmail.com>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-

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
thembewena Lloyd Dube <zebr...@gmail.com>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

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 <zebr...@gmail.com>wrote: > Hi Phillipe, > > I think that it really depends on how modular you would l

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?

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 <z

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 <zebr...@gmail.com>wrote: >

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

2013-04-09 Thread Sithembewena Lloyd Dube
, Sithembewena Lloyd Dube <zebr...@gmail.com>wrote: > Hi all, > > I have the correct url, but the dev server seems to be caching my old > template, even though I updated it to include namespacing. I have restarted > the server and cleared my browser cache. > > contacts > >

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

2013-04-09 Thread Sithembewena Lloyd Dube
Hi all, I have the correct url, but the dev server seems to be caching my old template, even though I updated it to include namespacing. I have restarted the server and cleared my browser cache. contacts On Tue, Apr 9, 2013 at 5:11 PM, Sithembewena Lloyd Dube <zebr...@gmail.com>wrote:

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

2013-04-09 Thread Sithembewena Lloyd Dube
Tom, The latter. I did not call reverse explicitly (not yet). I have implemented namespacing as recommended. Contact Us On Tue, Apr 9, 2013 at 4:59 PM, Tom Evans <tevans...@googlemail.com> wrote: > On Tue, Apr 9, 2013 at 3:56 PM, Sithembewena Lloyd Dube > <zebr...@gmail.com

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

2013-04-09 Thread Sithembewena Lloyd Dube
at 4:43 PM, Sithembewena Lloyd Dube <zebr...@gmail.com>wrote: > Thanks, Tom. > > I am not sure how you mean? In the contact_us app, I am not explicitly > calling reverse. I only have the following: > > from django.shortcuts import render, reverse > > def contact_us

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

2013-04-09 Thread Sithembewena Lloyd Dube
, Apr 9, 2013 at 4:43 PM, Sithembewena Lloyd Dube <zebr...@gmail.com>wrote: > Thanks, Tom. > > I am not sure how you mean? In the contact_us app, I am not explicitly > calling reverse. I only have the following: > > from django.shortcuts import render, reverse &g

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

2013-04-09 Thread Sithembewena Lloyd Dube
Evans <tevans...@googlemail.com> wrote: > On Tue, Apr 9, 2013 at 2:31 PM, Sithembewena Lloyd Dube > <zebr...@gmail.com> wrote: > > Hi everyone, > > > > I have a project based on the latest Django version (1.5.1.) where I > created > > a contact_u

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

2013-04-09 Thread Sithembewena Lloyd Dube
ugged-in" app? (base url + app-view url?). On Tue, Apr 9, 2013 at 3:40 PM, Andrey Kostakov <b...@dzen.ws> wrote: > Try this without quotes: > Contact Us > > On Tue, Apr 9, 2013 at 5:31 PM, Sithembewena Lloyd Dube > <zebr...@gmail.com> wrote: > > Hi everyone, &

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

2013-04-09 Thread Sithembewena Lloyd Dube
Hi everyone, I have a project based on the latest Django version (1.5.1.) where I created a contact_us application. The project has a urls.py file with some url patterns. The contact_us app implements its own urls.py file (decoupling). In the project's urls.py file (just above the admin site's

Re: What's your opinion about nested apps?

2013-01-12 Thread Sithembewena Lloyd Dube
I also suspect that this sort of nesting will affect plugability of apps - what is wrong with a simple approach? On Sat, Jan 12, 2013 at 11:02 PM, Sam Solomon wrote: > We've not had any trouble and we have a very nested structure: > > project/main_app/sub_apps/ > > project has

Re: What's your opinion about nested apps?

2013-01-12 Thread Sithembewena Lloyd Dube
Why does this sort of nesting even occur? Why not use the generic Django project/ app structure, where you have a project and apps under a project, instead of apps under other apps? Why would it ever be necessary to 'nest' apps in other apps? On Sat, Jan 12, 2013 at 11:02 PM, Sam Solomon

Re: Django community, is it active?

2012-12-20 Thread Sithembewena Lloyd Dube
"Working with a framework is like any relationship... you make sacrifices.. *the love you get back depends on what you put in*.." - hehe ... moving on swiftly ... Vis. the bears, I can only recommend bear spray - and a good one, at that. To address the queries at hand - coming from several

Re: Django community, is it active?

2012-12-20 Thread Sithembewena Lloyd Dube
"Working with a framework is like any relationship... you make sacrifices.. *the love you get back depends on what you put in*.." - hehe ... moving on swiftly ... Vis. the bears, I can only recommend bear spray, or a dictionary - dependent on one's particular circumstances. To address the

  1   2   3   4   >