if you'd like to create a book you could have also tried:
def getBook(request, bookID):
try:
book = Books.objects.get(id=bookID)
catch Book.DoesNotExist:
#create book here
return render_to_response('book.html', {'book': book})
Not useful in this situation but I used it in one of my proje
Hello,
I've been wondering how django devs handle scheduled downtime? Do you
use a different urls.py to always redirect someone to a 'service
unavailable' page?
Or is there something fancy that you do?
Thanks,
--~--~-~--~~~---~--~~
You received this message becau
use session_messages http://code.google.com/p/django-session-messages/
I'm using it myself at yourxisity.com and it works fine :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
you might have to reset your database and do a fresh syncdb if you
have just added your "unique=True" bit.
On May 27, 9:10 pm, Bobby Roberts wrote:
> On May 27, 4:08 pm, Bobby Roberts wrote:
>
> > hi group... I thought slugs were unique, or supposed to be? Here's
> > what i'm doing:
>
> > in f
Are you sure you're using it correctly? i googled it and came up with
this which is the exact same position you're in.
This never actually applies a value to be converted but it still tries
and that's what causes the error (i think)
>>> import decimal
>>> d = decimal.Decimal()
>>> reload(decimal
The templates are basically your HTML pages. You need to write your
urls.py so that when a user visits a certain page, the view that
corresponds to that url is just a render_to_response with a path to
the HTML page. I can't really be bothered to explain it in detail but
once you get the hang of
you can't just add django funcationality to an already-made HTML
site. The whole site has to be moved on the django platform.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
The way I achieved this was to make my own registration form and use
this:
email = forms.EmailField(widget=forms.TextInput(attrs=dict
(attrs_dict,maxlength=75)),label=_(u'Email address'))
where attrs_dict was earlier defined as:
attrs_dict = { 'class': 'required' }
also, the email address isn't
I hope that doesn't mean storing the real password in a table in the
database :)
On Apr 4, 11:12 pm, Joshua Partogi wrote:
> On Apr 4, 11:49 pm, Masklinn wrote:
>
>
>
>
>
>
>
> > On 4 Apr 2009, at 15:38 , Joshua Partogi wrote:
>
> > > Dear all,
>
> > > I already take a look at the django.contri
You need to delete the model's tables from the database and then do
syncdb. Else you could use some of the django plugins that senses the
difference between the model and the existing database and then it
changes the database for you. google for django-extensions
On Apr 3, 2:14 am, jjgod wrote
On Apr 1, 3:16 pm, Митко Масарлиев wrote:
> soniiic wrote:
>
> > On Mar 31, 10:31 pm, Mitko Masarliev wrote:
>
> >> I have application with table name clients. Clients has one to one
> >> relation with django users and in all app logic I check clients id by
&g
On Mar 31, 10:31 pm, Mitko Masarliev wrote:
> I have application with table name clients. Clients has one to one
> relation with django users and in all app logic I check clients id by
> request.user.id, In some cases user_id is not same as clients_id. This
> is the problem, so I am trying to c
12 matches
Mail list logo