Re: Code written by Senior Django Developers

2023-06-11 Thread Babatunde Akinyanmi
Hi Joseph, Django is open source. Feel free to dive in. Or better still, go through pull requests so that you can see the context for parts of the code and also what functionality they provide. On Sun, 11 Jun 2023 at 20:00, Joseph Balogun wrote: > Hi Django fam! > > Can you pls recommend a resou

Re: django-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
Seems like the app depends on paginator. Why not install the paginator app? On 1/30/12, Timothy Makobu wrote: > Hi all, > > I'm on Django 1.3 > > I just now installed django-db-log via pip, but after adding it to > installed_apps, I get this Exception: > > Traceback (most recent call last): >

Re: django-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
obu wrote: > It's trying to import it from django.contrib.admin.views.main > > > On Mon, Jan 30, 2012 at 4:29 PM, Babatunde Akinyanmi > wrote: > >> Seems like the app depends on paginator. Why not install the paginator >> app? >> >> >> On 1/30/12,

Re: django-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
Oh I see. I was reading djangodblog as django-dblog instead of django-db-log so I was thinking djangodblog was a directory you created yourself. As long as Paginator remains on that line there's no way to go forward. If I was you, I'd try to go through the source and figure out if Paginator should

Re: django-db-log import Exception

2012-01-30 Thread Babatunde Akinyanmi
up the fixed dangodblog as a > dep where the app is hosted. It's all automated. > > > On Mon, Jan 30, 2012 at 6:45 PM, Babatunde Akinyanmi > wrote: >> Oh I see. I was reading djangodblog as django-dblog instead of >> django-db-log so I was thinking djangodblog was a directo

Re: Hosting Alwaysdata: install dajax libraries

2012-01-30 Thread Babatunde Akinyanmi
Alwaysdata allows you to install your own apps. Alwaysdata also IMHO the best customer support available. First search the forum at http://forum.alwaysdata.com and if you don't get the instructions there, log in to your admin account (http://admin.alwaysdata.com), click on support and then raise a

Re: same code runs on two machines and barfs on the third

2012-02-06 Thread Babatunde Akinyanmi
Perhaps you made a change to a model and forgot to syncdb on your Fedora 15 machine. On 2/7/12, kenneth gonsalves wrote: > hi, > > this is the relevant part of my model: > > class Team(models.Model): > name = models.CharField(_("Team Name"),max_length=150,unique=True) > members = >

Re: Finding It Hard To Make It Work!

2012-02-08 Thread Babatunde Akinyanmi
Use AJAX or asynchronous programming On 2/8/12, coded kid wrote: > Hello, I want to make the below codes let users update their status in > the Django . And their update should display on the same template. But > it’s not working. E.g when a user type in “To be a hacker is not a > day’s job” in

Re: Comments Link- How to?

2012-02-13 Thread Babatunde Akinyanmi
Please Rephrase. I don't get the part of "comment link name" On 2/13/12, coded kid wrote: > Hi Guys, How can I link to “Django Comment form”, so that when a user > clicks on the “Comment Link Name” It will display the Comment Form on > the same page with the post. I hope you get my point? If you

Re: sqlite3 database error

2012-02-13 Thread Babatunde Akinyanmi
After specifying the path to where you want your sqlite database to be i.e db name setting, after your syncdb, the database will be created automatically if it doesn't already exist in the path you stated. On 2/13/12, Marcus Maximus wrote: > Hey guys, > > i am using sqlite3 for my django app. BUT

Re: Comments Link- How to?

2012-02-13 Thread Babatunde Akinyanmi
quot;Comment Link Name" is the name you want to give to your link. > So when a user click on it, it should show the comment form on the > same page. I hope you now get my point? > > On Feb 13, 1:26 pm, Babatunde Akinyanmi wrote: >> Please Rephrase. I don't get the part o

Re: DATABASE in settings file not working

2012-02-17 Thread Babatunde Akinyanmi
Try to connect to mysql with the same credentials on your terminal. If it doesn't work then you need to reset your root password. sudo dpkg-reconfigure mysql-server-5.1 Should do the trick and then restart the server (That works on ubuntu). Also you should consider creating a separate user inste

Re: DATABASE in settings file not working

2012-02-17 Thread Babatunde Akinyanmi
py it doesn't use a > password as the error message states. However when I force the > settings file with the --settings option then it reads the file > correctly and uses the password. > > On Feb 17, 7:06 am, Babatunde Akinyanmi wrote: >> Try to connect to mysql with th

