Hi all,
I have encountered following error in the django tutorial. It is a reverse
function error and the problematic line:
return HttpResponseRedirect(reverse('polls.views.results', args=(p.id,)))
In the "vote" view, I choose one of the choices, and click the vote button.
Instead of "results"
I think somebody just updated the tutorial document as
return HttpResponseRedirect(reverse('polls:results', args=(p.id,)))
Thanks..
--
26 Ocak 2013 Cumartesi 13:54:04 UTC+2 tarihinde Fatih Tiryakioglu yazdı:
>
> Hi all,
>
> I have encountered following error in the dj
Hello all,
Is there any shortcut for evaluating such a database table, or should I
collect myself all this information. Please help. If you prefer a package
which one do you prefer, or all of them is workable.
Thanks.
--
--
You received this message because you are subscribed to the Google
Hello all,
In Appendix B:Database API, it says "related_name (keyword) is particularly
useful if a model has two foreign keys to the same second model." which is
about 'related_name' keyword used reverse foreign key relationships.
e.g. blog = ForeignKey(Blog, related_name='entries').
What does
ignKey(Person, related_name='used_car')
>
> In case of not having a different related_name for each of those two
> relations, you wouldn't be able to get the person's car or the car this
> person uses. (This person may own a car but use his company car, or a
&g
Hi all,
Is there any shortcut (minimum db hit) for the following querysets:
p = Person.objects.get(mail="pers...@ex.com")
p.password & form.password comparison and it is ok.
#reversing to the person's groupregisteration, for example:
reg = p.groupregistration_set.all() #groupregistratin model is
ll take what is
> currently 1 + (number of group registrations for the user) queries and
> turn it into 2 queries:
>
> reg = p.groupregistration_set.all().select_related('group')
>
> More on select_related:
> https://docs.djangoproject.com/en/dev/ref/models/querys
Hi all,
I want to render back "user uploaded images" via template. I pass the
shortcuts to the template, but template can't show it: only small image
symbol. How can i show it up. I tryed some 'MEDIA_ROOT', 'MEDIA_URL'
settings, and read some info, but i couldn't figure out..
I appreciate your
'/unnamed/'
STATIC_ROOT = ''
STATIC_URL = '/static/'
What is wrong..
--
5 Nisan 2013 Cuma 20:26:40 UTC+3 tarihinde Navid Shaikh yazdı:
>
>
>
> On Friday, April 5, 2013 11:16:00 AM UTC+5:30, Fatih Tiryakioglu wrote:
>>
>> Hi all,
>>
&g
t;/home/mehmet/internet_projeleri/site4ust/unnamed/60830071673353216.jpg"
> />
> ...instead of...
> />
>
>
> On Fri, Apr 5, 2013 at 1:43 PM, Fatih Tiryakioglu
>
> > wrote:
>
>> Thank you.
>>
>> The shortcut of the picture:
>> /
And in the settings:
MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media'
MEDIA_URL = '/media/'
STATIC_ROOT = ' '
STATIC_URL = '/static/'
I have a template in
'/home/mehmet/internet_projeleri/site4ust/site4/templatelerim', which has
the following line:
http://groups.google.com/
.giris'),
url(r'^anasayfa/$', 'unnamed.views.anasayfa'),
url(r'^upload/$', 'unnamed.views.dosya_yukle'),
url(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)
What is the problem..
On
It doesn't work..
--
On Saturday, April 6, 2013 2:46:05 PM UTC+3, Avnesh Shakya wrote:
>
> try it..
>
> create one more folder media and put that media folder inside this new
> folder
> and then run..
>
> regards,
> Avnesh Shakya
>
> On Sat, Apr
at 4:11 PM, Fatih Tiryakioglu
> >
> wrote:
> > MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media'
> This is the absolute path to your media directory.
> > MEDIA_URL = '/media/'
> This means files/directories at MEDIA_ROOT directory
Hello,
In a html template file, how can I concatenate strings:
I find the solution below:
{% with "/media/"|add:"{{ i.no }}"|add:".jpg" as template_str %}
But
When I use: , template_str is /media/{{ i.no }}.jpg
How can I evaluate
/media/8778877
Thank you again Pankaj,
But evaluated string is just ".jpg" . "/media/" and i.no are absent..
On Sunday, April 7, 2013 12:16:34 PM UTC+3, psjinx wrote:
>
> On Sun, Apr 7, 2013 at 1:11 PM, Fatih Tiryakioglu
> >
> wrote:
>
> > {% with "/me
Hi all,
I have a jquery js code in a template like that:
jQuery(document).ready(function(){
jQuery("select").change(function(){
var str = $('select option:selected').text();
alert(str);
});
});
and, a select form which is handled by
Hi all,
How can I get distribution of values in a field? For example, I have the
scores below:
(score)
(raw1)1
(raw2)1
(raw3)3
(raw4)4
(raw5)4
(raw6)5
(raw7)8
(raw8)8
(raw9)9
(raw10)10
I want to have a resu
Thank you.
--
22 Kasım 2013 Cuma 18:07:47 UTC+2 tarihinde larry@gmail.com yazdı:
>
> On Fri, Nov 22, 2013 at 10:44 AM, Fatih Tiryakioglu
>
> > wrote:
>
>> Hi all,
>>
>> How can I get distribution of values in a field? For example, I have the
>&g
Hi all,
I want to render a static .txt file from django template, but I can't load
it. I tried some combinations. Here is some of them:
src="shortcut/to/text-file.txt"
How can I load the context of this file?
Thanks all.
Note: I can render static image files, so it
Hi all,
I want to render a static media .txt file from django template, but I can't
load it. Should I use database for text comments, or is it better statatic
text files like image files in media folder.
Any help is appreciated.
--
You received this message because you are subscribed to the
Hi all,
Could you please show me how can I render .txt static files (they are user
comments) in django template? I couldn't resolve that issue for a month..
I appreciate your help.
--
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsub
n your view
> 2. Read it into a context variable.
> 3. Render the context variable in your template
>
> On Thursday, January 30, 2014 3:29:29 PM UTC-6, Fatih Tiryakioglu wrote:
>>
>> Hi all,
>>
>> Could you please show me how can I render .txt static files (they
23 matches
Mail list logo