Not always sometimes you want to show some template code (You have a blog
about web dev) and sometimes you want to nest some code.
On Sun, Jan 11, 2009 at 10:04 PM, Diez B. Roggisch wrote:
> Alex K schrieb:
>
>> While building a website using template inheritance one usually does
>> the following
Thank You (I had the same question today)
2009/1/12 burcu hamamcıoğlu
> Thanks Bruno request.get_full_path() is enough for me .
>
> Best regards
>
> 09 Ocak 2009 Cuma 18:31 tarihinde bruno desthuilliers <
> bruno.desthuilli...@gmail.com> yazdı:
>
>
>>
>>
>> On 9 jan, 17:06, "burcu hamamcıoğlu"
Thanks Bruno request.get_full_path() is enough for me .
Best regards
09 Ocak 2009 Cuma 18:31 tarihinde bruno desthuilliers <
bruno.desthuilli...@gmail.com> yazdı:
>
>
>
> On 9 jan, 17:06, "burcu hamamcıoğlu" wrote:
> > Hi everybody,
> >
> > do you know how can i get request url in views.py.
> >
You'll find the perfect way for you to approach each stage of it I'm
sure.
I'm always into figuring out Use Cases the very first thing. I like
to establish at least 4 or 5 different major tasks that a user would
need/want to do, and then get these out of my head into a concrete
form (currently
2009/1/12 Jeremy Dunck
> My general approach is:
>
> URLs first, which helps me think through the various pages users will
> interact with.
> Roughly sketch those pages, think about features and models needed for
> reasonable normalization.
> Code models
> Implement views.
> Implement templates.
thanks David
On Jan 12, 11:53 am, "David Zhou" wrote:
> On Sun, Jan 11, 2009 at 10:25 PM, frank Shi wrote:
>
> > i use django 0.96 ,template render html string.
>
> > from django.utils.safestring import mark_safe
> > context=Context({
> > 'div1':mark_safe(obj),
> > })
> > return Ht
I have some fields on my page that have more than one attribute for
simplification, lets say two attributes
answer = {'txt':'something', 'allowblank':0}
laid out on the page as:
{% for answer in quiz_question.answers %}
{% endfor %}
the first is pulled from an input field, and if !allowbl
Hello django users
I am slightly confused with starting out
I just want to start with the initial index page
Do i need to create an app for that and then have views.py send me to
the index.html template
OR is this a bad way to do it
how do u handle the url where they just type in the www.website.c
On Sun, Jan 11, 2009 at 9:03 PM, AlexiPoliski wrote:
...
> What I would like to ask is, from more experienced Django developers,
> what way do you prefer to create your applications? Models then views
> then templates? Models then templates then views? Or models then views
> AND templates concurr
On Jan 11, 11:27 am, Brian Neal wrote:
> I wrote a filter that searches for patterns in text and replaces them
> with tags:
>
> {{ comment.text|smilify }}
>
> It does various silly things like replace :-) with an actual smiley
> face image. Seems to work great.
>
> When I combine it with the mar
On Sun, Jan 11, 2009 at 10:25 PM, frank Shi wrote:
>
> i use django 0.96 ,template render html string.
>
> from django.utils.safestring import mark_safe
> context=Context({
>'div1':mark_safe(obj),
>})
>return HttpResponse(template.render(context))
>
> it's error: No module named s
This is a call for opinion based on experience :)
I'm in the process of creating the models for my very first Django
application in my very first project. I have read the book up to and
including chapter 7 (everything i need to know to get started).
Naturally I have the design of the system I wa
i use django 0.96 ,template render html string.
from django.utils.safestring import mark_safe
context=Context({
'div1':mark_safe(obj),
})
return HttpResponse(template.render(context))
it's error: No module named safestring?why
already install python 2.5
--~--~-~--~~-
Hi,
Here's part of my code:
class NewAssignmentFormPreview(FormPreview):
def done(self, request, form):
assignment = form.save(commit=False)
assignment.save()
...
return HttpResponseRedirect(assignment.get_absolute_url())
I do an HttpResponseRedirect to go to the ass
> What version of Django are you using? The use of max_length instead of
> maxlength implies something later than 0.96 but the use of 'class Admin'
> implies something before 1.0. If you are using 1.0 or later 'class Admin'
> is not how admin defs are specified any more, see the admin doc for th
Thanks. This is exactly what I wanted.
On Jan 11, 5:36 pm, "Alex Koshelev" wrote:
> There is an application:http://code.google.com/p/django-batchadmin/
>
> On Sun, Jan 11, 2009 at 1:53 PM, sateeshk...@gmail.com
>
> wrote:
>
> > Hi,
> > I want to edit multiple records of users ( say selecting t
On Sun, Jan 11, 2009 at 7:19 PM, Bobby Roberts wrote:
>
> here's my model:
>
> from django.db import models
>
> class Testimonial(models.Model):
>active=models.IntegerField(max_length=11, blank=False)
>testimony=models.CharField(max_length=500)
>name=models.CharField(max_l
On Jan 12, 5:41 am, dahpgjgamgan wrote:
> In the 4-part tutorial on Django's main site, there's a lot of advice
> on how to decouple apps and projects, but when I look at the import
> statements in most of the tutorial's files, it's always "from
> projectname.appname import ." - not very
here's my model:
from django.db import models
class Testimonial(models.Model):
active=models.IntegerField(max_length=11, blank=False)
testimony=models.CharField(max_length=500)
name=models.CharField(max_length=75)
postdate = models.DateTimeField (auto_now_add=True
Hi,
In the 4-part tutorial on Django's main site, there's a lot of advice
on how to decouple apps and projects, but when I look at the import
statements in most of the tutorial's files, it's always "from
projectname.appname import ." - not very decoupled for me. Am
I missing something, is
On Sun, Jan 11, 2009 at 6:43 PM, Tipan wrote:
>
> Hi Ramiro,
>
> I'm using the latest development version of Django. Apache web server.
> MySqL/Mod_python, all served from same apache on my laptop.
>
> I get a 404 error when I put http:///jsi18n/ into the browser
> URL.
>
That's strange, are you
Thanks a lot dear Graham.
Alan
On Sun, Jan 11, 2009 at 20:56, Graham Dumpleton
wrote:
>
> Answered at:
>
> http://groups.google.com/group/modwsgi/browse_frm/thread/6af0cf98b726e5fe
>
> Graham
>
> On Jan 11, 11:59 pm, Alan wrote:
> > Oops, I found something. I am using apache2 + mod_wsgi and I n
Answered at:
http://groups.google.com/group/modwsgi/browse_frm/thread/6af0cf98b726e5fe
Graham
On Jan 11, 11:59 pm, Alan wrote:
> Oops, I found something. I am using apache2 + mod_wsgi and I notice that
> instead of using my Fink python ('/sw/bin/python') it's using my mac python
> ('/usr/bin
Hi Ramiro,
I'm using the latest development version of Django. Apache web server.
MySqL/Mod_python, all served from same apache on my laptop.
I get a 404 error when I put http:///jsi18n/ into the browser
URL.
Rgds, Tim
--~--~-~--~~~---~--~~
You received this mess
While building a website using template inheritance one usually does
the following:
fetch from database
fetch from some more data from database
... << more required computations
then at the end render the template with the fetched data
Without template inheritance one usually does the following:
I wrote a filter that searches for patterns in text and replaces them
with tags:
{{ comment.text|smilify }}
It does various silly things like replace :-) with an actual smiley
face image. Seems to work great.
When I combine it with the markdown filter, like this:
{{ comment.text|markdown:"saf
On Sun, Jan 11, 2009 at 2:48 PM, Tipan wrote:
>
> I'm having a problem accessing Javascript Translation catalog whilst
> converting my site to multi-language. As suggested in the docs, I have
> added the following to my applications top level urls file.
>
>
> js_info_dict = {
>'packages': ( '
I'm having a problem accessing Javascript Translation catalog whilst
converting my site to multi-language. As suggested in the docs, I have
added the following to my applications top level urls file.
js_info_dict = {
'packages': ( 'myapp.myproject',),
}
(r'^jsi18n/$', 'django.views.i18n.jav
Django is starting to gain more traction and I do believe we'll start
to see a bit more of a hockey stick effect on it's adoption over the
coming months. 1.0 being released last year and (at least part-wise)
adoption by the Google AppEngine have both been great PR events for
Django but I'd also a
Solving my own problem... This wasn't nearly as hard as I thought,
here's the solution that worked for me:
urls.py
#
from datetime import datetime, timedelta
from django.conf.urls.defaults import *
from django.contrib.comments.views import comments
...others...
def remember_wrapper(fn):
On Sun, Jan 11, 2009 at 10:33 AM, Artem Skvira wrote:
>
> Hi all,
>
> I've stumbled upon strange behaviour in django: when declaring form/
> widget with class Media, ie.:
>
> class AddressForm(ModelForm):
>streetNo = forms.CharField()
>...
>
>class Meta:
>...
>
>class Medi
Hi all,
I've stumbled upon strange behaviour in django: when declaring form/
widget with class Media, ie.:
class AddressForm(ModelForm):
streetNo = forms.CharField()
...
class Meta:
...
class Media:
js = ('prototype.js', )
I get tons of javascript inclusions re
On Sun, 2009-01-11 at 03:41 -0800, Flo Ledermann wrote:
> Hi all,
>
> I just bumped into a problem I can't resolve: after adding the {%
> debug %} template tag to one of my templates (no other changes), I get
> the following error message:
>
> TemplateSyntaxError at /art/
>
> Caught an exceptio
Oops, I found something. I am using apache2 + mod_wsgi and I notice that
instead of using my Fink python ('/sw/bin/python') it's using my mac python
('/usr/bin/python').
I compiled mod_wsgi with fink python, even though I had to put something
like:
WSGIDaemonProcess webapps user=alan group=staff p
Many thanks Steve. I thought I had designed my apps bulletproof for local
setups but I clearly failed.
Thanks a lot again.
Cheers,
Alan
On Sat, Jan 10, 2009 at 21:47, Steve Potter wrote:
>
>
>
> On Jan 10, 3:44 pm, Alan wrote:
> > Hello List,
> > So, using django server por development and my
Hi List,
I have this problem now. It's about a form in my models.py that works as
expected when testing with django server but when testing with apache sever
(all in the same machine, mac osx leopard) it does not work as desired.
class GridJobForm(forms.Form):
file = forms.FileField(help_text
There is an application:
http://code.google.com/p/django-batchadmin/
On Sun, Jan 11, 2009 at 1:53 PM, sateeshk...@gmail.com
wrote:
>
> Hi,
> I want to edit multiple records of users ( say selecting the user
> records which I want to edit ) and then say if I press
> activate button, all the rec
Oh, I should probably add that I am using
# coding=utf-8
on some of my source files, because they contain unicode default
values etc.
Flo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Thank you both,
one more thing...
I think it's a very common situation, isn't it?
I mean, if you don't use apps inside your project, you have to manage
the case of different versions of the same app.
But I found only few posts about that, I wonder why?
Do I have to put django-cms in every project?
Hi all,
I just bumped into a problem I can't resolve: after adding the {%
debug %} template tag to one of my templates (no other changes), I get
the following error message:
TemplateSyntaxError at /art/
Caught an exception while rendering: 'ascii' codec can't encode
character u'\u2019' in posit
On 10 jan, 18:56, rabbi wrote:
> Hi,
> I'm trying to write a generic filter function do something like
> following:
>MyModel.objects.filter( getattr(???,my_dict['search_field']
> +'__iexact')=my_dict['search_value'] )
>
> But I don't know what to put in place of '???'
> Where does 'field_
Hi,
I want to edit multiple records of users ( say selecting the user
records which I want to edit ) and then say if I press
activate button, all the records status should change to 'ACTIVE'.
To do this kind of thing, is there any simple tweak in admin model
or admin templates ?
If some one
On Jan 11, 7:59 pm, Ben Eliott wrote:
> Hi Graham,
> Just following up on this thread. I replied with some details, but
> maybe you missed those, or maybe i missed your reply. Or maybe this
> isn't worth it and i should stop being lazy and just write out the
> VirtualHost files :)
I miss
On Sun, 2009-01-11 at 01:53 -0800, Matt Welch wrote:
> I appreciate it. Thank you.
>
> I tried the examples you said and ran into one problem on the first
> ( happened in the second, but fixed ).
>
> On Jan 11, 3:12 am, Malcolm Tredinnick
> wrote:
> > On Sun, 2009-01-11 at 00:11 -0800, juice wr
Hi Rex, I came across this same problem and fixed it by editing the
registry like this:
Go to HKEY_CLASSES_ROOT and find .py
Change its (Default) setting to Python.File
Mine was set to py_auto_file when I associated the extension through
Windows.
Anyway, that got django-admin.py running right.
I appreciate it. Thank you.
I tried the examples you said and ran into one problem on the first
( happened in the second, but fixed ).
On Jan 11, 3:12 am, Malcolm Tredinnick
wrote:
> On Sun, 2009-01-11 at 00:11 -0800, juice wrote:
> > > > I then figured it may run into a loop of saving the same
Hi,
I was wondering if anyone has taken a look at Live Contacts API at
http://msdn.microsoft.com/en-us/library/bb463989.aspx
I can get through step 1 i.e. Delegated Authentication. An exception
is being raised when urllib2 calls the open function. The nature of
the Error is 403 forbidden excepti
On Sun, 2009-01-11 at 00:11 -0800, juice wrote:
> > > I then figured it may run into a loop of saving the same model, so i
> > > was going to use signals but ran into the same issue that it would
> > > still need to be in the save function.
> >
> > Are you talking about the infinite loop problem h
Hi Graham,
Just following up on this thread. I replied with some details, but
maybe you missed those, or maybe i missed your reply. Or maybe this
isn't worth it and i should stop being lazy and just write out the
VirtualHost files :)
Ben
On 23 Dec 2008, at 01:13, Graham Dumpleton wrote:
>
> > I then figured it may run into a loop of saving the same model, so i
> > was going to use signals but ran into the same issue that it would
> > still need to be in the save function.
>
> Are you talking about the infinite loop problem here? I don't understand
> this paragraph.
Yes sir, after
50 matches
Mail list logo