I wrote a django 'app', thats basically just a class that takes a
Queryset, some other information, and then outputs an HttpResponse
object (it does some other things too). How do I write unit tests for
this class? The app itself does not contain any models, yet the
functionality of the class depen
On 8/21/2010 10:32 PM, John Yeukhon Wong wrote:
> Hi, sorry for the problem.
>
> Well, this is used in registration. As stated in the title, this is
> used to prevent "duplication".
> Let say an existing user in db, whose username is abc, and email is
> 1...@acb.com
> After testing, I can still re
Hi, sorry for the problem.
Well, this is used in registration. As stated in the title, this is
used to prevent "duplication".
Let say an existing user in db, whose username is abc, and email is
1...@acb.com
After testing, I can still register an account with the existing email
address, which means
On 8/21/2010 8:35 PM, Kevin wrote:
> I have attempted to troubleshoot this myself with no luck and am very
> confused why a simple IF statement is not working. I have used if
> statements in python before and never had such a problem. I am rather
> glad to see that PRINT outputs to the console, t
On 8/21/2010 7:23 PM, John Yeukhon Wong wrote:
> I don't think this code is working properly
>
That isn't a very helpful description. For better answers, please
describe what it is doing that it should not (or what it is not doing
that it should).
> from django import forms
> from django.contrib.
I've had the same problem on my Mac just now.
It seems like this is an issue with django-timezones
Try to install dev version from here:
pip install -e
git://github.com/brosner/django-timezones.git#egg=django-timezones
Andrew
On Aug 9, 1:40 pm, Daniel França wrote:
> Thanx for all the help,
>
did you tried int() ?
just an idea ...
On Sat, Aug 21, 2010 at 9:35 PM, Kevin wrote:
> I have attempted to troubleshoot this myself with no luck and am very
> confused why a simple IF statement is not working. I have used if
> statements in python before and never had such a problem. I am rathe
I have attempted to troubleshoot this myself with no luck and am very
confused why a simple IF statement is not working. I have used if
statements in python before and never had such a problem. I am rather
glad to see that PRINT outputs to the console, this helps a bit for
troubleshooting. Varia
Hello Gondor,
If you mean 'admin model' is http://localhost:8000/admin/ (Django
Admin page)
your problem solution is mentioned in this docs:
http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#modeladmin-methods
Widoyo
On Aug 21, 2:57 pm, gondor wrote:
> class Notes(models.Model):
> name
I don't think this code is working properly
from django import forms
from django.contrib.auth.models import User
def clean_email(self):
email = self.cleaned_data['email']
try:
User.objects.get(email=email)
except User.DoesNotExist:
return email
raise forms.Validati
Just add quote into your model that you do not defined yet.
On Aug 22, 12:26 am, Andy Howell wrote:
>
> class Computer(models.Model):
> name = models.CharField(max_length=80)
> description = models.CharField(max_length=80, null=True)
> interfaces = models.ManyToManyField(ComputerInte
On Aug 22, 12:07 am, Jim wrote:
> Hello,
>
> I have Django running under apache2 (the worker version, I believe,
> with MaxRequestsPerChild set to the default, which is 0). I am using
> mod_wsgi in daemon mode. I have checked that it is daemon mode using
> the method described on mod_wsgi's Re
Here is what i'm trying to do: I've looked at my code and I don't
have a foreign key out reference from my model thus cannot find the
inline fields. reverse reference doens't seem to work either
class CarRadio(modesl.Model):
name = models.ForeignKey('Car');
id = models.CharField(max_length=
thanks for your comments guys, I guess I'm more or less on the right
track!
All the best,
Uwe
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, s
There are 2 approaches:
- Think data structures instead, and put all this logic on your view,
such that the template just needs to iterate thru one variable to
build the menu. Something like passing in the template context:
menu = [{'name': 'django', 'text': 'Official Django Site', 'url':
'http:/
On 8/21/2010 1:39 PM, widoyo wrote:
> It could be better if you omit '_ALL' at URL
>
> So:
> /ranking/de/ # for Germany ranking Nation wide
> /ranking/ # for all country
>
> can put summary of ranking for such URL, instead of list of all
> ranking nation or all country.
>
The point being, you c
On Fri, 2010-08-20 at 14:00 -0700, Kevin wrote:
> I come from the world of mod_python and really enjoyed the PSP
> template system, where I can embed Python code directly in my template
> for dynamically generating menus and such.
>
> What is the recommended method of calling a PSP template from i
refer to this docs:
http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#modeladmin-methods
Use
def save_model(self, ...):
mymodel.password = # put your md5 encrypted here ...
mymodel.save()
Widoyo
On Aug 21, 11:05 pm, Amitanshu wrote:
> Actually I missed something in my post, writ
On Sat, Aug 21, 2010 at 1:26 PM, Andy Howell wrote:
> Is there a way I can refer to a class not yet defined?
Yes, see:
http://docs.djangoproject.com/en/1.2/ref/models/fields/#module-django.db.models.fields.related
The paragraph that starts "If you need to create a relationship on a model
that h
It could be better if you omit '_ALL' at URL
So:
/ranking/de/ # for Germany ranking Nation wide
/ranking/ # for all country
can put summary of ranking for such URL, instead of list of all
ranking nation or all country.
Widoyo
On Aug 21, 7:35 am, Uwe Schuerkamp wrote:
> ranking/de/hf Country:
As a test application to learn Django, I'm trying to model a network of
computers,
switches, patch panels and the connections between them. As a start, I have:
class Node(models.Model):
name = models.CharField(max_length=80)
description = models.CharField(max_length=80, null=True)
no
You have django 1.2.1, now I noticed
I wasn't able to install any version of django-cms with django 1.2.1 and
I tried 2.0.0, 2.0.1, 2.0.2 and 2.1.0-beta3
Most up-to-date combination that I successfully installed is django
1.1.1 with django-cms 2.0.2.
Hope this helps
--
You received this messa
Hello
Your django version doesn't match django-cms version.
You didn't specify which you are using so it's hard to say what you
should change.
I encountered this problem and written a message some time ago.
It contains the table with matching versions that should help you.
Marek Dudek
--
You
Hello Karen,
You are right. I'll try that when I get home. I knew that solution
and even applied it in another model but because I was blinded by the
stackedline.
thank you both
Condor
On Sat, Aug 21, 2010 at 5:34 AM, Karen Tracey wrote:
> On Sat, Aug 21, 2010 at 2:01 AM, Condorious wrote:
Actually I missed something in my post, writing it again :
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr
Hi All,
I am new to Django and while making an app in Django I got
stuck at one point. What I was trying to do is to have 3 fields in my
app, username, password and age. I want that if I enter my password
(through admin page of my app) it got entered in encrypted format
(like md5). If a
Hello,
I have Django running under apache2 (the worker version, I believe,
with MaxRequestsPerChild set to the default, which is 0). I am using
mod_wsgi in daemon mode. I have checked that it is daemon mode using
the method described on mod_wsgi's ReloadingSourceCode page.
I need to do a nightl
Thanks a lot! I was lost with paths and all that. You really helped me
to solve my problems!
On Aug 21, 1:44 pm, Steve Holden wrote:
> On 8/21/2010 4:52 AM, clochemer wrote:
>
>
>
> > Thanks for your quick replies. You helped me to understand what is
> > happening.
>
> > However, I can not make a
On Mon, Aug 16, 2010 at 8:51 PM, Mike Dewhirst wrote:
> On 16/08/2010 10:22pm, Doug Blank wrote:
>>
>> On Mon, Aug 16, 2010 at 7:23 AM, Mark Mooij wrote:
>>>
>>> Allright I tried a couple of things with your suggested appraoch:
>>>
>
>
>
>>
>> I doubt it. You shouldn't really do this:
>>
>> kmlp
On Sat, Aug 21, 2010 at 7:11 AM, Jagdeep Singh Malhi <
singh.malh...@gmail.com> wrote:
> I try to Install the Django-Cms using this link
> http://www.django-cms.org/en/documentation/2.0/installation/
>
> I face this error. I am able understand this error
>
> ERROR is : -
> {
> ImproperlyConfigured
On Sat, Aug 21, 2010 at 2:01 AM, Condorious wrote:
> My goal is to add search to stackedinline in addition to the common
> standard search fields. If admin model knows enough to stackinline the
> right stackedinline model, we should be able to
> Search it as well. I just need someone to point m
Hi folks,
please excuse this long-winded post, but I'm a bit stuck with the
layout of my urls.py. Let me try to explain what the site I'm using
Django for does at the moment: Basically it's a website where local
birdwatchers (the ones with feathers, not boobies ;-) can log their
observations. By "
I come from the world of mod_python and really enjoyed the PSP
template system, where I can embed Python code directly in my template
for dynamically generating menus and such.
What is the recommended method of calling a PSP template from inside
Django and rendering it?
Here is a sniplet of code
On 8/21/2010 4:52 AM, clochemer wrote:
> Thanks for your quick replies. You helped me to understand what is
> happening.
>
> However, I can not make all work together. Let me explain the problems
> that I am having right now...
>
> I wrote a piece of code in a folder within my django project path
sorry, I am not able understand this error.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups
I try to Install the Django-Cms using this link
http://www.django-cms.org/en/documentation/2.0/installation/
I face this error. I am able understand this error
ERROR is : -
{
ImproperlyConfigured at /
'PageAdmin.exclude' refers to field 'created_by' that is missing from
the form.
Request Method
Thanks for your quick replies. You helped me to understand what is
happening.
However, I can not make all work together. Let me explain the problems
that I am having right now...
I wrote a piece of code in a folder within my django project path just
like this:
/home/myproject/utils/commserver.py
class Notes(models.Model):
name = models.ForeignKey('name', blank=True, null=True)
text = models.TextField('Text',blank=True)
date = models.DateField(blank=True, default=datetime.date.today());
I have a simple admin model for inputting a note with a date into the
database.
date is prepopul
38 matches
Mail list logo