This magically began working - I swear.
--~--~-~--~~~---~--~~
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 this group, send
I am going through the tutorial 3 for the SVN version:
http://www.djangoproject.com/documentation/tutorial03/
And everything works fine until I get to "Decoupling the URLconfs.
Here are what my urls.py files look like:
# Installation-specific urls.py
from django.conf.urls.defaults import *
Well, I tried the initial arguement again, and it worked this
time...must have made a typo the other time I tried this.
Thx
On Dec 23, 2:03 pm, Yatla <[EMAIL PROTECTED]> wrote:
> Joseph,
>
> Yes, for a new Document, I want to assign to an existing Category.
> The initial arguement works for a
Hi guys,
I'm trying to extend a ModelForm, I had success but I must redefine
the Meta class, it doesn't got extended. Is this a bug? See the
following code:
class Form1(forms.ModelAdmin):
class Meta:
model = SomeType
class Form2(Form1):
extra_field =
Hi,
I am building a app which generates a large Form based upon a
combination of many ModelForms. These ModelForms are doing precious
work of filling out drop down lists of the foriegn fields of dependent
models. ModelForms also ensures that my form is always in sync with my
models.py.
I want to
Gotta say - a week into this project - I am loving Django.
Wrote a small custom filter:
@register.filter ("fromdatetuple")
def fromdatetuple(value):
return datetime.datetime.fromtimestamp(time.mktime(value))
fromdatetuple.is_safe = True
And added this to the template:
{{
Thanks, everyone,
Jeff, I installed the SVN version, like you said - and it worked! I
guess I was under the (apparently false) impression that the official
release would be better to install than the SVN version.
On Dec 22, 3:47 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> I have no problems
class Photo(models.Model):
user = models.ForeignKey(User)
main = models.BooleanField(_('Is main?'))
icon = models.ImageField(_('Icon'), upload_to='photo', null=True,
blank=True,
help_text=_('Don\'t touch! It will be
generated automatically'))
medium =
you can add
import sys
sys.path.insert(0, '/your/django-svn/path')
in the 2 line of manage.py file.
2007/12/24, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>
> Hi i have 2 projects which one of them uses the svn version of the django
> and
> another uses 0.96.1
>
> How should i handle that
On Dec 24, 9:36 am, [EMAIL PROTECTED] wrote:
> Hi i have 2 projects which one of them uses the svn version of the django and
> another uses 0.96.1
>
> How should i handle that situation. Currently i checouted the svn version and
> created a ln -s to my site-packages version?
>
> How can i have
Hi i have 2 projects which one of them uses the svn version of the django and
another uses 0.96.1
How should i handle that situation. Currently i checouted the svn version and
created a ln -s to my site-packages version?
How can i have the 0.96.1 when i work with my site and to have svn when
What is UserForm?
On 24 дек, 00:46, l5x <[EMAIL PROTECTED]> wrote:
> Traceback:
> File "/home/user/django_src/django/template/debug.py" in render_node
> 71. result = node.render(context)
> File "/home/user/django_src/django/template/debug.py" in render
> 87. output =
I think I missed:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#ModelFormsconstructornowmatchesForms
That should be the solution!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
Traceback:
File "/home/user/django_src/django/template/debug.py" in render_node
71. result = node.render(context)
File "/home/user/django_src/django/template/debug.py" in render
87. output =
force_unicode(self.filter_expression.resolve(context))
File
2007/12/23, tjunning <[EMAIL PROTECTED]>:
>
> Hi,
>
> I'm really, part time app devleoper and very new with Python & Django,
> I was wondering is there a way to use the django administration
> interface as the main app? and plug the rest of the app as part of it?
> Basically I want my application
Or use daemon mode of mod_wsgi 2.0 instead and enable process reload
mechanism.
This way all you need to do is touch the WSGI script file for the
Django application and the daemon process for just Django will be
restarted automatically without the need to restart the whole of
Apache.
Daemon
James thanks. I have been reviewing the Python docs but there are too
many moving parts for me at this point. I assume this can be
accomplished within the feeds.py module fairly simply but I am just
beginning to learn the code. I will give it a shot once I have a bit
more experience with it.
On Dec 23, 2007 1:50 PM, Rex Eastbourne <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Is there any solution to the below described problem? I still haven't
> been able to get it to work.
>
> Best,
> Rex
>
Somehow it seems you have gotten recent templates from SVN mixed in with
code from 0.96. Details
Joseph,
Yes, for a new Document, I want to assign to an existing Category.
The initial arguement works for a form class, which is what I first
had, but then modified to use the new ModelForm class. The ModelForm
class does not seem to accept an initial arguement.
On Dec 22, 5:25 pm, "Joseph
On Dec 23, 2007 11:06 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Using modified_parsed gave me this date (2007, 12, 21, 21, 22, 49, 4,
> 355, 0) but threw an error when applying a filter: AttributeError
> at / 'time.struct_time' object has no attribute 'year'
>
> I think I am just not
Template loader returns a source code for template, not parsed
Template object. So no big gain here :(
> In the early days of Django, Adrian, Simon et al looked at that. It
> wasn't worth it, since, in the grand scheme of things, template caching
> and checking the cache wasn't that much faster
OK, I figured out the array type in Postgresql to get this to work.
Now, the challenge is to read through the array when I am displaying the
values and match them up with the choices in the model.
/alex
On Dec 23, 2007 12:20 PM, Alex Ezell <[EMAIL PROTECTED]> wrote:
> Tim,Sorry for the late
Hi,
Is there any solution to the below described problem? I still haven't
been able to get it to work.
Best,
Rex
On Dec 20, 3:11 am, Rex Eastbourne <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm going through the Django tutorial for Django 0.9.6 on Windows
> Vista. Everything is going smoothly,
Hi.
In production environment IMHO it really doesn't matter because you
have to restart server anytime you change the python code. If you
treat templates as code that really doesn't matter. We have about 50
production servers and we restart a farm every time we change the
code. We do it
Dear Sirs:
I have this model
class Student(models.Model):
name = models.CharField(max_length=50)
class StudentGroup(models.Model):
name = models.CharField(max_length=20)
student = models.ForeignKey(Student)
class Subjects(models.Model):
name =
Tim,Sorry for the late reply, but I'm just now getting around to this.
This definitely gives me the widget I want and the Forms class is happy, but
I can't seem to find anything about what type of DB field or Model field
this should be.
The errors I get say that the value posted is of type
On 12/23/07, Eratothene <[EMAIL PROTECTED]> wrote:
> Your snippet requires to restart django each time the templates have
> changed. Did you try to add checking of template file modification
> date in order automatically invalidate cache? What it is performance
> of such implementation? Adding
Hi guys,
I'm migrating some of my applications to newforms-admin branch and I
have a question about the way I should define extra js files at model
level administration. Coming from standard django admin configuration
I should expect that the following code would work:
from django.contrib
James -
Thanks, I had worked through the date_parsed items - but was getting
the same error. Maybe I was missing some other piece at that point. i
will give it another shot.
Using modified_parsed gave me this date (2007, 12, 21, 21, 22, 49, 4,
355, 0) but threw an error when applying a filter:
On Dec 23, 2007 10:19 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> That all works - (renders as Fri, 21 Dec 2007 21:22:49 + ) but I
> can not apply any Django time filters (date, timesince, naturalday) to
> the {{entry.date }} variable. I would guess it is not recognizing the
> date as
I am using template_utils.feeds to parse and import feeds.
On the template it looks like this:
{% endcache %}
{% cache 5 sample_feed %}
Feed
{% parse_feed "http://example.com/feed.rss; as sample_feed %}
{% for entry in sample_feed.entries %}
{{ entry.title}}
{{ entry.date }}
{% endfor %}
On 12/23/07, Julien <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I don't understand why the form doesn't validate when I don't fill out
> a ManyToManyField.
>
> Here's the code:
>
> class Participant(models.Model):
> project = models.ForeignKey(Project, related_name='participants')
>
Hi forgems!
Your snippet requires to restart django each time the templates have
changed. Did you try to add checking of template file modification
date in order automatically invalidate cache? What it is performance
of such implementation? Adding this kind of mechanism will increase
performace
On Dec 23, 6:57 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> dead easy - you could even take a look at this (feel free to
> cannibalise it as long as you give us some credit), or you could add
> your seminar stuff as a module and we would help out there:
>
>
Hi, i'm author of the snippet http://www.djangosnippets.org/snippets/507/.
I have used simple dictionary because pickling and unpickling values
from the cache are IMHO to expensive and don't give a big speed boost
over parsing. Also if you use memcache or filesystem backend for
caching (pretty
I installed apache+mod_python+python+django. but the annoy thing is any
time I changed code a restarting of apache must needed to see the change.
looking for a better way.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Oh, and here's the view:
def edit_participant(request, project_pk, participant_pk):
project = get_object_or_404(Project, pk = project_pk)
participant = get_object_or_404(Participant, pk =
participant_pk)
if request.method == 'POST':
form =
Hi there,
I don't understand why the form doesn't validate when I don't fill out
a ManyToManyField.
Here's the code:
class Participant(models.Model):
project = models.ForeignKey(Project, related_name='participants')
roles = models.ManyToManyField(Role, blank=True, null=True)
user =
38 matches
Mail list logo