Hello,
you need to make 'year' argument optional:
def student_reports(request, year=None):
year = year or datetime.date.today().year
...
Another option could be passing extra option to you view function:
Hola,
I have data across multiple years.
I want to run reports on a per year basis, so I have in my urls:
url(r'^students/reports/(?P\d{4})/$', student_reports,
name='student_reports'),
etc.
What I want to know though, is how to have this in the urls:
url(r'^students/reports/$',
I am using Django 1.3.1
I want to know in my application how much time is taken by a) database
access b) creation of XML c) other parts of code. What would be some good
tools to profile my application?
The code to be profiled is in django view and uses Django ORM and Python
2.6 and lxml to
As it happens I was looking into this yesterday because my request object
includes a couple of attributes that I would like to see listed in the
string representation of the request object.
Your LOGGING settings needs to have a fomatter entry that looks something
like:
'formatters': {
Hi,
It looks like something in filebrowser hasn't been updated to support
Django 1.4. The message_set attribute was marked as deprecated in Django
1.2, and removed completely in Django 1.4.
Instead of calling message_set, code should be calling the new
contrib.messages API.
Yours,
Russ Magee
AttributeError at /admin/filebrowser/browse/
'User' object has no attribute 'message_set'
/usr/local/lib/python2.7/dist-packages/filebrowser/views.py in browse
1.
request.user.message_set.create(message=msg)
installed: Django 1.4.1, drappelli, filebrowser.
Help me
Hi all,
I have defined my custom signupform as shown here.
http://docs.django-userena.org/en/latest/faq.html
I now want to query my custom defined profile as shown above and
retrieve a data(first_name) while the user is signed in. Once he signs
out that data is flushed out.
I see that with User
I would use geography. You never know from where the user is coming, so you
don't know the limitations of the projection. If you need extra
functionality you can always transform to the most appropriate projection.
2012/10/21 JJ Zolper
> Hello,
>
> So I've been
No, I'm afraid not. I didn't get any replies (nor to a StackOverflow
question http://stackoverflow.com/q/12041315/250962 ) and haven't gone
back to try again. I'd tried everything I could think of already. Good
luck, and let us know if you get anywhere!
-- Forwarded message --
Hi, thanks for reply, actually, i try to built a reminder application, a
person who logged in this apps, automatically set the user it self in
ordered_by field, without needing to set ordered_by field manually.
class Reminder(models.Model):
domain_name = models.CharField(max_length=40)
Hi, Phil! I faced the same problem. Do you find the solution?
вторник, 21 августа 2012 г., 22:24:59 UTC+7 пользователь Phil Gyford
написал:
>
> I'm writing integration tests using LiveServerTestCase/Selenium in
> v1.4.1. By default the process that's started by LiveServerTestCase
> uses a
11 matches
Mail list logo