djngo unittest to use "real" database.

2020-09-06 Thread django-newbie
Hi All, I am currently writing test cases for views, Which eventually uses database also. By default a test database is being created and removed after test are run. As the database itself is development database, I don't want my test to create a separate db but use exciting only. Also I will

Re: How models.Manager is working behind the scene and calling different serialize methods?

2020-05-29 Thread django-newbie
et() query on the other hand, returns a single object. > > Saygılarımla, > Sencer HAMARAT > > > > On Fri, May 29, 2020 at 4:43 AM django-newbie > wrote: > >> Hi, >> I am new to django and going through a tutorial and now confused with one >

How models.Manager is working behind the scene and calling different serialize methods?

2020-05-28 Thread django-newbie
Hi, I am new to django and going through a tutorial and now confused with one particular implementation. models.py import json from django.core.serializers import serialize from django.db import models from django.conf import settings # Create your models here. def

Recommend a way to add my own class into DjanGo

2012-10-17 Thread Django Newbie
Hey guys, I want to create a custom class with methods I will be able to access everywhere in my Views. For example a class that add numbers after declaring it somewhere in Django. *MyNumber = new GenNumberClass()* *MyNumber.setNumbers(1,2)* *result = MyNumber.getAddedResult()* Please point

Re: Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-21 Thread Another Django Newbie
On Wednesday, March 21, 2012 10:29:48 AM UTC, Jani Tiainen wrote: > > Like this: > > 'default': { >'ENGINE': '...', >'OPTIONS': { > 'threaded': True >} > } > Thanks again Jani, switching my question to the modwsgi group Regards, ADN > > -- You received this message

Re: Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-21 Thread Another Django Newbie
On Wednesday, March 21, 2012 7:18:16 AM UTC, Jani Tiainen wrote: > > 20.3.2012 16:45, Another Django Newbie kirjoitti: > > > > > > On Tuesday, March 20, 2012 10:28:49 AM UTC, Another Django Newbie wrote: > > > > > > > > On Tuesday,

Re: Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-20 Thread Another Django Newbie
On Tuesday, March 20, 2012 10:28:49 AM UTC, Another Django Newbie wrote: > > > > On Tuesday, March 20, 2012 10:01:36 AM UTC, Tom Evans wrote: >> >> On Mon, Mar 19, 2012 at 5:24 PM, Jani Tiainen wrote: >> > Hi, >> > >> > Since we use

Re: Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-20 Thread Another Django Newbie
On Tuesday, March 20, 2012 10:01:36 AM UTC, Tom Evans wrote: > > On Mon, Mar 19, 2012 at 5:24 PM, Jani Tiainen wrote: > > Hi, > > > > Since we use same setup except one part: we use mod_wsgi instead of > > mod_fcgi. > > > > (Since wsgi is considered to be defacto protocol). Could you try to use

Re: Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-19 Thread Another Django Newbie
On Thursday, March 15, 2012 1:05:53 PM UTC, Another Django Newbie wrote: > > Hi, > > I've just started playing with django this week and was following the > example in the Django Book. > > I created an example of my own, based on the models.py in the book and >

Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-15 Thread Another Django Newbie
Hi, I've just started playing with django this week and was following the example in the Django Book. I created an example of my own, based on the models.py in the book and tested it with manage.py runserver. All worked OK, but when I try it in apache one of my admin pages is truncated - a

What am I doing wrong with this URL Pattern

2012-01-27 Thread Django Newbie
Hi, I am trying to figure out a way to call a function depending on the parameter in the URL. Example. url(r'^People/Info/(?P\d+)/$', 'iFriends.People.views.details'), url(r'^People/Info/(?P[a-z]{3})/$', 'iFriends.People.views.detail_name'), It works with numeric value. if I use

Re: user_id in admin pages

2008-12-10 Thread Django Newbie
Found it thanks. http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-methods James Bennett wrote: > On Wed, Dec 10, 2008 at 6:28 PM, Django Newbie <[EMAIL PROTECTED]> wrote: > >> This is probably an easy one, but I've tried what make sense to me with >

user_id in admin pages

2008-12-10 Thread Django Newbie
This is probably an easy one, but I've tried what make sense to me with not success. What I want to do is in my admin pages, use the User module and enter the the user_id of whoever is logged in to add an entry in one of my foreign key tables. How can set a field equal to the user_id to be

Re: Can javascript call a python script?

2008-12-04 Thread Django Newbie
With AJAX you can. Javascript is interpreted by the browser, and you want to call a serverside script. Or you could do it as a form submission, but I assume you want it to happen without refreshing the page, so AJAX is how you would do that. Eric wrote: > Hello, this might be a silly

Re: rendering DB text in template

2008-11-28 Thread Django Newbie
Thank you. Alex Koshelev wrote: > Look at this: > http://docs.djangoproject.com/en/dev/topics/templates/#id2 > > > On Fri, Nov 28, 2008 at 21:43, Django Newbie <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > So I have some text fields

rendering DB text in template

2008-11-28 Thread Django Newbie
So I have some text fields in the db that have some embedded html in the text. How do I get the template to render the text as html? The text fields are recipe.ingredients and recipe.instructions Recipes .RecipeName{ font-size: large; font-weight: bold; }

Re: Apache Setup

2008-11-26 Thread Django Newbie
Graham Dumpleton wrote: > > On Nov 26, 3:32 pm, Django Newbie <[EMAIL PROTECTED]> wrote: > >> Hi Everybody, >> >> Django newbie here. I'm trying to get it to work under apache with >> mod_python on a freebsd server but running into problems. I sea

Apache Setup

2008-11-25 Thread Django Newbie
Hi Everybody, Django newbie here. I'm trying to get it to work under apache with mod_python on a freebsd server but running into problems. I searched the archives and found similar things, but I tried all the suggestions and still no luck. The error: MOD_PYTHON ERROR ProcessId