Re: Dumb newbie question

2012-02-17 Thread Babatunde Akinyanmi
I'm also a noob. If I had code that would use the same models then I would keep everything inside one app but divide them into modules On 2/17/12, Bob Carlson wrote: > I'm well into beginning building my actual app after going through the > tutorial, > but I have no feel yet for the answer to thi

Re: Dumb newbie question

2012-02-17 Thread Babatunde Akinyanmi
I'm also a noob. If I had code that would use the same models then I would keep everything inside one app but divide them into modules On 2/17/12, Bob Carlson wrote: > I'm well into beginning building my actual app after going through the > tutorial, > but I have no feel yet for the answer to thi

Re: I am getting TypeError: coercing to Unicode: need string or buffer, long found. Please help.

2012-02-20 Thread Babatunde Akinyanmi
@Daniel Your __unicode__ should always return a string so like Shawn said, when you check your phone model, its __unicode__ method should be returning str() or unicode() not int On 2/20/12, Shawn Milochik wrote: > Read the error message in your subject line. Then look at the > __unicode__ method

Re: RemoteUserBackend not creating user

2012-02-20 Thread Babatunde Akinyanmi
I'm not too sure what you are trying to do but there's no part of your code that tries to create a user. Maybe you should give more information On 2/21/12, Roberto Bouza wrote: > Hello, > > I've been hitting my head pretty hard trying to figure out what the > problem is hope someone here can hel

Re: new project directory not defined when starting :

2012-02-21 Thread Babatunde Akinyanmi
Hi niceseb, Please be more specific about what you mean by nothing happens. That way you'll be able to quickly get useful assistance. On 2/21/12, niceseb wrote: > Hi Python experts, > > I want to start a new project with : > > C:\Users\Django_Projects>django-admin.py startproject mysite > > but n

Re: Django Comments-Redirecting

2012-02-23 Thread Babatunde Akinyanmi
dude, change {% url %}" /> to your own custom view like the view you used to load the page where you are collecting the comments. Don't mean to be harsh but what were you thinking? django.contrib.comments.views.comments.comment_done by default redirects to the "Thanks for your comment" page. On

Re: Django Comments-Redirecting

2012-02-23 Thread Babatunde Akinyanmi
:) Keep going maiyte but don't burnt out. On Fri, Feb 24, 2012 at 4:24 AM, coded kid wrote: > Thanks man! I've changed it to {{request.path}}. > > Not thinking bout anything. Just might be tired then! > > On Feb 23, 4:30 pm, Babatunde Akinyanmi wrote: > > dude, &

Re: Django ExtraField

2012-02-27 Thread Babatunde Akinyanmi
Hi coded, You can't get rid of that field and expect the comment framework to work right. Other posters have suggested that you use a hiddenField widget on your form class (you are using a custom comment model right?). If that's not going smoothly, then you should do it with CSS ie add a class sele

Re: Getting Started with Mac OS X

2012-02-27 Thread Babatunde Akinyanmi
I've never used mac OS but try: python django-admin.py startproject mysite On 2/28/12, JChlipala wrote: > Hello, > > I am a Django beginner, and am trying to get Django set up in Mac OS > X. I am going through the tutorial, but getting stuck very early > (essentially at the beginning). I have i

Re: User actions logging app

2012-02-28 Thread Babatunde Akinyanmi
Yes, they definitely will. On 2/28/12, akaariai wrote: > On Feb 28, 11:35 pm, Mario Gudelj wrote: >> Hi list, >> >> I was wandering if someone could recomend an easy django app for logging >> user actions performed on models. I'd like to log changes logged in users >> make around the app. > > I

Re: Displaying Updates

2012-03-14 Thread Babatunde Akinyanmi
What's your algorithm? On 3/13/12, coded kid wrote: > Hi Guys, how can I make users who are following each other view their > status update on their walls? In my project, users can follow and > unfollow each other but the problem I’m facing is that, both of them > can’t see each other statuses on

Re: Displaying Updates

2012-03-14 Thread Babatunde Akinyanmi
Hi coded, You just mentioned the features of your app not the algorithm you are using for getting updates to a wall. For example algorithm for authenticating a user could be: *if user name submitted exists in database, hash submitted password *compare hash with hash saved in database linked with us

Re: calculated form field

2012-03-20 Thread Babatunde Akinyanmi
Why not just do: useage = capital * tax_rate Instead of your projfin function. In the projfin function, the request you are passing is also redundant. As for the error, I don't know how you refactored your models code but obviously from the error message, you are not passing in ints. You can try t

