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 l
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
>
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 upload_update_image(insta
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 m
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 b
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,
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 sam
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
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
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 number
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 "http://localho
"models" is a module that contains classes Model and CharField.
Person inherits from Model.
first_name and last_name are instances of CharField.
There's no functional programming here.
-WN.
On Sun, Oct 16, 2011 at 6:43 PM, youpsla wrote:
> 1 from django.db import models
> 2
> 3 class Person(
Found the problem missed to specify the admin entry in INSTALLED_APPS
variable in the settings.py file
Thanks for the help.
On Mar 9, 8:01 pm, Shawn Milochik wrote:
> Something is broken in your code. If you set DEBUG = True, you'll find
> out what. But since it's False, it is hiding that info
Set the Debug=True and got the error as
TemplateDoesNotExist at /admin/
What is the reason?
On Mar 9, 8:01 pm, Shawn Milochik wrote:
> Something is broken in your code. If you set DEBUG = True, you'll find
> out what. But since it's False, it is hiding that information for
> security reasons.
Dear all,
Installed the Django framework in my local machine.
Am able to create a models and inserted values into database.
When I was trying to show the admin page it showed the following
error.
Traceback (most recent call last):
File "/home/thangappan/Non-Technical/Pyt
gured the DATABASE_ENGINE name as postgresql in
settings.py
Please help me.
On Feb 12, 10:06 am, Christophe Pettus wrote:
> On Feb 11, 2010, at 8:38 PM, Newbie wrote:
>
> > NOTE : Django version is 1.1.1 and PostgreSQL version is 7.4.16
>
> Is there is a reason
Dear all,
Downloaded and followed the steps which is given in the
documentation of Django
Created the project called mysite
Created the model called polls
Ratified the settings.py of the project to create a model as
a table in the database using INSTALLED_ A
Hi,
In my view, I connected to the mysql server using the cursor object.
I tried to execute the following query:
select pincode from pincode where state='Andhra Pradesh' and
district='Nellore' and area LIKE '%road%' or '%item%';
The above query is perfectly working when i give it on the mysq
gt; but as a guide it's very good.
>
> Regards,
> Radovan
>
>
>
> newbie-15 wrote:
>
> > Hi,
>
> > I have created a form which contains a ChoiceField. But in the
> > class of the form, I havent given
>
> > any choices to the ChoiceField. I
Hi,
I have created a form which contains a ChoiceField. But in the
class of the form, I havent given
any choices to the ChoiceField. I'm creating the choices dynamically
using ajax and adding it on
the client side using javascript. I'm also using is_valid function to
check whether the inp
that created the problem. Thanks for the reply.
On Jun 10, 4:47 pm, Daniel Roseman
wrote:
> On Jun 10, 10:50 am, newbie wrote:
>
>
>
> > Hi,
>
> > I have written a small javascript ajax code in my django
> > application. Its working fine in the develo
Hi,
I deployed my django project in apache. But its working, If i
keep it in /var/www/html. Its not working if I keep my project in the
Home directory. Its giving the error permission denied. ny idea??
Hanuma.
--~--~-~--~~~---~--~~
You received this mes
Hi,
I have written a small javascript ajax code in my django
application. Its working fine in the development environment. But when
i use the same code in the same django application running on apache
and also on a different url(if it matters), it is not working. I have
tried using Fire
all static files should be served). So when i try {{ imagepath }}
where imagepath = "/barcodeimages/image.png" its not working
On May 17, 4:11 am, Daniel Roseman
wrote:
> On May 16, 9:19 pm, newbie wrote:
>
> > Hi,
>
> > Thanks for your immediate reply
seman
wrote:
> On May 16, 9:19 pm, newbie wrote:
>
> > Hi,
>
> > Thanks for your immediate reply. I've seen the document and
> > followed the steps in it already. But was not able achieve any
> > progress. In
>
> > (r'^site_media/(?P.*)$
ument_root': settings.MEDIA_ROOT}),
(r'^identity/franchisebook/print.html/(?P.*)$',
'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
So what do i have to specify in the place of site_media? I have tried
all the possible replacemetns. But i was
Hi,
I want to display an image from static files directory in a
template. The name of the image is stored in a variable(say image).
When i try to display it in the template using img tag( src =
{{ image }} ), its not displayed. Can someone help me in this regard.
Thanks,
nazgi.
--~--~--
yup. You are right. Thank you very much for the reply :)
On May 15, 6:06 pm, Daniel Roseman
wrote:
> On 2009/5/15, newbie wrote:
>
> > hi,
>
> > Thanks for the reply.
>
> > So suppose i call the ajax function like this.
>
> >
Hi,
i'm new to both ajax and django. Can some1 explain me how to
write a view function for an ajax functionality in a template. For
example, I've registered a ajax event in a template and wanted to send
some information to a function in a view which inturn sends its
response. How do i d
> > > > beause so far, ive only used tinyMCE pluggable and havent created any
> > > > of my own.
>
> > > > Basically i do not think django is an issue here. Just create html
> > > > file with form and then create jquery some jquery events. Adding
>
used tinyMCE pluggable and havent created any
> > > > of my own.
>
> > > > Basically i do not think django is an issue here. Just create html
> > > > file with form and then create jquery some jquery events. Adding
> > > > django into the mix changes n
hi,
I'm new to django and dont know much of javascript either. I
would like to start working on them. Could someone help me write a
simple form which can provide any functionality using ajax, preferably
using jquery libraries. It would be great if any event other than the
submit event
lps,
> Bastien
>
> On May 11, 8:18 am, jai wrote:
>
> > You can use Dojo or jquerry.
>
> > On May 11, 10:44 am, newbie wrote:
>
> > > Hi,
>
> > > I'm new to django and also ajax. I want to create a form
> > > which has a
ase their and retrieve the list of states.
I want to do something like you said, use the javascript onclick event
and
send the selection made by the user and based on the selection connect
to
the database and retrieve the states. But i dont know how to use
javascript in a
python view. Please help me t
Hi,
I'm a newbie to Django. I have a form which has some
attributes to be filled by the user viz., name, age, address etc. I
want to get the address of the user by just allowing him making the
selections rather than letting him fill it. I'm planning to give him a
sele
Hi,
I'm new to django and also ajax. I want to create a form
which has a select box and based on the selection made, the options of
another select box are generated. I've achieved this task in web2py
but i'm porting my application into django and cudnt find a good start
using ajax in d
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 wit
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 en
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 questio
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
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;
}
.Reci
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.
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
Proc
Yes, it is in the head. These are external scripts. Also, on the server
console I see no errors. I get a HTTP 200 when the form is posted
[02/Jan/2007 18:18:15] "POST /ajax/ HTTP/1.1" 200 2824
Kenneth Gonsalves wrote:
On 03-Jan-07, at 4:17 AM, newbie wrote:
> When I c
I am new to Django and am still playing with some code available on the
internet. I was trying to run the YUI-ext and Django application on
B-List.
When I click the form submit button, the ajax callback does not kick
in. I simply get a refresh if the page...On the server console I see
that the r
45 matches
Mail list logo