Hi Karen,
On Oct 10, 5:58 pm, Karen Tracey wrote:
> On Sat, Oct 10, 2009 at 6:34 PM, Scott SA wrote:
> > I am trying to use a series of generic views with custom filtering via
> > callbacks as per:
> I cannot figure out how this one differs from the
I'm the author. Are you sure the comments are broken? I just made one
and it seemed to work.
On Oct 10, 11:55 pm, Kenneth Gonsalves wrote:
> On Sunday 11 Oct 2009 9:07:38 am buttman wrote:
>
> > you could also do it this way:
>
>
On Sunday 11 Oct 2009 9:07:38 am buttman wrote:
> you could also do it this way:
>
> http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-
>easy.html
interesting - but the author's commenting module is b0rked, so was unable to
add a comment (I hope he sees this and sets it
you could also do it this way:
http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-easy.html
On Oct 9, 5:56 am, Chris Withers wrote:
> Streamweaver wrote:
> > You could set this up as a custom manage.py command and run a cron on
> > that. Gives
The way to do what you're trying to do is to take advantage of the
following:
http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
In brief, you'll create another model, which will then be specified in
your settings.py by AUTH_PROFILE_MODULE. From
Chris,
I know this doesn't answer the hard part of your question, but here's
a simple way I delete old stuff from a database via an external script
that's run by cron:
Item.objects.filter(date_updated__lte = datetime.now() - timedelta
(days = 30)).delete()
If you use timedelta, you can
On Oct 8, 2009, at 9:33 AM, grant neale wrote:
>
> Well 1 problem I was thinking about was uploading photos.
> Any suggestion.
>
> Grant
While it's not Django-specific, it's easy to write a Python script
that monitors an e-mail address and downloads and stores the
attachments. You could
I have a model which represents a route. I can use the `make_line()`
geoqueryset method to create a LineString like so:
>>> r = Route.objects.get(pk=33)
>>> # a route from Seattle to New York to Miami, a total distance
>>> # of about 3043.8 nautical miles
>>> r
>>> # a collection of the
I think I figured out my error. I was told to copy the new sub-
directory named "django" to site-packages. I copied the whole
directory (django-1.1) there instead. I made the fix. Now when I
"import django" I just get the prompt back - no error. I assume it is
working.
Thanks for the time you
You could use middleware to do this as I learned last week, but why
not just make a "view" which is only a function.
urls.py:
...
(r'^$', 'views.DomainRootRedirect' )
...
views.py:
def DomainRootRedirect( request, *args, **kwargs ):
return
On Sat, Oct 10, 2009 at 6:34 PM, Scott SA wrote:
>
> Hi,
>
> I am trying to use a series of generic views with custom filtering via
> callbacks as per:
>
>
> http://docs.djangoproject.com/en/dev/topics/generic-views/#extending-generic-views
>
> Unfortunately, when I try to
Yes, Malcolm's “Django Tip: Poor Man's Model Validation” is very
helpful. That should give me enough for this application (which is
very contained and well-behaved).
It's good to know that the term is "model-aware validation", and that
it wasn't somewhere in Django 1.0 that I overlooked. It's
hi,
i am looking for an advice concerning django's forms and formsets.
i am creating a ticket system where the assignees and tickets are
associated via an intermediary table/model.
that's what the models basically looks like:
class Ticket(models.Model):
title =
On Sat, Oct 10, 2009 at 6:04 PM, Senthil wrote:
>
> Hey Guys,
> I am not able to understand this behavior happening in django
>
> My models.py is as follows
>
> from django.db import models
> from django.contrib.auth.models import User
>
>
> class ht_wt(models.Model):
I am trying to extend flatpage view...I have added custom code
here..you can see navigation showing question mark here
http://beta.rmansuri.net/homepage/
from django.contrib.flatpages.models import FlatPage
from django.template import loader, RequestContext
from django.shortcuts import
Hi,
I am trying to use a series of generic views with custom filtering via
callbacks as per:
http://docs.djangoproject.com/en/dev/topics/generic-views/#extending-generic-views
Unfortunately, when I try to name the URL in urls.py, I get various
errors depending upon how I try to write the
On Sat, Oct 10, 2009 at 6:17 PM, Jim DeLaHunt wrote:
>
> [snip]
> 3. Understand if the Django Modelform is the way I ought to be
> handling this. Forms are the only Django entity for which I can find
> documentation about doing validation in accordance with the Model.
>
Hi,
I would like visitors to my site homepage www.example.com to be
redirected to www.example.com/en/ in order to allow for translations
in the future.
What is the most efficient way?
1- Use apache mod-rewrite?
2- I know i could use the HttpResponseRedirect function in django but
i felt it
Hi, folks:
I appreciate the people who are willing to help out newbies here. In
my journey up Django Mountain, I'm now at the stage where I want to
validate data. My app is not interactive and has no web component;
I'm just using Django as a database access layer.
My app reads some data out of
Hey, can anybody figure out what's going on around here. I stumbled
on
this post since I have a similar issue, 'GeoPt' object has no
attribute 'widget'.
I followed Karen's response and it seems that I have a similar issue
since I
don't explicitly declare 'location' and 'location_geocells' in my
Hey Guys,
I am not able to understand this behavior happening in django
My models.py is as follows
from django.db import models
from django.contrib.auth.models import User
class ht_wt(models.Model):
user = models.ForeignKey(User)
EntryDate = models.DateField(auto_now = True)
On Sat, Oct 10, 2009 at 11:41 AM, Tim Chase
wrote:
>
> Currently, I use
>
> t...@rubbish:~/django/trunk/tests$ python runtests.py
> --settings=settings
>
> to execute the core set of tests. However, it takes quite a
> while (on the order of hours) on my old box.
I followed the install instructions in the book entitled: "Python Web
Development with Django". I copied the expanded Directory "Django-1.1"
to /Library/Python/2.5/site-packages. I don't know how to answer the
question about the pythonpath because that is the "howto" info that is
missing. One
On Oct 10, 4:01 pm, dbakerweb wrote:
> I have gotten to the point where I want to test my install of Django.
> I run "import django" and get the "No module named django" error. I
> suspect it is a path issue but I've not been able to understand any
> googled results for
On Oct 10, 3:43 pm, djbahati wrote:
> Hi All,
> Am new to django,
> am developing application but i face a problem in displaying template.
> The browser does not display any template it just display plain text.
> am using django 1.1 and xampp 1.7.1. Any idea?
Thanks guys. This is much better information than what I had.
On Oct 9, 5:29 pm, Daniel Rhoden wrote:
> Can you direct me to the documentation for creating my own 3rd-party
> database driver?
>
> I'm wanting to create a sibling to the concept of a SQLite, MySQL, ...
>
On Sat, Oct 10, 2009 at 9:15 AM, Rizwan wrote:
>
> Hello Djangoer,
>
> I am trying to create website with foreign language in it. I have
> created model for content type and added one page in it. It saving
> fine in database. When I have tried to write view model for
On Sat, Oct 10, 2009 at 11:41 PM, Tim Chase
wrote:
>
> Currently, I use
>
> t...@rubbish:~/django/trunk/tests$ python runtests.py
> --settings=settings
>
> to execute the core set of tests. However, it takes quite a
> while (on the order of hours) on my old box.
Currently, I use
t...@rubbish:~/django/trunk/tests$ python runtests.py
--settings=settings
to execute the core set of tests. However, it takes quite a
while (on the order of hours) on my old box. Is there a way to
just run tests on the regressions/ subdirectory or even just a
particular
There's basically two ways. Conditionally have Django serve different
templates, or even templates with conditions in them. The other is to make
your site viewable in a phone as well as on a computer screen.
Long term planning .. The 2nd is the better choice but that depends on your
content.
I have gotten to the point where I want to test my install of Django.
I run "import django" and get the "No module named django" error. I
suspect it is a path issue but I've not been able to understand any
googled results for fixing path issues. I am a newbie and not a Unix
sysadmin.
Please
Hi All,
Am new to django,
am developing application but i face a problem in displaying template.
The browser does not display any template it just display plain text.
am using django 1.1 and xampp 1.7.1. Any idea?
--~--~-~--~~~---~--~~
You received this message
thank you.
you means the greatest difference between PC and phone is the size of
their screen.
ok.
and what I need to do is to ensure that the DIV+CSS is resizable.
but .whether it is easy for DIV+CSS designed for PC to adapt the
mobile screen?
thank you .
On Oct 10, 3:54 pm, Jani Tiainen
danin wrote:
> I am just learning django from last 2 weeks. while learning i get
> confused in validation. Can anyone plese provide me reference to some
> material so that i can read and underatand it from ther.
http://lmgtfy.com/?q=django+validation
How about getting and reading the Django
the following 2 solution enable my view function doctest-able:
--solution 1-it is not convenient to go to
the error point in source.py
--
add the following code to "models.py" of your "views.py"
from common import
Hi All,
Assuming this model:
class Month(models.Model):
month = models.DateField(
db_index=True,
verbose_name='Month'
)
def __unicode__(self):
return unicode(self.month.strftime('%B %Y'))
Now, I could have sworn this used to throw an error if I
Hi all,
I am just learning django from last 2 weeks. while learning i get
confused in validation. Can anyone plese provide me reference to some
material so that i can read and underatand it from ther.
Thanks and regard
--~--~-~--~~~---~--~~
You received this
Hi all,
Am new to python and django but am facing aproblem with templates and login
the admin page.
1) I cannot login to admin page page because django keeps giving me a
message Look for your browser cofiguration to allow cookies but am sure my
browser allows all cookies.
2) Am using xampp 1.7.1
Hello, I'm trying to find the best approach to have multiple languages
urls on reusable apps but I can't find a good way to do it and I
couldn't find any useful information around.
I am not sure if the best is just to do something like this:
url(r'^%s/$' %
Hello Djangoer,
I am trying to create website with foreign language in it. I have
created model for content type and added one page in it. It saving
fine in database. When I have tried to write view model for this page.
Its showing me "?" rather then foreign character. I am new born
baby in
On Saturday 10 October 2009 00:55:02 The Danny Bos wrote:
> Good point.
> Here's the models I'm talking about as they're slightly different than
> your aforementioned solution.
>
> class Collection(models.Model):
> title = models.CharField(max_length=50, unique=True, help_text="eg:
>
whiskeyjuvenile kirjoitti:
> I'm making some sort of galactic map with the following classes
> defined in models.py:
>
> class Star(models.Model):
> name = models.CharField(max_length=200)
> xcoord = models.FloatField()
> ycoord = models.FloatField()
> zcoord =
Good point.
Here's the models I'm talking about as they're slightly different than
your aforementioned solution.
class Collection(models.Model):
title = models.CharField(max_length=50, unique=True, help_text="eg:
Pokemon, Kiss, Baseball ...")
slug =
hao he kirjoitti:
> I'm developing my site with django,
>
> mainly, my site works as normal, visited by PC.
>
> but ,the site will also be visited by mobile device(e.g.iphone)
>
> who tell me the solution?
>
> or recommend me some relevant articles?
This has almost nothing to do with Django.
Ja!! That is it...
Changed the view function name and it works...
Very nice... thank you to everybody.
Regards
On Oct 10, 2:27 am, Karen Tracey wrote:
> On Sat, Oct 10, 2009 at 2:04 AM, LuisC wrote:
>
> > Hi!!!
> > I am having troubles saving my first
I'm trying to figure out the best way to add an email address form
field to the edit page for a model in the Django admin, and, upon
save, automatically set a hidden foreign key to associate said model
instance to the Django user with this email address, or,
alternatively, create a new user with
Sorry about my ignorance but how would I give keyword arguments in
the view?
I just tried:
BDbuff = Clientes(123,ClienteCodigo=form.cleaned_data
['ClienteCodigo'],
ClienteNombre=form.cleaned_data
['ClienteNombre'],
On Sat, Oct 10, 2009 at 2:04 AM, LuisC wrote:
>
> Hi!!!
> I am having troubles saving my first model using a form:
>
> My Model:
> Class Clientes(models.Model):
>'Clase para Clientes'
>ClienteCodigo = models.IntegerField('Codigo Cliente')
>ClienteNombre =
On Saturday 10 Oct 2009 11:34:11 am LuisC wrote:
> So, what is the argument Clientes() is specting??? Why in shell the
> field list with values are the correct arguments??
you are using keyword arguments in the shell and positional arguments in the
view - maybe that is the problem?
--
regards
Hi!!!
I am having troubles saving my first model using a form:
My Model:
Class Clientes(models.Model):
'Clase para Clientes'
ClienteCodigo = models.IntegerField('Codigo Cliente')
ClienteNombre = models.CharField('Nombre Cliente',max_length=40)
ClienteFechaCreacion =
50 matches
Mail list logo