Re: Django view to call api

2018-01-28 Thread Akhil Lawrence
Looking at the log you have posted I guess you are not sending any data to the api. Look at the query dicts, the second one is empty. What is the message that you get along with the 400 response? On Monday, 22 January 2018 15:34:39 UTC+5:30, chern...@gmail.com wrote: > > So i'm using django vie

Re: Error

2018-01-28 Thread Akhil Lawrence
The error stack or explanation you have given is very hard to understand the problem. I guess the *name* you mentioned is *MIGRATION_MODULES[app]*. Within your code you are assigning *MIGRATION_MODULES[app] = None* So I would suggest to add a check like *if name and name.startswith('.'):*

Re: num2words - help

2018-01-28 Thread Akhil Lawrence
You need to write a template tag which will make use of the num2words library to convert the cash to words and apply it in your template. Lets say your template tag name is *num2wo

Re: CRUD code feedback

2018-01-28 Thread Akhil Lawrence
n 28, 2018 at 10:59 PM, Akhil Lawrence > wrote: > >> The takeaway from the above error is *AnonymousUser* >> >> >> This means you are not logged into the system. By default >> *self.request.user* will be an instance of *AnonymousUser*, >> >> the mo

Re: CRUD code feedback

2018-01-28 Thread Akhil Lawrence
eturn self.name > > > views.py > > > class CreateDog(CreateView): > template_name = 'dogs_cats/create_dog.html' > model = Dog > fields = ('name', 'bday') > > def form_valid(self, form): > form.instance.owner = self

Re: CRUD code feedback

2018-01-28 Thread Akhil Lawrence
):form.instance.owner = self.request.userreturn super(CreateDog, self).form_valid(form)* On Sunday, 28 January 2018 19:32:35 UTC+5:30, Akhil Lawrence wrote: > > This error message is tricky. > > According to your model definition *owner* is of type *Owner*. This error >

Re: CRUD code feedback

2018-01-28 Thread Akhil Lawrence
gt; On Sun, Jan 28, 2018 at 5:32 PM, tango ward > wrote: > >> Thanks, I'm digesting it. I am going to use the first option. >> >> On Sun, Jan 28, 2018 at 3:20 PM, Akhil Lawrence > > wrote: >> >>> I doubt whether you are reading my response proper

Re: CRUD code feedback

2018-01-27 Thread Akhil Lawrence
er(CreateDog, self).get_initial() > initial_data["owner"] = [(self.request.user.id, > self.request.user.username)] > return initial_data > > > still I am getting the Admin user in the drop down list for owner. > > On Sun, Jan 28, 2018 at 2:31 PM, Akhil La

Re: CRUD code feedback

2018-01-27 Thread Akhil Lawrence
or owner field using Pet_Owner = > get_user_model() .Problem is, it shows all the Users in the project not the > only one who is currently logged in. > > On Sun, Jan 28, 2018 at 2:06 PM, Akhil Lawrence > wrote: > >> Its the reverse. If the owner is deleted, all the

Re: CRUD code feedback

2018-01-27 Thread Akhil Lawrence
, tango ward > wrote: > >> Will try it now. >> >> Quesion about the on_delete=models.CASCADE, does this mean that if I >> delete the pet (dog or cat) it will delete the owner who owns them? >> >> On Sun, Jan 28, 2018 at 1:11 PM, Akhil Lawrence > > w

Re: CRUD code feedback

2018-01-27 Thread Akhil Lawrence
pet (dog or cat) it will delete the owner who owns them? > > On Sun, Jan 28, 2018 at 1:11 PM, Akhil Lawrence > wrote: > >> Your create view do not accept owner as a input and according to your >> models, owner can be null. That's the problem. Include owner to your cre

Re: CRUD code feedback

2018-01-27 Thread Akhil Lawrence
Your create view do not accept owner as a input and according to your models, owner can be null. That's the problem. Include owner to your create view fields as shown below. Also you may consider making owner mandatory as mentioned in my previous response. class CreateDog(CreateView): mode

Re: CRUD code feedback

2018-01-27 Thread Akhil Lawrence
Hi Jarvis, The code which you have posted only shows the model. Within your cat and dog models the owner can be null. Which explains why the owner is not associated with the pets. Can I see the code you tried to insert the records? ## changes needed in models models.ForeignKey(Owner, related_n

Re: Django can't find database