Re: Multiple Choice Quiz

2012-03-24 Thread Babatunde Akinyanmi
Hi jbr3, Check scrabala.com Is it similar to what you are working on? On 3/23/12, jbr3 wrote: > Hi again, > > I've been trying to figure this out for awhile, but to no avail. I'll > try to list the problems I've had in understanding it. > > 1. I'm not sure what the forms.py file should look like.

Re: Tweepy Status Error

2012-03-25 Thread Babatunde Akinyanmi
What is wrong is clear. process_status is not defined or imported so that's why you have that error. I don't know about tweepy but maybe process_status is supposed to be imported from somewhere. On 3/25/12, coded kid wrote: > Hi guys, I been trying to iterate over status, but I’m getting this > e

Re: Multiple Choice Quiz

2012-03-26 Thread Babatunde Akinyanmi
. But, > that's mostly what I was thinking of. > > On Mar 24, 3:08 am, Babatunde Akinyanmi wrote: > > Hi jbr3, > > Check scrabala.com > > Is it similar to what you are working on? > > > > On 3/23/12, jbr3 wrote: > > > > > > > > &

Re: Multiple Choice Quiz

2012-03-26 Thread Babatunde Akinyanmi
age, however, and I wouldn't incorporate the time limit. But, >> that's mostly what I was thinking of. >> >> On Mar 24, 3:08 am, Babatunde Akinyanmi wrote: >> > Hi jbr3, >> > Check scrabala.com >> > Is it similar to what you are working on? &

Re: Tutorial question regarding def _unicode_

2012-04-11 Thread Babatunde Akinyanmi
I don't know if its because I'm reading this mail from my phone but you should have __unicode__() not _unicode_() ie is 2 underscores before and after not 1 On 4/11/12, Brandy wrote: > I am working through the tutorial and have already added the def > _unicode_ statements to my code. However, wh

Re: cannot import name current_datetime

2012-04-18 Thread Babatunde Akinyanmi
I have a feeling you want to do: Import datetime not import current_datetime On 4/18/12, asherakhet06 wrote: > H all! > > I am fairly new to programming (went over LPTHW) and now going through the > Djangobook on the internet. Quick beginners question: In Chapter 3, where > I am looking at a dy

Re: deploying django - including third party apps

2012-04-27 Thread Babatunde Akinyanmi
Asides Shawn's answer, alwaysdata's documentation educates how to install packages on the host On 4/26/12, Shawn Milochik wrote: > There's no reason a user couldn't run virtualenv, regardless of permissions. > > Download the virtualenv tarball and extract it. It contains a file named > virtualenv

Re: system can not find specified path

2012-05-08 Thread Babatunde Akinyanmi
Hi theo, Why not show your settings.py file and the exact traceback On 5/8/12, AJAYI THEOPHILUS wrote: > I installed django with setup.py perfecctly but after configuring sqlite3 > database and running the syncdb command i received system can not find > specified path so i uninstalled django but

Re: i need to place my django site on a server, i dont know how to do it! help!!!

2012-05-10 Thread Babatunde Akinyanmi
Or alwaysdata.com They have a free plan On 5/10/12, doniyor wrote: > many thanks eihli, i will follow the steps you gave.. cool, i let you know > about how it worked.. > > later > > > Am Donnerstag, 10. Mai 2012 16:13:05 UTC+2 schrieb eihli: >> >> This won't be a complete list but it's what I

Re: How do you install Django on a shared hosting without root access?

