Yes, your caching seems a likely culprit, and so does the asynchronous
> nature of youAJAX(but it seems like you've got a handle on that
> part). I haven't thought through the load balancer bit yet, but
> presumably they are all using the same cache / database / session
> store..?
I'
On Dec 25, 7:53 am, Ivo Brodien wrote:
> > I was getting "application/pdf" a few days ago with same client,
> > server, browser, etc.
>
> If this really is the case and the code is exactly the same, maybe it depends
> somehow on the PDF itself? Did you check that?
I used the
I want some files to only be accessible by certain users.
For example, imagine a teacher wanting to distribute graded exams on a
Django server w/o violating any student's privacy.
Is there an easy way to do this?I am aware of the access control
decorator for specific views but not for
I printed the content_type of an uploaded file in Django and noticed
that for PDFs I was getting
"application/text"?
I was getting "application/pdf" a few days ago with same client,
server, browser, etc.
Anyone know what would cause content type to show wrong kind for PDFs?
cs
--
You received
The short version: when processing a request, does Django *always*
collect session information from the session store before starting the
view?
The long version:
i have an application that makes heavy use of AJAX. When a user
changes something on the page, the page fires an AJAX POST to apply
alternative / more elegant ways.
There's a setting built into South which does this:
SOUTH_TESTS_MIGRATE
[http://south.aeracode.org/docs/settings.html#south-tests-migrate]
Regards,
Chris Northwood
--
You received this message because you are subscribed to the Google Groups
"Django use
db
>>> > db=MySQLdb.connect(passwd="pass",db="dname")
>>> > c=db.cursor()
>>> > max_price=5
>>> > c.execute(RAW_SQL_HERE)
Why not execute the SQL using Django, as documented here?
https://docs.djangoproject.com/en/dev/topics/db/sql/
On Oct 7, 10:39 am, Jacob Kaplan-Moss <ja...@jacobian.org> wrote:
> On Fri, Oct 7, 2011 at 10:30 AM, Chris Seberino <cseber...@gmail.com> wrote:
>
> > I've noticed that this doesn't often work in Django shell...
>
> > x = MyModel.objects.all()
> > x[3]
I've noticed that this doesn't often work in Django shell...
x = MyModel.objects.all()
x[3].some_field = "new value"
x[3].save()
Rather, I must often do this...
temp = x[3]
temp.some_field = "new value"
temp.save()
*Sometimes* the first works and I don't know why.
P
On Fri, Oct 07, 2011 at 11:40:03AM +0100, Chris G wrote:
> On Fri, Oct 07, 2011 at 11:47:49AM +0530, kenneth gonsalves wrote:
> > On Thu, 2011-10-06 at 10:00 +0100, Chris G wrote:
> > > > this is as simple as it gets
> > > > https://bitbucket.org/lawgon/django-a
Shawn -- what do you recommend instead? A friend and I recently had
this debate. His suggestion was to split off as much behavior into
smaller apps with only a handful of models in the models.py as
possible, but I said that if it's not reusable, it shouldn't be an
app. I still haven't found a
On Fri, Oct 07, 2011 at 11:47:49AM +0530, kenneth gonsalves wrote:
> On Thu, 2011-10-06 at 10:00 +0100, Chris G wrote:
> > > this is as simple as it gets
> > > https://bitbucket.org/lawgon/django-addition/overview
> >
> > Too simple for me, it doesn't run.
>
On Thu, Oct 06, 2011 at 10:09:05AM +0100, Cal Leeming [Simplicity Media Ltd]
wrote:
> Chris -
>The only thing I can say, is that you've been given some really good
>advice on this thread so far.
Yes, I'm not complaining at all, the feedback has all been very helpful.
I'm ju
On Thu, Oct 06, 2011 at 01:14:37AM -0700, Daniel Roseman wrote:
> On Wednesday, 5 October 2011 20:55:33 UTC+1, Chris Green wrote:
>
> I'm an experienced programmer (started around 1971 or so!) and I've done
> lots of things over the years, much of my backgroun
On Thu, Oct 06, 2011 at 11:01:13AM +0530, kenneth gonsalves wrote:
> On Wed, 2011-10-05 at 23:02 +0100, Chris G wrote:
> > OK, so there isn't a single simple answer. However it would still be
> > really nice to see a complete two or three page django site with a
> > dat
On Wed, Oct 05, 2011 at 04:35:49PM -0400, Peter Herndon wrote:
>
> On Oct 5, 2011, at 3:55 PM, Chris G wrote:
> >
> > However two rather basic things still elude me:-
> >
> >Where/how do I actually start creating the top level/page of a web
> >site?
On Wed, Oct 05, 2011 at 03:02:13PM -0500, Javier Guerra Giraldez wrote:
> On Wed, Oct 5, 2011 at 2:55 PM, Chris G <c...@isbd.net> wrote:
> > I'm trying to get my mind round django. I have it installed on my
> > unbuntu server, it works, I've worked through tutorials 1 and 2 a
On Wed, Oct 05, 2011 at 08:58:10PM +0100, Cal Leeming [Simplicity Media Ltd]
wrote:
>Hi Chris,
>I'm assuming that you don't have any experience with Python??
No/yes, I *do* have Python experience, it's my language of choice for
scripts which require a bit more than basic shell scr
, but at the moment I'm
feeling a bit lost! :-)
--
Chris Green
--
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 email to
django-user
On Wed, Oct 05, 2011 at 03:13:08PM +, Brett Epps wrote:
> Hi Chris,
>
> Once you've defined a model for your data, you can use a ModelForm [1] to
> automatically generate a form for that model.
>
> You might also want to check out the admin site [2], which displays data
>
and all its fields?
--
Chris Green
--
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 email to
django-users+unsubscr...@googlegroups.com
+1 for using virtualenv. Indispensable for working on more than one dingo
project on the same development machine. If you're developing on Linux or Mac,
take a look at virtualenvwrapper. It makes working with virtual environments
practically painless.
--
You received this message because you
I believe that in earlier versions of django if you added a view
method to an admin, and extended the get_urls method that because it
was under the admin it would automatically require at least a log in
(user.is_authenticated()=True. I have been working with Django 1.3
and have noticed that this
On Aug 1, 7:11 am, DrBloodmoney wrote:
> You can look into protecting them with mod_xsendfile for Apache
Thanks. I'll look into that. Is there no way to have a view hand off
a page to Apache?
If there was, I could have a view that was password protected and only
when
handled by Django, they don't
enjoy Django's access controls. They don't even have a view since
they are just static pages handled by Apache.
Is there any way to somehow prevent access to them unless someone is
signed into my Django app?
chris
--
You received this message because you are subscribed
Here are my models:
http://dpaste.com/558411/
I'm wanting to run a query on the Team model that gets every game from
Games where the team's opponent was in the Coaches Poll Top 25.
So, the view is getting:
team = Team.objects.get(pk=team_id)
On this page, it'll display team info (I cut out
ues('town_name').distinct().order_by()
- this works as I would have expected 'cos it drops the SQL ORDER BY.
So it would be nice to do this:
self.filter(town_name__istartswith='Randfo').values('town_name',
'province__country__name', 'province__name').distinct('town_name')
Regards
Chris Matthews
--
Sounds really cool. I'm definitely in.
On 22 Jun 2011, at 14:16, "Cal Leeming [Simplicity Media Ltd]"
wrote:
> Hi all,
>
> Some of you may have noticed, in the last few months I've done quite a few
> posts/snippets about handling large data sets in
Figured it out. Added this to my Model:
@property
def spacer(self):
return (25-len(str(self.team.name)))*' '
then in my template just added {{ team.spacer }}
On Jun 17, 7:17 pm, Chris McComas <mccomas.ch...@gmail.com> wrote:
> I have this as my template code:
I have this as my template code:
http://dpaste.com/555651/
This is the HTML it is outputting, which makes sense. What I'm trying
to do is make it so the closing tag is right after the team name
and the whitespace from the ljust after it.
http://dpaste.com/555649/
--
You received this message
On Jun 14, 10:47 am, Tom Evans wrote:
> Yes, of course it is - HTTP is stateless, so how else would sessions
> work if the session id is not transmitted back to the server by the
> browser?
I agree. Yet, eBay, Google Groups & Godaddy drop down to HTTP after
login.
Why
I have Apache in front of my Django app. It forces login pages to use
HTTPS but then forces rest of pages to only use HTTP.
Is client browser sending sensitive login or session info in the clear
when I am not using HTTPS?
My nonencrypted pages don't present or ask for sensitive info. The
only
I've had good luck with Lettuce. It's very similar to Cucumber(the
test format is the same) so you should be able to jump right in. The
terrain features they offer are really useful as well.
On Sat, Jun 11, 2011 at 8:58 PM, Mark Curphey wrote:
> Thanks. Do most Python folks
I'm using the Django community aggregator on my site, which uses the
Universal Feed Parser to parse RSS feeds and save them in a database.
I noticed that the date_modified for feeds were actually +5 of my
timezone, which is set to America/Detroit in my Django settings. I'm
on DotCloud and
I have this database setup:
http://dpaste.com/553289/
This is my db router file:
http://dpaste.com/553290/
When I try to run ./manage.py syncdb --database=slave1 it starts to
create the tables, but when it gets to the auth_permission table I get
this error:
django.db.utils.IntegrityError:
Bruno,
Thanks. It wasn't exactly working properly, so I just had to
add .order_by('feed__feed_type__order_by') and it seems to be working
properly.
On Jun 10, 3:33 pm, bruno desthuilliers
<bruno.desthuilli...@gmail.com> wrote:
> On 10 juin, 17:23, Chris McComas <mccomas.ch...@gmai
%}
it does the first {% for %} loop perfectly, the second {% for %} loop
gets the Feed from the database for that FeedType, but I need it to
get FeedItems for Feed in FeedType
Thanks for any help
On Jun 10, 8:54 am, Chris McComas <mccomas.ch...@gmail.com> wrote:
> Thanks very much!
>
}}
{% for entry in feed.list %}
{{ entry.title }}
{% endfor %}
{% endfor %}
On Jun 10, 6:21 am, bruno desthuilliers
<bruno.desthuilli...@gmail.com> wrote:
> On Jun 10, 6:13 am, Chris McComas <mccomas.ch...@gmai
I have this views.py and models.py:
http://dpaste.com/552615/
On the view what I want to do is display a list of all the feed types
(News, Sports, etc general categories), then then below each of those
feed type headings display the FeedItems for each feed for that city.
Prior to adding the
Chris,
Thanks, the django community aggregator is built on top of the
Universal Feed Parser. I figured out the zip codes function of my app.
What I can't figure out is why when I add a m2m model to my
update_feeds.py does not work. As far as I can tell in the
update_feeds doesn't access the Feed
Always Data (http://www.alwaysdata.com) has a free plan, but it is
quite limited (you only get 10 MB disk space).
On Jun 8, 2:39 am, Maksymus007 wrote:
> megiteam.pl is 24PLN which is about 8usd a month:)
>
> Pozdrawiam, Maksymilian Pawlak
> 08-06-2011 08:30 użytkownik
/ Atom feeds, and so may be
somewhat more useful than BeautifulSoup.
On Jun 6, 10:59 pm, Chris McComas <mccomas.ch...@gmail.com> wrote:
> Also, using the update_feeds that's part of the Django Community
> Aggregator worked initially, but I started over adding a m2m field on
> the Feed
s,
On Jun 6, 4:55 pm, Chris McComas <mccomas.ch...@gmail.com> wrote:
> This could be the wrong place to ask (maybe a BeautifulSoup)
> question...
>
> I have a Django app that is based around the Django Community
> Aggregator, it gets feeds from various sites and displays them
This could be the wrong place to ask (maybe a BeautifulSoup)
question...
I have a Django app that is based around the Django Community
Aggregator, it gets feeds from various sites and displays them on my
site. What I am wanting to do, if possible, is when it gets a feed if
a certain zip code is
Mateusz
Thanks for the feedback. Those docs you pointed to were about missing
views. I checked and my views are not missing.
I looked more closely at the error message and noticed it appears to
be complaining that my models are missing. I don't know if that
helps. (see below) Could it also
he 2.2.16
I use Firefox on Ubuntu Linux 10.10 (server and client both user this
Ubuntu version)
In my settings.py file I am loading sessions, CSRF and auth
middleware,
Tell me if there is any other info that would be relevant.
Maybe this is a mod_wsgi quirk?
Sincerely,
Chris
--
You receiv
error not matter what page I try to view first after a
restart.
It goes away on the second reload always.
chris
--
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 unsubs
On May 21, 5:22 am, Duane Griffin wrote:
> Is the messaging framework configured (note that it is by default)?
Wow. I thanks so much! I never would have caught this!
I renamed Message to Annoucement and now it works!
cs
--
You received this message because you are
I have a model class called Message with an attribute called text.
** When I pass a list of these objects called messages to my template,
it doesn't show up.
** When I instead create this derivative called fred, that *does*
work...
fred = [e.text for e in messages]
Why would fred work
hi gabe -
response =
render_to_response('reports/trackingdump.html',{'trs':trs,})
filename='trackingdump.xls'
response['Content-Disposition'] = 'attachment; filename=' +
filename
response['Content-Type'] = 'application/vnd.ms-excel;
charset=utf-8'
that's
I am migrating my Django app from an old database to a new one with
DIFFERENT model classes. How can I copy my passwords/hashes over?
Is there some special way to copy over the hash? Is that even
possible?
A MySQL command line would be fine.
cs
--
You received this message because you are
an m2m relation with model User, which has
either not been installed or is abstract.
mvc.quiz: 'users' has an m2m relation with model User, which has
either not been installed or is abstract.
Not sure how to fix this or what means.
Chris
--
You received this message because you are subscribed
Shawn
Thanks! Is South just a script that runs? Can I uninstall after the
conversion if desired?
Or, does it permanently alter a Django app somehow?
cs
On May 14, 10:53 pm, Shawn Milochik wrote:
> The best way is to use South.
>
> http://south.aeracode.org/
>
> In your
mmand line equivalent?
Preferably there is a way to do this from Django shell or other way?
Sincerely,
Chris
--
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.
I think you might be taking the wrong approach. Rather than having your
application code checking whether or not it's in a test, have your testing
code disable/mock certain behaviors that you don't want exercised(like have
it always return that the user answered the security question correctly or
Yep - trying to do it in a template.
I can just do the logic within in python - it'll mean redundant info going
into the template, but that's OK.
Thanks for your response,
C
On Mon, Apr 18, 2011 at 9:27 AM, Shawn Milochik wrote:
> You can do this pretty easily in Python
Awesome, that was it. My old code now works again. Thanks!
Chris
On Mon, Apr 18, 2011 at 5:47 PM, akaariai <akaar...@gmail.com> wrote:
> On Apr 19, 12:17 am, Chris Spencer <chriss...@gmail.com> wrote:
> > Thanks. However, changing the line to:
> >
> >
Thanks. However, changing the line to:
if not self.instance.state.adding:
results in essentially the same error:
AttributeError: 'MyModel' object has no attribute 'state'
On Mon, Apr 18, 2011 at 4:48 PM, akaariai <akaar...@gmail.com> wrote:
> On Apr 18, 11:08 pm, Chri
,
Chris
--
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 email to
django-users+unsubscr...@googlegroups.com.
For more opti
Does a function or construct exist to easily do the following?
my_list = [{'id': 'foo'}, {'id': 'bar', 'other': 'baz'}]
{% is my_id_value in my_list.id %} // True if my_id_value is 'foo' or 'bar'
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Django
just not something that is done out of the box.
-Chris
On Thu, Apr 14, 2011 at 11:31 PM, ug Charlie <ug.char...@gmail.com> wrote:
> Hello, I just make a satchmo shop. 3 languages.
>
> But the currency make me stuck.
>
> I just want the site change the currency when
Perhaps can wrap the default login view by calling it in my own view?
I really just need to add a few elements to dict I assume gets emitted
by it.
cs
On Apr 11, 5:00 am, bruno desthuilliers
wrote:
> On 11 avr, 01:20, ChrisSeberino wrote:
>
>
How pass custom data to login template? (Seems only some like 'next'
param are allowed!?)
The reason for this problem is the Django auth system doesn't ask user
to
write the view for login page.
cs
--
You received this message because you are subscribed to the Google Groups
"Django users"
Sorry n/m. Apparently this is a long running discussion. I just
found the
start of a big part of it...
http://groups.google.com/group/django-developers/browse_thread/thread/bbf75f0eeaf9fa64/59822bbce1e0be22?#59822bbce1e0be22
cs
On Apr 9, 12:08 am, Chris Seberino <cseber...@gmail.com>
By the wayby "validate" I meant to say that I want it be be *valid
HTML*.
cs
On Apr 9, 12:06 am, Chris Seberino <cseber...@gmail.com> wrote:
> I'm using Django authentication for myhttp://phil4.com/sign_inpage.
>
> You notice all the Django form input elements gener
I'm using Django authentication for my http://phil4.com/sign_in page.
You notice all the Django form input elements generated on that page
don't validate
(They have a "/>" at the end rather than just ">".)
How fix!?
cs
--
You received this message because you are subscribed to the Google
Hi Marwan,
Another option that I'll investigate is Google Chart Tools / Image Charts (aka
Chart API) see http://code.google.com/apis/chart/
Regards
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Marwan Al-Sabbagh
Sent
u net .Net and it will cost
you (not sure if it will save you some money).
Regards
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Marwan Al-Sabbagh
Sent: 06 April 2011 16:59
To: django-users@googlegroups.com
Subject: Re: Django ap
mple
to validate user input for latitude & longitude. He actually use the
DecimalField and extends it with a clean method, checking that latitude values
to fall in -90 to 90 & longitude values to fall in -180 to 180.
Regards
Chris
From: django-users@googlegroups.com [mailto:django-users@goog
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of cootetom
Sent: 04 April 2011 15:31
To: Django users
Subject: Python Decorators
Hi all, not exactly a django question but here goes... I'm trying to
implement a decorator
to access. That
way, after logging in they will automatically go to that page.
How do this?
Chris
--
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 g
n's
help.
Regards
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Nge Nge
Sent: 01 April 2011 04:30
To: Django users
Subject: How to check the text field values are in my database or not ?
Hi All!
How can I check the t
there's no cacheing in front of the application server, if that's what
you're asking. The app server does do some cacheing on its own, but not
related to sessions or users.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Hi,
I liked this explanation/convention
http://forum.webfaction.com/viewtopic.php?id=4345 (I opted for this one).
If you want more consider django-css
https://github.com/dziegler/django-css#readme (I have not tried this).
Regards
Chris
-Original Message-
From: django-users
By using the Textarea widget:
class SomeForm(forms.Form):
description = forms.CharField(widget=forms.Textarea())
Regards
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of electrocoder
Sent: 31 March 2011 00:18
ral e.g.
'_x_' between model & column names]) as follows:
class Line(models.Model):
line_type= models.ForeignKey(Line_Type)
(PS: I prefixed 'zz' to the history table names so that pgAdmin lists them at
the end of, or after, the 'real' tables).
Regards
Chris
-Original Message-
When my Django system is under heavy load (system CPU > 90%), I start
getting complaints from users that their authentication changes in the
middle of a session. For example:
1) Bob logs in to the site. The site says "Hello Bob" at the top of
each page.
2) Bob uses the site for a while without
@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Russell Keith-Magee
Sent: 23 March 2011 12:47
To: django-users@googlegroups.com
Subject: Re: ANN: Django 1.3 released
On Wed, Mar 23, 2011 at 6:25 PM, Chris Matthews <ch...@bbd.co.za> wrote:
> I must add my SHA1 on Django-1
I must add my SHA1 on Django-1.3.tar.gz is
63e62f9a4834c1c8dbb591aac4ef2b1b84c5ea63 (on all of the downloads I did).
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Chris Matthews
Sent: 23 March 2011 12:20
To: django-users@googlegroups.com
Subject: RE
Well done! Thanks for all the hard work.
I downloaded my version from http://www.djangoproject.com/download/ and Chrome
says it comes from http://media.djangoproject.com/releases/1.3/Django-1.3.tar.gz
7zip says "Data error in Django-1.3.tar' File is broken". I have downloaded it
a few times
Ian
Thanks for the reply. Your solution makes perfect sense. My forms
are
automatically generated by Django via Form classes. So I can't
embed this suggested input element in any form element present in my
template.
Where should I put this code in since there is no form element?
cs
>
>
for the admin site and what does
that code look like?
Casey
On 03/17/2011 03:14 PM, chris hendrix wrote:
yeah the urls file looks fine... it only happens randomly but seems tied
to DEBUG=False for some reason... not sure why that would make a
difference.
On 03/17/2011 03:09 PM, werefr0g wrote:
Hi
yeah the urls file looks fine... it only happens randomly but seems tied
to DEBUG=False for some reason... not sure why that would make a difference.
On 03/17/2011 03:09 PM, werefr0g wrote:
Hi Bobby,
Maybe some mistake on your url.py, for example if you have an app
named "app" and a model
My Django app's html won't validate because CSRF middleware adds
hidden
tags like this...
The only problem is the slash "/>" at the end.
How make Django templates not automatically add hidden tags that won't
validate?
Thanks!
cs
--
You received this message because you are subscribed to
yeah we've followed all the instructions
On 03/10/2011 08:00 AM, pols wrote:
try re-installing thumbnail
easy_install sorl-thumbnail==3.2.5
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to
both of these are done and we're still getting the error.
On 03/10/2011 04:32 AM, pols wrote:
Check in settings.py installed apps for the entry
'satchmo_utils.thumbnail', If not istalled add this.If you are using
new version you may need to add {% endthumbnail %} in the templates
before closing
Hi Andre,
Also have a look at:
http://code.google.com/p/django-history-tables/
and
http://qr7.com/2010/10/django-simple-history-ftw/ by Corey Bertram based on
book ProJango by Marty Alchin Chapter 11 (page 263 onwards)
Regards
Chris
From: django-users@googlegroups.com [mailto:django-users
Typo
choices.append((item.name, item.name))
should be
choices.append((item.id, item.name))
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Mike Ramirez
Sent: 24 February 2011 14:10
To: django-users@googlegroups.com
Subject: Re: field choices() as queryset?
.html is shown because it matches:
(r'^blog/', include('anttipetaisto.blog.urls')),
and then
(r'^$','archive_index', dict(info_dict, template_name='blog/list.html')),
What URL do you enter when you get the error?
Regards
Chris
-Original Message-
From: django-users@googlegroup
sorry your right, I didn't receive any notification so I thought it
wasn't posted.
I've answered in the original thread
On Feb 21, 2:00 pm, Shawn Milochik wrote:
> Why are you re-posting this? You posted it over the weekend. I
> replied. If my reply didn't help, tell us the
The default (from the doc F00_set so: )
playerVital_set
and playerSkills_set
So I want the first set for each of them ...
(sorry for the double post by the way)
On Feb 20, 9:10 pm, Shawn Milochik wrote:
> What are the related_name values you gave to the foreign key fields
something obvious but I can't manage to find it in the doc.
Any pointers would be helpfull.
thanks,
Chris
Here my model
class Team(models.Model):
team_name = models.CharField(max_length=200)
city = models.CharField(max_length=200) #propably FK later
def __unicode__(self):
return
It also seems that the space preceding the caret ^ should not be there
So
^blog/ ^(?P\d{4})/$
Should be
^blog/^(?P\d{4})/$
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of jnns
Sent: 20 February 2011 03:07
To: Django users
of the sub model when looping players in the
team object?
Showing value of the player model work fine but not the sub model.
I tried various syntax but nothing seem to work.
Thanks,
Chris
Here are the model and the template i'm building :
model.py
class Team(models.Model):
team_name
you Chris Matthews for your reply.
I'm working on a online examination system. I could able to generate
some random questions from a data base containg hundreds of questions.
So when ever a user answer and submit those random questions a
dictionary contating a "Question_id and Answer&
Oh and you probably wanted:
if request.method=="POST":
data = request.POST
id_list = [int(x) for x in data.values()]
questions = MyModel.objects.filter(id__in = id_list)
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behal
Hi Balu,
Numeric data from the form must be converted to int. I suspect you wanted to
index data; not id_list.
if request.method=="POST":
data = request.POST
temp_list = data.keys()
id_list = []
for i in temp_list:
=False
Regards
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Matteius
Sent: 17 February 2011 08:47
To: Django users
Subject: How to Auto fill fields on Save in Django Admin?
I have an Announcement model that has two fields
://docs.djangoproject.com/en/1.2/topics/db/managers/ in case you should
consider using it (depending upon how much magic is required from your
function).
Regards
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of serek
Sent: 17 February 2011
,
required=True)
In your module
form = ProfileForm()
if not public:
form.fields['locations'].choices = LOCATION_CHOICES
Example 2 is a bit 'cleaner'/neater I think.
Regards
Chris
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf
401 - 500 of 1554 matches
Mail list logo