Try to use vim with plugins for django.
02.04.2012 1:48 пользователь "Mark Phillips"
написал:
> What IDE do you use/recommend for developing django web sites? Or, if not
> an IDE, what editor/setup is most useful? I am developing on Linux version
> 3.1.0-1-amd64 (Debian 3.1.8-2). I would rather u
You can add list_display = ['question', ] on your PollAdmin class.
2012/4/11 Romain Gaches :
> you just have to define a __unicode__ method [1] in your model
>
> [1]
> https://docs.djangoproject.com/en/1.4/ref/models/instances/#django.db.models.Model.__unicode__
>
>
> Le 11/04/2012 06:54, oneroler
Set request.session.modified = True
2012/4/24 sspross :
> Hi Joshua
>
> What was your solution here? It looks like I'm having the same kind of
> problem like you:
>
> http://stackoverflow.com/questions/10293467/losing-session-after-httpresponseredirect
>
> Thx!
>
> Regards,
> Silvan
>
> On Wednesd
You can get teacher and parents objects from student instance.
student.teacher and student.teachers.all()
01.05.2012 11:46 пользователь "LJ" написал:
> I have a Student model that stores information about a student,
> including the student's teacher.
> The teacher's information is stored in the E
First of all. Student.objects.filter(pk=id) returns QuerySet not
instance of Student.
If you want get current student use
get_object_or_404()(https://docs.djangoproject.com/en/1.4/topics/http/shortcuts/#get-object-or-404)
or Student.objects.get(pk=id).
Teacher and parents can bee retrived via Stud
Write at first line on your py file:
# -*- coding: utf-8 -*-
2012/5/1 dizzydoc :
> Hi ,
>
> i have lost a lot of time looking for a solution.
>
> My problem is, while i a reading csv in python using
>
> csv_file = open(path_file, "rb")
> reader = csv.reader(csv_file)
>
> whenever i perform any op
Use in __unicode__ method strftime
def __unicode__(self):
return "%s %s" % (self.name, self.date_created.strftime("%A %d %B")
Look at strftime:
http://docs.python.org/library/datetime.html?highlight=strftime#datetime.date.strftime
2012/5/2 Nikhil Verma :
> Hi All
>
> In models.py m
Your view should return an HttpResponse Object. Your view prints
'test' and returns NoneType Object.
Yours view should be like this:
from django.http import HttpResponse
def ajax(request):
return HttpResponse('test', mimetype="text/plain")
2012/5/5 doniyor :
> hi there,
> i have a small pr
you could include urls of app into your_app/urls.py
urlpatterns = patterns('',
(r'your_app/', include('your_apps.urls'))
(r'your_app2/', include('your_apps2.urls'))
)
2012/5/22 siddharth56660 :
> Hi,
> I
I think that the first method is the most usefull. On second method
some experience users can override hidden data. And it's a bad idea to
override __init__ and save method in my humble opinion/
2012/5/31 RM :
> Say there's a model:
>
> class Notification(models.Model):
> user = models.Foreign
For example on second method i can change post, board id's via html,
and write to board where i can be banned.
I think we shoudn't override standart methods if we con don't override
them(this about third method)
P.S. sorry for my terrible english.
2012/5/31 Kurtis Mullins :
>> On second method so
Try to use this library https://github.com/jeffkistler/django-decorator-include
2012/7/6 Gelonida N :
> I'd like to decorate all views in an include.
>
> Let's take for example:
>
> urlpatterns = patterns('',
> url(r'^decorated_admin/', include(admin.site.urls)),
> )
>
>
> Is there any way to
12 matches
Mail list logo