2012-05-13 Thread Babatunde Akinyanmi
Alwaysdata.com will also save you headaches, has excellent support plus they have a free plan. On 5/12/12, Michael Ray wrote: > I second Webfaction! It will save you a lot of headaches. > > -- > Michael Ray > Sent with Sparrow (http://www.sparrowmailapp.com/?sig) > > > On Saturday, May 12, 2012 a

Re: How do you install Django on a shared hosting without root access?

2012-05-13 Thread Babatunde Akinyanmi
Lol. Nice way to go. On 5/13/12, Gerald Klein wrote: > What host? > > > thanks > > --jerry > > On Sun, May 13, 2012 at 2:49 PM, Dan Santos wrote: > >> I forced my local web host (twisted their arm) and the day after they >> created a new procedure for setting up Django without having to use root

Re: PLEAASSEE HEEELPP!!!!!!!!!!!

2012-05-14 Thread Babatunde Akinyanmi
You'll likely get more help from apache server's group (if they have one), from stackoverflow or just google it On 5/14/12, doniyor wrote: > hi there, please help me, i am just right on the coast of success, but > cannot find the clue somehow.. this is my thread: > https://groups.google.com/forum

Re: PLEAASSEE HEEELPP!!!!!!!!!!!

2012-05-14 Thread Babatunde Akinyanmi
**ignore previous message sent in error** On 5/14/12, Babatunde Akinyanmi wrote: > You'll likely get more help from apache server's group (if they have > one), from stackoverflow or just google it > > On 5/14/12, doniyor wrote: >> hi there, please help me, i a

Re: pkg_resources.distributionnotfound django==1.3.1

2012-05-20 Thread Babatunde Akinyanmi
Hi, If you're really sure completely reinstalling django is the way to go, what I do is perform a file system search with keyword "django" and delete as needed On 5/18/12, doniyor wrote: > Hey guys, > > i am getting this error while trying the command: django-admin.py > startproject test > > can

Re: 'str' object has no attribute 'resolve'

2012-06-19 Thread Babatunde Akinyanmi
Hi. Give the full traceback please. It'll be easier to assist with the information On 6/19/12, Sabbineni Navneet wrote: > it still shows the same error > > On Tuesday, June 19, 2012 9:23:50 PM UTC+5:30, Sabbineni Navneet wrote: >> >> This is my url.py file: >> from django.conf.urls.defaults impor

Re: Affordable Django hosting solution in India/around?

2012-06-25 Thread Babatunde Akinyanmi
Alwaysdata(.com) offers free hosting but its shared hosting On 6/25/12, Phang Mulianto wrote: > Hi, > > some thing people search... reliable and cheap / affordable. > > Afforadble / cheap is relative variable there in my opinion. you mention 8$ > / month stil expensive and unaffordable for yo

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-07-05 Thread Babatunde Akinyanmi
For the knowledge of it, me two On 7/4/12, Timothy Makobu wrote: > I'm in. > > On Tue, Jul 3, 2012 at 2:35 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Just in case anyone missed the URL, you can book your slot here: >> >> http://www.doodle.com/8pte

Re: submit parameters to py script

2012-07-07 Thread Babatunde Akinyanmi
Hi, Just like Rohan said, why not do that in your view when processing your form? Here's from the documentation: https://docs.djangoproject.com/en/1.4/topics/forms/?from=olddocs On 7/7/12, Smaran Harihar wrote: > Thanks for the reply Rohan. I am trying to create a Django App in which, > user w

Re: submit parameters to py script

2012-07-07 Thread Babatunde Akinyanmi
Errr, have you read this: https://docs.djangoproject.com/en/1.4/howto/outputting-csv/ Your view can know if a form was submitted, submitted but with invalid data and submitted with valid data. A view is just a python function so if you have determined that the user submitted valid data, just go ah

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-07-22 Thread Babatunde Akinyanmi
Google failed me too On 7/22/12, Cal Leeming [Simplicity Media Ltd] wrote: > Could you clarify what you mean by "twich" and "auto VOD writing"..? Google > failed me :/ > > On Sat, Jul 21, 2012 at 7:02 AM, b1- wrote: > >> +1 >>> >>> >> And use some services like twich with auto VOD writing. >> I

Re: Checking if a dynamicallygenerated dropdown has a selected item

2012-07-23 Thread Babatunde Akinyanmi
Maybe I don't really understand the question but I think if you want to check if the user has answered 3 questions, check from the keys in request.GET or request.POST as the case may be. On 7/23/12, Sithembewena Lloyd Dube wrote: > Hi all, > > I have a dynamically generated dropdown in this fashi

Re: 'QuerySet' object has no attribute '_meta' ... but I'm not using a QuerySet!

2012-07-25 Thread Babatunde Akinyanmi
Looks good to me. Are you sure have shown us all the relevant parts of your code? On 7/25/12, Deathweasel wrote: > Hello, guys. > This is Django 1.4. > > I have this code from my view: > > my_art = ArtworkModel.objects.get(id=pk) > comments = CommentModel.objects.filter(artwork=pk) > artForm = Ar

Re: 'QuerySet' object has no attribute '_meta' ... but I'm not using a QuerySet!

2012-07-25 Thread Babatunde Akinyanmi
Like the code for ArtworkForm On 7/26/12, Babatunde Akinyanmi wrote: > Looks good to me. Are you sure have shown us all the relevant parts of > your code? > > On 7/25/12, Deathweasel wrote: >> Hello, guys. >> This is Django 1.4. >> >> I have

Re: Best Beginning Tutorial for Django 1.4

2012-07-27 Thread Babatunde Akinyanmi
Read the documentation, recreate the project in the documentation tutorial then work on a project of your own. You can't learn to swim by reading books, same for programming. My 50 kobo On 7/27/12, ACK-Django wrote: > hello, guys i m new to django as well as python. > i know its important to lea

Re: django FastCGI configuration for Share Host.

2012-07-29 Thread Babatunde Akinyanmi
Hi, If you are using a shared host, I don't think you can choose if you use FCGI or WSGI. Your host will let you know and also give instructions on how to set up and launch your app. Why not check their documentation or just raise a ticket with your host's support team On 7/29/12, Александър Ботев

Re: Error in Brand New Django 1.4.1 released Yesterday

2012-08-01 Thread Babatunde Akinyanmi
Just now I also did pip install --upgrade django >>> import django >>> django.get_version() '1.4.1' >>> On 8/1/12, Mike Dewhirst wrote: > Yesterday I did ... > > pip install --upgrade django > > ... and it happily upgraded mine to 1.4.1 > > Mike > > On 1/08/2012 9:46am, Dennis Lee Bieber wr

Re: how to let user change the language

2012-08-13 Thread Babatunde Akinyanmi
Hi Gelonida, I haven't ever worked with internalization but off the top of my head after reading the documentation, if I was faced with implementing this, I would first add a field to the user profile say 'preferred_lang'. Next, I would write code that would first check if a preferred language has

Re: how to let user change the language

2012-08-13 Thread Babatunde Akinyanmi
The link given was the overview page. it has links that lead you to deeper parts of the internalization framework. On 8/13/12, Gelonida N wrote: > > On 08/13/2012 12:54 AM, Marcin Tustin wrote: >> So, what part, exactly is a problem? What have you tried? > > Changing settings.LANGUAGE_CODE to ano

Re: Django Admin doesn't show all fields from model when registered.

2012-08-16 Thread Babatunde Akinyanmi
Ok I fixed it and in case someone else falls into such a trap, here's how I fixed it. My Answer model had a field with name 'is_correct' and had a method with name 'is_correct'. This confused django such that: >>> ans = Answer.objects.get(id=1) >>> ans.is_correct > So I changed the name of the '

Re: Django Admin doesn't show all fields from model when registered.

2012-08-18 Thread Babatunde Akinyanmi
Thomas' reply actually did help me narrow down my search efforts to 'namespaces' which is a term I'm actually new to (as a noob) and I was able to get links to articles that did make me understand a little bit more of what goes on beneath the hood of my program especially this: http://docs.python.o

Re: Django Admin doesn't show all fields from model when registered.

2012-08-18 Thread Babatunde Akinyanmi
oops..clicked send too soon and thanks Thomas and Bruno On Sat, Aug 18, 2012 at 11:15 AM, Babatunde Akinyanmi wrote: > Thomas' reply actually did help me narrow down my search efforts to > 'namespaces' which is a term I'm actually new to (as a noob) and I

Re: Any Django people in Windor/West London looking for a client?

2012-08-18 Thread Babatunde Akinyanmi
Hi Andy, I think you need to add more details like what the simple site is and then where the client is located. That way, more local doesn't sound cryptic On Fri, Aug 17, 2012 at 12:06 PM, Andy Baker wrote: > We built a fairly simple Django site and the client would like someone > more local to

Re: I LOVE THIS COMMUNITY!

2012-08-21 Thread Babatunde Akinyanmi
Amen to that On 8/21/12, Mario Gudelj wrote: > I just want to tell you guys that you're awesome! I've never seen a > community which helps noobs so much and with so few dickheads in it. Good > on you! > > Mario > > -- > You received this message because you are subscribed to the Google Groups > "

Re: Django by Example: error with to do app; global name 'escape' is not defined

2012-08-24 Thread Babatunde Akinyanmi
I think you want to add this import statement: from django.utils.html import escape On 8/24/12, koiwai wrote: > plus code > > def response_add(self, request, obj, post_url_continue='../%s/'): > """ > Determines the HttpResponse for the add_view stage. > """ > opts

Re: Site Architecture

2012-09-07 Thread Babatunde Akinyanmi
I'm hardly a pro but I think the answer to your question will depend on why you want to add django to the stack On 9/7/12, Jeff Regan wrote: > I'm not much of an architect and am pretty new to Django, so I was hoping I > > could get some advice. Currently our site is html/jQuery and all the data

Re: Django Tutorial

2012-09-09 Thread Babatunde Akinyanmi
Have you uncommented the url pattern that activates the admin site? On 9/9/12, TJ Max wrote: > Please tell us what your urls.py is > > On Sat, Sep 8, 2012 at 6:02 PM, David Perez > wrote: > >> Hi, >> >> I am new to Django, I am actually starting its tutorial. On part 2 it >> enables the admin sit

Re: Installing a django project, database issue ?

2012-09-23 Thread Babatunde Akinyanmi
Hi, Are you sure brisket was installed properly? Try importing it from your python console. Also, can you show your settings.py INSTALLED_APPS setting? On 9/22/12, new_user wrote: > I am installing the sunlight fondation's brisket and I am really new to > python, and even more to django. So I dow

Re: Django on Bluehost

2012-09-24 Thread Babatunde Akinyanmi
If cloud, I like dotcloud On 9/24/12, Alec Taylor wrote: > You will probably crap-out with Bitbucket. Go to a cloud provider instead. > > For example, Red Hat OpenShift offers their IaaS platform for free (ATM > anyway). > > On Mon, Sep 24, 2012 at 2:21 PM, Zach wrote: > >> Hey everyone, >> I ha

Re: Virtualenvs and editing contrib stuff manually

2012-09-27 Thread Babatunde Akinyanmi
No you won't be smitten. As for isolating your edited django, you can do that but then you would have to be responsible for improving the code base by yourself. Also, your edit might inadvertently break django or introduce bugs that you might find difficult to trace and solve or that might change

Re: conditional model validation

2012-09-27 Thread Babatunde Akinyanmi
Let me try to assist. A forms is_valid method causes 3 types of cleaning methods to be run. Based on that, I'm sure you really don't need to override it. I really don't understand what you mean by "I want the description field to be not blank/not the empty string" so maybe I could have been of mor

Re: Tools - Slow in python django fw

2012-10-01 Thread Babatunde Akinyanmi
There are reasons why your app is slow but nobody would be able to tell you without viewing your sources. You can profile the app and pinpoint where exactly is slow and ask for advise from the list. You can install django-debug-toolbar to profile your database queries. On 10/1/12, siva <85s...@gm

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Babatunde Akinyanmi
Its possible that when you refresh the form and the POST request gets submitted, the form doesn't pass the form.is_valid() if conditional. In your code, you didn't make any provision for when the form fails the is_valid() test and from your code, execution stops once is_valid() returns False so I *

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Babatunde Akinyanmi
Oooops. I see the question has already been answered. My phone didn't get the update on time. On 10/1/12, Babatunde Akinyanmi wrote: > Its possible that when you refresh the form and the POST request gets > submitted, the form doesn't pass the form.is_valid() if conditional. >

Re: Django Admin asks password every operation

2012-10-06 Thread Babatunde Akinyanmi
I suspect Bill's answer is what you are looking for as regards the url. However, it won't solve the password problem On 10/6/12, Stefano T wrote: > What i want is to match the root of my website with a url. > > On Saturday, October 6, 2012 12:53:08 AM UTC+2, ke1g wrote: >> >> All urls match this.

Re: Should we have a database independent SQL like query language in Django?

2012-10-06 Thread Babatunde Akinyanmi
IMO, 'fake sql' would be another layer of abstraction *like the the ORM* over different databases that don't work the same way. The result would be the same. Since the ORM works fine, the ORM could be improved to cater for some of these more complex cases. It leaves using django a matter of learnin

Re: How do I upgrade to 1.4.2?

2012-10-18 Thread Babatunde Akinyanmi
Add --upgrade option On 10/18/12, scottc wrote: > I'm new to django, with a (vanilla) 1.4.0 install, and am knee deep in a > project. > > Can I simply *pip install django* and have everything update properly or > will that fubar my existing project? > > (Win7, Python 2.7.2, django installed in a

Re: saving several models with one save() call

2011-08-24 Thread Babatunde Akinyanmi
You will need to save the A object first. What you can do is override the save method for B model. In the function, check for which argument in *args is an A object. When found, call the super method for A's default save method then call the super method for B's default save method. That should wor

Re: Problem at activating the admin site (Django tutorial part 2)

2011-08-25 Thread Babatunde Akinyanmi
Please say exactly what you did. It will be easier to help that way On 8/25/11, raj wrote: > In ur urls.py, > Did u import admin, make it discoverable, and also uncomment the / > admin/ url? > Also, make sure that you syncdb by running python manage.py syncdb. > Lemme know if that helps :) > On A

