On Sat, 2009-03-14 at 22:17 -0700, Michael Strickland wrote:
> I'm building an app to serve the main pages for each category of a
> news site. For this, I need to have several different ways to display
> article teasers. For example, in one part of a page I might want to
> display the teasers for
I'm building an app to serve the main pages for each category of a
news site. For this, I need to have several different ways to display
article teasers. For example, in one part of a page I might want to
display the teasers for five specific articles; in another part of the
page, I'd want to
On Sat, 2009-03-14 at 21:51 -0700, kpeters wrote:
> default (see active field) does not seem to propagate - see below
> (Postgres 8.3.6 - current Django as of yesterday)
>
> Any ideas?
That's normal behaviour; Django has never set up the default value on
the database column. There are at least
default (active field) does not seem to propagate - see below
(Postgres 8.3.6 - current Django as of yesterday)
Any ideas?
TIA
Kai
class Client(models.Model):
login = models.CharField(max_length = 20, unique=True)
password = models.CharField(max_length = 10)
created=
default (see active field) does not seem to propagate - see below
(Postgres 8.3.6 - current Django as of yesterday)
Any ideas?
TIA
Kai
class Client(models.Model):
login = models.CharField(max_length = 20, unique=True)
password = models.CharField(max_length = 10)
created=
Hello,
what follows is NOT a solution to your needs, but I wanted to chime
in with a workflow that has proved effective to my three-developers
team. We have two "environments": developer and production. Each
developer has, in their respective home directory (be that Windows or
Linux,) a file
On 14 mar, 22:14, MartinBorthiry wrote:
> Hello:
>
> I'm Trying to serialize a dict which have a list of Model's instance.
> The format that i need is json. Something like that:
>
> people = Person.objects.all()
> res = {'res':0, 'msg':'Ok','data': people}
>
I have the ModelForm below to let the user edit some of their basic
User fields like username, first/last name and email. During testing,
I discovered that I could edit and save a username that included non-
alpha characters. When I log into the admin system, the username is
set to the new
On Sat, 2009-03-14 at 19:52 -0700, Rex wrote:
[...]
>
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> PythonOption django.root /home/rex/django/mturk
*sigh* Will people please stop
On Mar 4, 12:47 pm, John Maines wrote:
> Hello:
>
> I've installed Django 1.0 on Ubuntu and am trying to get it to run on
> Apache. Apache is installed, working fine, with mod-python also in
> place. I'm new at everything Linux.
>
> But when I try to run my app (a test
Alex Gaynor wrote:
> This isn't stricly related, probably, but you generally shouldn't be putting
> your django projects in your docs root:
DocumentRoot is /var/www/html in fact. So it's not. But thanks for the
reference.
> http://www.djangobook.com/en/2.0/chapter02/#cn76 explains why not.
Ferg,
Thanks for such a thoughtful reply!
Your point about placing my directive inside a
directive was well taken. In fact, I did finally find a
thread within the group that also spoke well to my problem:
On Sat, Mar 14, 2009 at 9:16 PM, Jim Hickstein wrote:
>
> I am trying to set up my Django app behind Apache with mod_python, and
> you may have seen this error many times before, but the underlying
> EACCES really puzzles me.
>
> CentOS 5.2, Apache 2.2.3, mod_python 2.4.3.
I am trying to set up my Django app behind Apache with mod_python, and
you may have seen this error many times before, but the underlying
EACCES really puzzles me.
CentOS 5.2, Apache 2.2.3, mod_python 2.4.3. /etc/httpd/conf/
httpd.conf says, in part:
SetHandler python-program
On 14 Mar, 04:30, Malcolm Tredinnick wrote:
> On Fri, 2009-03-13 at 21:27 -0700, Flank wrote:
> > in order to use django/conf/urls/defaults.py, handler404, i did 2
> > things:
> > 1:change DEBUG = False in settings.py
> > 2:create a 404.html template in the root of
> everything works great with the test server.
This tells you that the problem is most likely not with your urls.py
or any of your Django code, so you've cracked that part.
> I again cycled Apache off and on. My "Under Construction" message is
> gone but only the only thing returned to a
On 14 Mar, 21:42, Rex wrote:
> I'd like to use a revision control system to keep up to 3 versions of
> my Django project:
...
> So far I have been planning to use Bazaar for version control.
Good choice.
> - How can I simultaneously run two versions of the same
Karen,
Apologize for the late reply. Thanks for the excellent catch, it was
indeed an IPv6 issue. I just had to update my hosts file on windows
vista to include an entry for 127.0.0.1 and it worked!
Thanks again
CG
On Mar 10, 10:02 pm, Karen Tracey wrote:
> On Tue, Mar 10,
On Sat, Mar 14, 2009 at 4:54 PM, ihome wrote:
>
> Hi,
>
> I defined a form to load data from HttpRequest in views.py. For the
> same function, sometimes, I need to pass a POST request while some
> times I need to pass in a GET request.
>
> For POST, I used
>
>
On 14 Mrz., 22:42, Dirk Eschler wrote:
> Am Samstag 14 März 2009 22:29:16 schrieb Dirk Eschler:
>
> > def get_img_storage_path(instance, filename):
> > return '%salbums/images/%s/' % (settings.MEDIA_ROOT, instance.album.pk)
>
> Forgot the filename in my example...
>
>
Hi,
I defined a form to load data from HttpRequest in views.py. For the
same function, sometimes, I need to pass a POST request while some
times I need to pass in a GET request.
For POST, I used
MyForm(request.POST)
to load the data and it works well.
For GET method, MyForm(request.POST)
Am Samstag 14 März 2009 22:29:16 schrieb Dirk Eschler:
> def get_img_storage_path(instance, filename):
> return '%salbums/images/%s/' % (settings.MEDIA_ROOT, instance.album.pk)
Forgot the filename in my example...
def get_img_storage_path(instance, filename):
return
I'd like to use a revision control system to keep up to 3 versions of
my Django project:
- A production version, which will be running on a remote Linux server
- A test version, which will be running on the same remote server for
my colleagues to test out before I make it public
- (Possibly) a
Am Samstag 14 März 2009 22:13:39 schrieb Christoph Wegscheider:
> Hi,
> I want to upload photos to directories structured by the album primary
> key. I have the following model:
>
> class Photo(models.Model):
> album = models.ForeignKey(Album)
> img =
On Sat, Mar 14, 2009 at 4:13 PM, Christoph Wegscheider <
christoph.wegschei...@gmail.com> wrote:
>
> Hi,
> I want to upload photos to directories structured by the album primary
> key. I have the following model:
>
> class Photo(models.Model):
>album = models.ForeignKey(Album)
>img =
Hello:
I'm Trying to serialize a dict which have a list of Model's instance.
The format that i need is json. Something like that:
people = Person.objects.all()
res = {'res':0, 'msg':'Ok','data': people}
but, i need that result:
{'res':0, 'msg':'Ok','data':
Hi,
I want to upload photos to directories structured by the album primary
key. I have the following model:
class Photo(models.Model):
album = models.ForeignKey(Album)
img = models.FileField(upload_to='albums/images/' + str(album.pk)
+ '/', blank=True)
The str(album.pk) part is not
On Fri, Mar 13, 2009 at 6:03 PM, Shantp wrote:
>
> I'm getting this error:
>
> AttributeError: 'NoneType' object has no attribute 'append'
>
> It's coming from this line in my template:
>
> {% scores_for_objects share_list as score_dict %}
>
> If I remove this line everything
thanks! this is exactly what i need.
On Mar 14, 12:04 pm, Alex Gaynor wrote:
> On Sat, Mar 14, 2009 at 11:02 AM, ihome wrote:
>
> > is there an easy way to control the precision for float values? for
> > example, i have this in my template:
>
> >
>
Am Samstag 14 März 2009 12:44:11 schrieb Dirk Eschler:
> myproject.news.models:
> ==
> class Post(models.Model):
> date = models.DateTimeField(default=datetime.now())
> release = models.ForeignKey(Release, null=True, blank=True)
>
> myproject.downloads.models:
>
On Mar 14, 8:04 am, Sergio wrote:
> wow, that's interesting. I was not aware if this.
>
> So, coming to the real question, here is my use case which raised this
> questions:
>
> I've a class in the model with two CharFields. When validating data
> inputs, I need to check
I'm running Python 2.4, Django 1.0.2 and Apache2 on my Debian Etch
box.
I have Apache configured to run multiple websites using the
VirtualHost paradigm. I've had an "Under Construction" message in
index.html at /var/www/mysitehome/htdocs. Apache served this without
problems whenever
> Nope -- two is normal behavior. One's the server itself, and the other
> is the process that monitors your code on disk and reloads the server
> when you make code changes.
I see. There must be some case where the automatic reload doesn't
work, then. I created the Powershell script because I
On Sat, Mar 14, 2009 at 11:23 AM, bendavis78 wrote:
>
> EDIT: Oops! where did I get "Martin Fowler" from? It was "Martin
> Winkler"!! (sorry Martin W)
>
> On Mar 14, 11:21 am, bendavis78 wrote:
> > Hi django-heads, I found Martin Fowler's
EDIT: Oops! where did I get "Martin Fowler" from? It was "Martin
Winkler"!! (sorry Martin W)
On Mar 14, 11:21 am, bendavis78 wrote:
> Hi django-heads, I found Martin Fowler's "Captcha for Django"
> here:http://django.agami.at/media/captcha/. This is by far the
Hi django-heads, I found Martin Fowler's "Captcha for Django" here:
http://django.agami.at/media/captcha/. This is by far the easiest to
use captcha system for django that I've found on the 'net, but I
found it was outdated (not working w/ 1.0 or 1.1).
If anyone is interested, I've created
On Sat, Mar 14, 2009 at 11:02 AM, ihome wrote:
>
> is there an easy way to control the precision for float values? for
> example, i have this in my template:
>
>
>
> where float p = 0.1234123413 but i only want to show p with 3 digits
> after dot like 0.123. is there a
is there an easy way to control the precision for float values? for
example, i have this in my template:
where float p = 0.1234123413 but i only want to show p with 3 digits
after dot like 0.123. is there a predefined way to control the
precision in the rendering of template instead of having
thanks for the info. I'll track the ticket. for now, I just convert
the values to a dict and pass it over to my template.
On Mar 14, 12:27 am, Malcolm Tredinnick
wrote:
> On Fri, 2009-03-13 at 21:08 -0700, ihome wrote:
> > Hi,
>
> > I am using the latest django
Thank you so very much for the insight and help...figured I was missing
something very obvious, and I was :)
As to the __unicode__ matter: I do have in the Market class that function
defined, but needed to pass additional information when returning the
string, but on the Admin of Aliases, it
On Sat, Mar 14, 2009 at 6:47 AM, timc3 wrote:
>
> > > So is that the list that you are talking about?
> >
> > I'm assuming those values corropond tot he fields on the model, any
> reason
> > you can't do:
> >
> > self.model(**cursor.fetchone())
>
>
> Just tried to do that but it
Thanks Stephen. That helps a lot.
On Mar 13, 4:29 pm, Stephen DeGrace wrote:
> It's not putting anything into the session. The session is basically a
> jazzed-up dictionary, and the get method works pretty much just like it does
> with the dictionary, it will try and get the
wow, that's interesting. I was not aware if this.
So, coming to the real question, here is my use case which raised this
questions:
I've a class in the model with two CharFields. When validating data
inputs, I need to check that, if the user filled field A, then also
field B should contains
Checkout the forms documentation for information on how to change what
the ModelForms generates:
http://docs.djangoproject.com/en/dev/topics/forms/#topics-forms-index
You should be able to change the types of fields and fields names/ids/
class names to then hook into your javascript.
I usually create a template directory in the application directory,
and then sub directories underneath that. Helps when you need to start
translating I have found.
Or you could check out Bradley's GitHub project here:
http://github.com/bradleywright/django-layout/tree/master
Well I fixed this by updating to the latest django trunk.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from
On Sat, Mar 14, 2009 at 5:53 AM, Guillermo
wrote:
> Should I be seeing only one process instead of two when I start the
> dev server?
Nope -- two is normal behavior. One's the server itself, and the other
is the process that monitors your code on disk and
You can put them where you want but generally they go inside the application
folder that uses that template.
You may find this an interesting/helpful read;
http://www.djangobook.com/en/2.0/chapter04/
Dougal
---
Dougal Matthews - @d0ugal
http://www.dougalmatthews.com/
2009/3/14 Joshua
Darn,
It turns out that media/ is already used for admin :-( Using
site_media and it's running now.
On Mar 14, 11:55 pm, Joshua Partogi wrote:
> Dear all,
>
> I've already followed in the docs as instructed
> herehttp://docs.djangoproject.com/en/dev/howto/static-files
>
Dear all,
I've already followed in the docs as instructed here
http://docs.djangoproject.com/en/dev/howto/static-files
And configured as following in my urls.py
if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root':
This is a continuation of a thread I started a couple of months ago
but didn't have time to investigate more:
http://groups.google.com/group/django-users/browse_frm/thread/dc2e49515ddcbf73?hl=en=1
It seems to be some problem with psycopg2 on my Ubuntu production test
machines as I am not
Dear all,
As I am still new to django, I have a question about the best practice
for placing templates. Do we put it inside the project folder or under
webserver directory?
Best regards,
--
If you can't believe in God the chances are your God is too small.
Read my blog:
> > So is that the list that you are talking about?
>
> I'm assuming those values corropond tot he fields on the model, any reason
> you can't do:
>
> self.model(**cursor.fetchone())
Just tried to do that but it seems to be returning things as a tuple
so I get the error:
ModelBase object
Hello,
i've been away from django for quite a while. First of all, i'm really
impressed about the current state of django.
After porting most of my code to the current stable, i'm now trying to
understand how the save method of inlines can be overwritten. Here's a
stripped down version of my
This is a Python question. Python doesn't have "arrays", you are using
lists. Lists are indexed only by integers. What you want is a
dictionary, which can be indexed by any value. Change your first line to:
people = {}
and you should be all set.
--Ned.
http://nedbatchelder.com
Ted
Hi,
> When I try to set up my first Django project, I receive the following
> message:
>
> cd C:\DjangoProjects
> C:\DjangoProjects>django-admin.py startproject myproject
> Type 'django-admin.py help. For usage.
Have you tried this?
http://docs.python.org/using/windows.html#executing-scripts
Hi,
I'm trying to automate the restarting of Django's dev server with
Powershell. I've noticed that the server starts two processes. I can
retrieve and store the PID for just one of them, and I've found a
workaround that lets me kill the other before restart too, but not
entirely reliably (the
My Django form looks like this:
---
Type:
{{ form.syslist }}
Name:
{{ form.name }}
---
My JS copy droplist value to text field code looks like this:
---
books
movies
restaurants
---
I'm
On Sat, Mar 14, 2009 at 5:21 AM, Chris wrote:
>
> I'm trying to test an email sending feature, and the email text
> requires the current domain, which I'm getting from request.META
> ['HTTP_HOST']. On a normal system, this works fine, but when I access
> it using the test
I want to take a table like People with entires id, Name, Sex and send
it to HTML to do something like this:
{% for name in people.filter(sex='M') %}
Male: {{ People.Name }}
{% end %}
But, it's too late to do this in HTML. So, I'm trying to create an
array of pre-sorted lists in views.py to
On Fri, Mar 13, 2009 at 2:53 PM, joemanfoo wrote:
>
> Hi there,
>
> I'm very new to both Python and Django, so please pardon my ignorance
>
>
> Here's what I'd like to do...
> I've two models, one foriegnKey'ed to the other.
>
> in models.py:
> class Market(models.model):
>
61 matches
Mail list logo