2016-10-22 Thread Jamie Lawrence
> On Oct 22, 2016, at 11:35 AM, Gary Roach wrote: > When I try to migrate, I get the following error: > >> psycopg2.OperationalError: FATAL: database "archivedb" does not exist > What's happening here? Are you certain the ‘archivedb’ database actually exists? If it does, is in in an acce

Re: Real time change color website

2016-06-30 Thread Akhil Lawrence
generate the image. > This is a Javascript cambas problem not django. > > > 2016-06-30 5:59 GMT-03:00 Akhil Lawrence : > >> Hi, >> >> Your requirement has nothing to do with django. The images should be >> combined using JS/CSS. Its a pure front end tweak. >>

Re: pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

2016-06-30 Thread Akhil Lawrence
To answer *how do I change from function based views to class based views,* The simplest way to do that is, create a view file as below: from django.views.generic import View class ViewName(View): def get(self, request, *args, **kwargs): def post(self, request, *args, **k

Re: Real time change color website

2016-06-30 Thread Akhil Lawrence
Hi, Your requirement has nothing to do with django. The images should be combined using JS/CSS. Its a pure front end tweak. If your question is regarding the backend. Definitely django can do the job. What I mean is, you can build API's using django which will server layers of images requeste

Re: Django inside Docker

2016-06-04 Thread Akhil Lawrence
No where in the dockerfile you are copying your project files or mounting external file system.. Are you doing those at runtime with the help of docker compose or fig? If yes paste those code snippets also.. On Saturday, 4 June 2016 02:44:55 UTC+5:30, Davi Diório Mendes wrote: > > Hi everyon

Re: passing url variables to views

2016-05-31 Thread Akhil Lawrence
Yeah In your view you can access it by kwargs.get('user_del') On Wed, 1 Jun 2016 at 02:33 dk wrote: > and then i can use it in the view? as an argument? > > > On Tuesday, May 31, 2016 at 12:33:55 PM UTC-5, Akhil Lawrence wrote: >> >> Hi, >> >>

Re: how to append all-auth in my django project

2016-05-31 Thread Akhil Lawrence
This might help http://piratelearner.com/en/C/course/computer-science/django/django-all-auth-all-you-need-to-know/8/ On Sunday, 29 May 2016 22:15:56 UTC+5:30, pratyush singh wrote: > > i started a project and now i dont understand how to add all-auth to my > project i am having problem to un

Re: Adding view permission by default to auth_permission

2016-05-31 Thread Akhil Lawrence
Ander, Please add your suggestion as a ticket in django ticketing system. https://code.djangoproject.com/newticket On Monday, 30 May 2016 23:43:18 UTC+5:30, Ander Ustarroz wrote: > > I am surprised this feature is not implemented yet, at the moment when we > create a new model three permissi

Re: Django: Begginer Problems

2016-05-31 Thread Akhil Lawrence
As Ryan mentioned. Go through the forms tutorial. Formsets may also help. Have a look. https://docs.djangoproject.com/en/1.9/topics/forms/formsets/ On Monday, 30 May 2016 04:54:16 UTC+5:30, David Zárate wrote: > > Hi! I'm making a financial analysis app in Django and to have some data to >

Re: Django websites for study and improvement

2016-05-31 Thread Akhil Lawrence
You can get many django based applications from github. https://github.com/taigaio/taiga-back https://github.com/mayan-edms/mayan-edms/ https://github.com/stephenmcd/cartridge You can also refer https://github.com/rosarior/awesome-django https://github.com/search?q=django Even though you are

Re: passing url variables to views

2016-05-31 Thread Akhil Lawrence
Hi, The URL you are calling is wrong.. You should call it like http://127.0.0.1:8000/my_app/run_delete/ccc_ccc***a_b***/ No need to pass it as an query parameter. On Tuesday, 31 May 2016 15:03:59 UTC+5:30, dk wrote: > >

Re: UpdateView - problem with change model

2016-05-28 Thread Akhil Lawrence
Check the primary key you are passing in the URL while calling the view. Key of PersonalInfo need not to be the same as that of MySiteUser On Saturday, 28 May 2016 23:44:00 UTC+5:30, Dariusz Mysior wrote: > > I have that problem when I change model in view class EditView on > PersonalInfo I ha

Re: How to send e-mail asynchronously

2016-05-28 Thread Akhil Lawrence
You can create a celery task fro this. See this link for more details. http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html On Saturday, 28 May 2016 19:51:49 UTC+5:30, 2me wrote: > > I have to implement a thread in order to test if (temperature>maximmum) it > sends an em

Re: Model inheritance with constraints

2016-05-28 Thread Akhil Lawrence
Its already addressed. You can simply run ./manage.py makemigrations and ./manage.py migrate it will create migrations only for MyAnotherFunModel On Thursday, 26 May 2016 01:02:08 UTC+5:30, Arnab Banerji wrote: > > Hi all, > > I currently have a set of models associated with my Django app, w

Re: I am not able to run the following code

2016-05-28 Thread Akhil Lawrence
Hi Madhusudhana, When you try to create the instance of Template, its looking for settings that is why you are getting error. *You cannot play in python shell without creating django project* Create the project and use django shell. The following code snippets may help you in creating project

Re: why blank page when load a list or dictionary into web to display a list

2016-05-28 Thread Akhil Lawrence
Dude, You need to make the following changes. 1. you need to pass a dictionary as the context in your views return render(request, 'approval.html', {'posts': posts}) 2. the prefer the posts to be list of dict change posts = {} ... LL = [(1,eac

Re: EDMS (Electronic Document Management System )

2016-05-28 Thread Akhil Lawrence
If you are going to work with documents try mongodb On Saturday, 28 May 2016 01:44:57 UTC+5:30, Jorge Maciel wrote: > > Hi, I'm developing a EDMS (Electronic Document Management System ) for > small business. I am in doubt about the infrastructure should I use to > create this system . I think h

Re: How to implement a ManyToManyField with a View

2016-05-28 Thread Akhil Lawrence
Hi Bruce, You need to call `contact.relationship.all` instead of `contact.relationship_set.all` We use `_set.all` when we want to retrieve the related items from the master/parent object (Relationship in your case). So if you want to retrieve all contacts under a relationship you can use `.re

Re: Entering initial data into django database

2016-03-20 Thread Lawrence Muriuki
unction to > transform the list into a fixture file and import the fixture file. > > 2016-03-20 20:02 GMT+01:00 Lawrence Muriuki >: > > > > Thanks ludovic, here is my code for the scraper.. > > > > > > > > > > > > from .models i

Re: Entering initial data into django database

2016-03-20 Thread Lawrence Muriuki
Thanks ludovic, here is my code for the scraper.. from .models import Betting import re import requests import urllib from bs4 import BeautifulSoup urls= "https://sms.betyetu.co.ke/tomorrow.html"; htmlfile = urllib.urlopen(urls) htmltext = htmlfile.read() soup = BeautifulSoup(htmltext, "h

Entering initial data into django database

2016-03-20 Thread Lawrence Muriuki
Hi All, I have built a web scraper to scrape a website and get all match fixtures for a particular day. Wanted to know how to insert that initial data into django database and where that code should live..I have currently put the code in init.py but it looks and sounds wrong according to a quic

Re: Turn off migrations completely in Django 1.7

2015-04-27 Thread Jamie Lawrence
On Apr 27, 2015, at 7:01 PM, Mike Dewhirst wrote: > >> On 27/04/2015 9:54 AM, marcin.j.no...@gmail.com wrote: >> So what about that? I'm also interested in disabling migrations. > > Would it suffice to have all your models specify "managed = False" in the > Meta class? > > https://docs.djangop

Re: Thinking about EAV database model for flexibility. How (in)compatible is it with the django model?

2014-12-22 Thread Jamie Lawrence
vance! > > >> On Tuesday, December 16, 2014 11:24:12 AM UTC+1, Felipe Faraggi wrote: >> Thanks for your responses Jamie and Erik, >> >> We've since reconsidered and will in fact, be creating a standard relational >> structure. >> >> Again, than

Re: Thinking about EAV database model for flexibility. How (in)compatible is it with the django model?

2014-12-15 Thread Jamie Lawrence
Just to add to Erik's very good advice on (not) using EAV, another thing to keep in mind is that the downsides of EAV tend to manifest after your app is hosting a substantial amount of data, at which point the exercise of sanitizing it in order to port it to a saner model can be *excruciating*.

Re: linux or windows

2013-05-31 Thread Jamie Lawrence
I don't count this as 'voluntary', except in the sense that I wasn't forced at the point of a gun, but I can say that it is possible to back a Django site with SQL Server. I do not recommend it, and the details vary based on which particular stack you are running. My recommendations are: don't

Re: How can I find and clean an user's session from an user's id?

2013-01-21 Thread Jamie Lawrence
It is ok. Really. In llvikgiimn. In. Go g -j I hurry. -- Sent from a phone, please excuse typos and terseness. On Jan 21, 2013, at 4:10 PM, Nikolas Stevenson-Molnar wrote: > I took a quick peek at the sessions implementation and it doesn't look > like this is possible just using the sessio

Re: index_together...shouldn't indexes be created AFTER populating the table?

2012-11-14 Thread Jamie Lawrence
Keep in mind that whatever RDBMS you are using is completely separate from your application. You can alter it out from under the app in any way you see fit. The code offers some convenience methods for generating things, but that doesn't tie the two together more than an expectation on the appli

Re: Setting an unusable password on an existing user

2012-09-22 Thread Jamie Lawrence
This isn't that rare - it is a common UX requirement. Set the value to something that cannot hash to any input. Depending on your setup, '0' could work, or any other nonsense value. If you have a strict DB schema, IIRC, there are some magic values that SHA will never generate, but I'd have to

Re: Problems with {% url %} in templates

2012-03-29 Thread Jamie Lawrence
On Mar 29, 2012, at 12:59 PM, Alasdair Nicol wrote: > Hi Jamie, > Don't include the (.*)$ in the regex for the include. The documented pattern > [1] for the include is > >(r'^d/events/', include('myproject.events.urls')), Ah, thank you, that was it. (I do need sleep - don't know how long

Problems with {% url %} in templates

2012-03-29 Thread Jamie Lawrence
I'm very confused… this has worked fine in the past. Django 1.3.1 In myproject/urls.py: urlpatterns = patterns('', (r'^d/events/(.*)$', include('myproject.events.urls')), […] in myproject/events/urls.py : urlpatterns = patterns('myproject.events.views', url(r'^add/$', 'add_view', nam

Re: Automated Processes

2012-03-02 Thread Jamie Lawrence
On Mar 2, 2012, at 12:10 PM, Scott Macri wrote: > I'm trying to figure out the best way to create an automated in a > python/django web application. My intention is to send an email > message in the future based on the given future date/time. What is > the best approach to do this? > > I was t

Using auth.login() with multiple databases

2011-04-21 Thread Lawrence
nterface but just need a way to force the login() method to use a difference database. 4. Add a custom login() method to my custom authentication backend? This sounds like an option I could undertake but I'm unsure of the syntax to select the appropriate database and perform all of the requ

Custom annotation: numbering rows?

2009-06-03 Thread Richard Lawrence
Hello all, I know people have asked about custom aggregates/annotations before, but I haven't quite been able to figure out how to translate those discussions into what I need (or even if a custom aggregate is the way to go). Any advice would be much appreciated. What I would like to do is seq

Re: I love both Django and the Google Web Toolkit. Who else thinks tighter integration would be nice?

2008-12-16 Thread Ian Lawrence
Hi look at http://autotest.kernel.org/ this is a djand and gwt application used for kernel testing. It basically sets up an RPC django server which passes json into gwt. It is a great app to learn how this all works Ian -- http://ianlawrence.info --~--~-~--~~~---~--~

Re: File upload progress bar for Django?

2008-10-22 Thread Ian Lawrence
Hi very cool..thx for putting this together. You have saved me some time! Ian -- http://ianlawrence.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: newforms and commit=False

2008-07-17 Thread Ian Lawrence
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > Take a look at how Form Preview works. You should be able to adapt > that to your above workflow: > http://www.djangoproject.com/documentation/form_preview/ Thanks , that looks exactly like what I need! I do not think however it is possible to

newforms and commit=False

2008-07-17 Thread Ian Lawrence
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I wondered if someone has an about this?. I take an uploaded zip/tarball and bind it to a model form. I then extract it to a temporary folder and use this as a resources folder when I compile a flash movie. If the contents of the flash movie are o

wsgi and os.environ

2008-07-15 Thread Ian Lawrence
Hi, I am experimenting with wsgi. I saw that this can be one way to enable it: os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' this seems a little strange to me setting something global to your process. Is this best practice on the mod_wsgi world? thx Ian -- http://ianlawrence.info

Re: Mobile version of a site

2008-06-27 Thread Ian Lawrence
Hi, > Is there a recommended way to go about this? Do I have to recreate all > my views? Mobile sites are usually just alternate templates on the same views. So, the question is how to work out what it is that wants to 'view' your 'views'?. For this look at http://code.google.com/p/minidetector/

Re: Development environment

2008-06-26 Thread Ian Lawrence
Hi, >> I'm currently learning django on Ubuntu, but my background is Windows, >> so I'm not a VIM kind of guy. What kind of IDE do you guys use or >> recommend? I use eric4 IDE on ubuntu with the Project Django plugin enabled (sudo apt-get install eric4) Ian -- http://ianlawrence.info --~--~--

Re: code runs in django shell but not apache

2008-05-19 Thread Ian Lawrence
Hi, > You did not say what the view code does do. Does it raise an exception > whose trace you can share? Thx for answering No, this was the most confusing thing and what made me think it was an apache permission problem. I fired up the dev server and the code ran so i then hunted around the web

code runs in django shell but not apache

2008-05-19 Thread Ian Lawrence
Hi, I have been bashing my head trying to work this out. This code creates the new theme fine: [EMAIL PROTECTED]:~/Web/django_projects/webtheme$ export DJANGO_SETTINGS_MODULE DJANGO_SETTINGS_MODULE=webtheme.settings [EMAIL PROTECTED]:~/Web/django_projects/webtheme$ django-admin.py shell Python 2.5

Re: Overwriting RSS item links

2008-04-11 Thread Ian Lawrence
On Fri, Apr 11, 2008 at 7:40 AM, Ian Lawrence <[EMAIL PROTECTED]> wrote: > Hi > > > Is there any way I can change this behaviour as I need to overwrite the URL > > completely to something like > you could do something like in settings.py: > ROOT_URL = whogotmassiv

Re: Overwriting RSS item links

2008-04-11 Thread Ian Lawrence
Hi > Is there any way I can change this behaviour as I need to overwrite the URL > completely to something like you could do something like in settings.py: ROOT_URL = whogotmassive.com and in your feed.py: link = "%s/balls" % settings.ROOT_URL the challenging thing for me now is trying to use th

Re: How to do background processing with Django

2008-03-26 Thread Ian Lawrence
Hi > are django and apache. Adding a HTTP server or configuring django- > queuing is too painful for the average user. :( what does the end user have to do with this? you have a server by doing wget http://svn.cherrypy.org/trunk/cherrypy/wsgiserver/__init__.py -O wsgiserver.py and setting up xm

Re: About to give up!!!

2008-02-09 Thread Ian Lawrence
Ola what are the permissions on the image file? regards ian -- always code as if the person who ends up maintaining it will be a violent psychopath who knows where you live. http://ianlawrence.info --~--~-~--~~~---~--~~ You received this message because you are s

Re: _real_get_response: global name '_' is not defined

2007-12-04 Thread Ian Lawrence
ah just read the complete thread with the solution...sorry for the line noise regards Ian On Dec 4, 2007 9:42 AM, vern <[EMAIL PROTECTED]> wrote: > > Hi > i am being bitten by this too...i think it has something to do with > python 2.5 not supporting an underscore at the start of a variable > nam

Re: Setting up your django project outside the document root

2007-11-21 Thread Ian Lawrence
ll serve the > python project (/home/python-project) > > Sorry, I'm still a bit confused... Trying to un-learn my PHP'ness > > Thanks for the help! > > On Oct 27, 2:33 pm, "Ian Lawrence" <[EMAIL PROTECTED]> wrote: > > Ola > > basically you sym

Re: Setting up your django project outside the document root

2007-10-27 Thread Ian Lawrence
Ola basically you sym link it... I recently did exactly this and wrote up the procedure here: http://ianlawrence.info/random-stuff/set-up-django-apache-and-postgresql-on-ubuntu-feisty hope this helps Ian On 10/27/07, Adam D. <[EMAIL PROTECTED]> wrote: > > I am a newbie. > > Everywhere I read abo

Re: forum to mailing list integration

2007-10-03 Thread Ian Lawrence
Ola I should think this functionality would be a valuable addition to Django so thx for your pointers. abracos Ian On 10/2/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-10-02 at 13:22 -0400, Ian Lawrence wrote: > > Hi > > I have a requirement for al

forum to mailing list integration

2007-10-02 Thread Ian Lawrence
Hi I have a requirement for all forum posts to go to a mailing list (this i have implemented) but also that all subsequent posts on the mailing list to the thread appear on the forum too. Has anyone ever implemented anything like this before? I would prefer a mailman solution but that is not cruc

Re: uploading to a separate directory

2007-09-18 Thread Ian Lawrence
being able to supply a field name, and it also > has the limitation of being old-form specific. > > Hopefully someone else will be able to explain things better than I > have. > > -Doug > > On Sep 17, 1:17 pm, "Ian Lawrence" <[EMAIL PROTECTED]> wrote

uploading to a separate directory

2007-09-17 Thread Ian Lawrence
Hi, I would like each uploaded test to go into a separate directory in my media_root. In models.py I have: class TestDetail(models.Model): test_grouping = models.ForeignKey(TestGrouping) test_name = models.CharField(maxlength=200) python_file = models.FileField("Python File", upload_t

single sign on for integrated django,trac and phpBB site

2007-08-27 Thread Ian Lawrence
Hi, I found this: http://automatthias.wordpress.com/2006/12/18/killing-phpbb-softly/ excellent post about phpBB and Django integration. I was wondering if anyone has integrated single sign on with trac?..it seems trac uses .htaccess and not a database table so maybe it is not possible? Thanks Ian

Re: django hosting companies

2007-08-14 Thread Ian Lawrence
ola i have said before on this list but these http://www.webfaction.com/ guys are awesome...i have nothing to do with them i just respect their service and support []'s Ian On 8/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I was looking at the django friendly hosting page off the djang

Re: caching between successive calls to model.objects.all()?

2007-07-03 Thread Lawrence Wang
On 7/3/07, Benjamin Slavin <[EMAIL PROTECTED]> wrote: > > > On 7/2/07, Lawrence Wang <[EMAIL PROTECTED]> wrote: > > tell me more about transaction management -- i don't believe i'm using > any, > > because there's nothing in my settings.py that w

Re: caching between successive calls to model.objects.all()?

2007-07-02 Thread Lawrence Wang
On 7/2/07, Benjamin Slavin <[EMAIL PROTECTED]> wrote: > > > Hello. > > You mention you are using the multi-db branch. Do you get this > behavior in trunk? i haven't tried this yet because i require multi-db functionality, so it does me no good if it works in trunk :) but i understand the value o

Re: Music E-zine development in Django

2007-06-06 Thread Ian Lawrence
Hi, Can you post me the svn link too to play around with..i am involved with a Brazilian Free Studio Project called Estudiolivre (http://estudiolivre.org) and it would be great to co-operate. Regards Ian On 6/6/07, temnoregg <[EMAIL PROTECTED]> wrote: > > thanks for response, > > any closer date

Re: \d and \w regular expressions?

2007-05-09 Thread Ian Lawrence
Ola, http://www.amk.ca/python/howto/regex/ is a pretty gentle intro []'s Ian On 5/9/07, gsmith <[EMAIL PROTECTED]> wrote: > > Is there any documentation of what these do? I'm assuming that this > is a Python regular expression? > > The reason I ask is becuase I have a line in my urls.py file tha

Re: Need dedicated hosting for Django

2007-04-17 Thread Ian Lawrence
Hi, I use webfaction: www.webfaction.com and their level of service and technical ability is the best I have found. Their web panel makes hosting for 'web developers' very simple. Highly recommended. []'s Ian On 4/17/07, Nik Kantar <[EMAIL PROTECTED]> wrote: > > Hey guys, > > My company might be

Antonio Cangiano asks for input to develop a DB2 backend for Django (and Python)

2007-03-16 Thread Lawrence Oluyede
Antonio Cangiano is the author of the IBM DB2 tools for Rails and his team and him are going to do the same for Django and Python. Right now he's asking for help to collect ideas to do a proper job. I think it's great having this kind of support for Python and Django. Here's the blog post: http

Re: Testing and error handling

2007-03-08 Thread Lawrence Oluyede
> Can you provide a few more clues, please? In particular, what exception > is being raised. If we know what part of the code is involved, it will > be easier to try and work out the differences. > If you can reduce the behaviour to a simple (only a few lines) example, > that would be great, too.

Testing and error handling

2007-03-07 Thread Lawrence Oluyede
I'm having some problems with the same codebase tested with Python 2.5 and previous versions. With Python 2.5 the tests pass smoothly but with 2.4 and 2.3 they "explode". The problem seems to arise when the application raises an exception due to bad behavior. Python 2.5 gets back a HTTP 500 (that

Re: user.get_profile()

2007-02-28 Thread Lawrence Oluyede
On 2/28/07, MattW <[EMAIL PROTECTED]> wrote: > > Dear All, > > I have a view method that looks like this: I think you need the SVN version of Django, as they suggested to you in the other thread about user authentication -- Lawrence, oluyede.org - neropercaso.it "It is

Re: how can i find a full source code for complete django

2007-02-28 Thread Lawrence Oluyede
-sites-both-source-available/ Maybe you'll find something useful in those apps -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair --~--~-~--~~~-

Re: permalink decorator is not working (at least for me)

2007-02-26 Thread Lawrence Oluyede
in [str(self.id)] or (str(self.id),) and I > suspect it will work. It works, thank you! -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair --~--~-~--~~-

permalink decorator is not working (at least for me)

2007-02-25 Thread Lawrence Oluyede
;path.of.the.correct.view', str(self.id)) get_absolute_url = permalink(get_absolute_url) And what I get from the latter is "/foo/1" instead of "/foo/13" I tried the same with another model and I always get the first character of the latest part of the path (

Re: session variable

2007-02-23 Thread Lawrence Oluyede
On 2/23/07, Seth Buntin <[EMAIL PROTECTED]> wrote: > Can I have a list as a session variable? The session object is a dictionary-look-alike. It's available through request.session. See <http://www.djangoproject.com/documentation/sessions/> -- Lawrence, oluyede.org - n

Re: Database changes

2007-02-19 Thread Lawrence Oluyede
gt; Poll with a python fct. and DROP TABLE Poll1. Can't you simply use "ALTER TABLE ADD COLUMN" on the db? Back it up first, obviously. -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not

Re: login_required decorator

2007-02-19 Thread Lawrence Oluyede
In the meantime you can do this in your code: from django.contrib.auth.decorators import user_passes_test login_required = user_passes_test(lambda u: u.is_authenticated(), login_url='/redirect/url/') <http://groups.google.it/group/django-users/msg/0f9b82713c563833> -- Lawr

Re: new forms - problem populating with data from a table

2007-02-11 Thread Lawrence Oluyede
atter of personal preference. I agree when you have to deal with clarity of your code but it's an handy feature and locals() is just a dictionary and it's quite safe in that situation. -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand somethin

Re: new forms - problem populating with data from a table

2007-02-10 Thread Lawrence Oluyede
first_name = request.user.first_name last_name = request.user.last_name # go on with the other fields # if you have a profile associated user_profile = request.user.get_profile() whatever = user_profile.whatever del user_profile return locals() HTH -- Lawrence, oluy

Re: Problems with low level caching and locmem backend

2007-02-09 Thread Lawrence Oluyede
ign Ok thanks for the clarification -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair --~--~-~--~~~---~--~~ You received this message because

Problems with low level caching and locmem backend

2007-02-09 Thread Lawrence Oluyede
lso to the developer list because I'm not sure it's a Django problem. I'm using Python 2.5 and Django SVN in development mode, by the way. -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depe

Re: passing arguments to the login_required decorator

2007-02-07 Thread Lawrence Oluyede
ant. What's the need to pass the user to authenticate? It uses request.user to check. -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair --~--~-~--~~---

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-05 Thread Lawrence Oluyede
lookups-with-q-objects> and <http://www.djangoproject.com/documentation/models/or_lookups/> -- Lawrence, oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair --~--~-~--~~~--

Debugging test client

2007-02-05 Thread Lawrence Oluyede
I'm having some problems with the django.test.client infastructure. To fix them I tried to print the response of a Client().get() call but I noticed that in presence of the status code 500 the response.content is filled with the production page, not the one Django generates during the development

Re: Error Template

2007-01-05 Thread Lawrence Oluyede
Sorry I forgot to specify a thing. The thing is to play with django on the console you need an actual application to poke with. In order to Django to know how to deal with that you have to tell it where resides the settings.py of your app so you can play with its model and so on. "python manage.

Re: Error Template

2007-01-05 Thread Lawrence Oluyede
d iti.settings AFAIK that's because you are in the "iti" directory which means you already are in the "iti" package/module. Try using "." as the value of the environment variable -- Lawrence http://www.oluyede.org/blog http://www.neropercaso.it --~--~