Re: Problem at activating the admin site (Django tutorial part 2)

2011-08-25 Thread Babatunde Akinyanmi
The error you stated normally happens when there are problems with the django_site table created when you start a project. On 8/25/11, Babatunde Akinyanmi wrote: > Please say exactly what you did. It will be easier to help that way > > On 8/25/11, raj wrote: >> In ur urls.py,

Re: Problem at activating the admin site (Django tutorial part 2)

2011-08-25 Thread Babatunde Akinyanmi
Pászkán Attila wrote: > Can you give more details? > > > > 2011/8/25 Babatunde Akinyanmi > >> The error you stated normally happens when there are problems with the >> django_site table created when you start a project. >> >> On 8/25/11, Babatund

Re: Problem at activating the admin site (Django tutorial part 2)

2011-08-25 Thread Babatunde Akinyanmi
rocedure (building up an application > according to the tutorial) and it worked fine!!! :-) > > > So, seemingly the problem has been resolved! :-) > (It would be interesting to find out why and how > has influenced that unusual user name the functioning > of my admin-site...but

Re: Installation

2011-08-26 Thread Babatunde Akinyanmi
Hi Prem, You said your django is located in a folder named Django-1.0.4. That is where your PYTHONPATH should be set to not Django-1.3. Since you had multiple python installations, make sure that windows associates .py files with Python 2.7 and not Python 3. If it still doesn't work, you can try th

Re: Select all users that have undone jobs (select, groupby, count)

2011-08-29 Thread Babatunde Akinyanmi
I think the best way is to create a custom manager for the job (check the documentation for details-managers). In the manager, do a query that gets all the users with undone jobs by using the filter option (also see the documentation - making queries). From the resulting querydict you could count t

Re: newbie question on activating the automatic admin

2011-09-09 Thread Babatunde Akinyanmi
Hi nara, This error is normally thrown when the sites app is being used in a django project. I think it can also occur if the sites tables in the database is not properly created during django-admin startproject. Someone else reported that he was able to solve the problem by using a user name witho

Re: new at this -- need some guidance

2011-09-09 Thread Babatunde Akinyanmi
The problem is very clear. Add a related_name argument to those fields in your model. If you are not sure how to do this, search the documentation for "related_name" On 9/10/11, Danny Gale wrote: > Hi, I'm learning Django (albeit slowly) and I'm trying to set up a really > simple database. I want

Re: newbie question on activating the automatic admin

2011-09-10 Thread Babatunde Akinyanmi
r/lib/python2.7/lib-dynload' >>  '/usr/local/lib/python2.7/dist-packages' >>  '/usr/lib/python2.7/dist-packages' >>  '/usr/lib/python2.7/dist-packages/PIL' >>  '/usr/lib/pymodules/python2.7/gtk-2.0' >>  '/usr/lib/pyt

Re: two views in one url

2011-09-11 Thread Babatunde Akinyanmi
Hi cha, Programming in django is just programming in python. Views are just normal python functions that are called from urls.py which contains pattern which is also a function. If you want both views in one file, do exactly that. You could cut and paste the view in the second app and paste it in t

Re: Problem at activating the admin site (Django tutorial part 2)

2011-09-11 Thread Babatunde Akinyanmi
produce the phenomenon and with the 'Pászkán > Attila' as user it worked ! Why? - still it isn't clear. > > PA > > On Aug 26, 12:20 am, Babatunde Akinyanmi wrote: >> Cool. I'm really interested in finding out what went wrong. If you are >> also, try to re

Re: two views in one url

2011-09-11 Thread Babatunde Akinyanmi
hank you very much > Babatunde Akinyanmi & petey > Im merge the code and its work > > Mr Babatunde Akinyanmi > acutely I need be comfortable with programming with python > But I dont Know How to do that > can you help me and give me the best way to be comfortable and

Re: newbie question on activating the automatic admin

2011-09-11 Thread Babatunde Akinyanmi
repost here if I still see problems. > > Nara > > On Sep 10, 7:16 pm, Babatunde Akinyanmi wrote: >> Hi nara, >> Please post the debug output you get when you try to view the admin >> page from your browser. >> >> Meanwhile, while switching versions of django, yo

Re: Using gedit for django development

2011-09-13 Thread Babatunde Akinyanmi
Oops! *i'll submit :D On 9/13/11, Tundebabzy wrote: > I'm submit this on Hacker News > > On Sep 13, 1:35 am, Mario Gudelj wrote: >> This is awesome dude. I was looking for something like this since I moved >> to >> Ubuntu. >> >> On 13 September 2011 10:12, Micah Carrick wrote: >> >> >> >> >> >>

Re: installing django

2011-09-13 Thread Babatunde Akinyanmi
You could at least try to be more specific On 9/13/11, re64 wrote: > I am having trouble installing django. I cant seem to do it any > suggestions > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to

Re: newbie question on activating the automatic admin

2011-09-15 Thread Babatunde Akinyanmi
e what exactly was wrong before, but Babatunde's suggestion > that I had mixed up code installed (some in system files, and also > mixed Django1.3 and the dev release) seems like the best guess. > > Thanks for everyone's help ;) > Nara > > On Sep 11, 10:44 pm, Babatun

Re: request.method not working as expected

2011-09-20 Thread Babatunde Akinyanmi
Correct me if I'm wrong but it seems your "method" function is supposed to return the request method type(POST or GET) sent to the view. If I'm correct then your syntax will always return GET. That's because I think all the django middleware workings adjust the initial arguments and the response su

Re: request.method not working as expected

2011-09-21 Thread Babatunde Akinyanmi
Your post showed the trailing url...anyway I agree with your diagnosis. With my noob knowledge of django, django tries to add a trailing slash to your url when you don't. I believe she does that by adding the trailing slash to the url and then asking the server to redirect to the url which is the r

Re: request.method not working as expected

2011-09-21 Thread Babatunde Akinyanmi
What's in your add_to_cart view function? On 9/21/11, Fabio Natali wrote: > On 09/21/2011 07:57 AM, Andres Reyes wrote: >> I believe that the best practice is to always use the {% url %} template >> tag and not hardcoding your URL's > > That makes perfect sense. Thanks for your precious tip! > >

Re: can't get STATICFILES to work (Django dev version)

2011-09-26 Thread Babatunde Akinyanmi
When you want to access say screen.css, how do you put it in your template?? On 9/26/11, nara wrote: > I am having trouble getting STATICFILES to work. I have read the docs, > and followed the instructions, but I never get my css files to load. > My current workaround is to put all the css inline

Re: How to make Django pick new urls immediately

2011-10-06 Thread Babatunde Akinyanmi
With django, when a url is sent to the server, the work flow is that urls.py is first run to check if an expression that matches the url submitted is available in the pattern function. If available, it runs the view function specified in the pattern. This just means that you don't have to restart y

Re: Ajax replacement in django

2011-10-14 Thread Babatunde Akinyanmi
>From what Iankesh said initially, I think he is having problems using ajax to load part of a page not ajax as a whole. Iankesh, it is possible to load only a portion of a page with ajax. On 10/13/11, Sells, Fred wrote: >> On Wed, Oct 12, 2011 at 9:17 AM, lankesh87 wrote: >> >  I am developing a

Re: Don't understand still

2011-10-15 Thread Babatunde Akinyanmi
Hi Piotr, Models contain code for the ORM and what will be used to create tables for your database. View is where you can process logic and data from your models or database before output to the client. Models are not directly linked to templates and templates get their context from the view. Cont

Re: Don't understand still

2011-10-15 Thread Babatunde Akinyanmi
Hi Piotr, The problem is with your custom managers. You defined PersonPhones manager (and all your other managers) to do nothing and hooked it to objects effectively confusing everything. Ideaally you should have: objects = models.Manager() But in your case its: objects = PersonPhonesManager() By

Re: Don't understand still

2011-10-15 Thread Babatunde Akinyanmi
Yes your context is correct but the problem is with what the context does contain. Managers return querysets but yours does not do anything or return anything. It will be very clear to you if you go to the django in built shell and do PersonPhones.objects.all(). You'll find out that it contains no

Re: Don't understand still

2011-10-15 Thread Babatunde Akinyanmi
Piotr, You need to remove the custom manager from your code since you are not making use of it. You also need to read the custom manager documentation so you can understand managers and how they work On 10/15/11, Thomas Orozco wrote: > Just don't assign anything to objects and leave that line ou

Re: Don't understand still

2011-10-15 Thread Babatunde Akinyanmi
I guess I should apologize myself. To alter how managers return objects the get_query_set method should be overloaded. On 10/15/11, Daniel Roseman wrote: > On Saturday, 15 October 2011 15:12:17 UTC+1, Piotr Hosowicz wrote: >> >> Hello, >> >> I still do not understand how things are connected i

  1   2   3   >