ith anybody.
SECRET_KEY = 'mpizo)=nw5%bzy3@pp_)^%o1&+)_=$m^ai0wqtse&=e06b5=0z'
# List of callables that know how to import templates from various
sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directo
I will try it
在 2011年12月16日 上午12:25,Denis Darii 写道:
> You can view your js errors by pressing CTRL+SWIFT+J in Firefox but i
> highly recommend you to install Firebug addon which allow you to view also
> the received data from your ajax request.
>
>
> On Fri, Dec 16, 2011
ok": true}
>
> And then change this line in the JavaScript:
>
> if (data == 'OK') {
>
> to:
>
> if (data.ok) {
>
> I think it should work with those changes. If it doesn't, try checking the
> JavaScript console in your browser for any errors.
&g
rl displayDHM %}';
> } else {
> alert(data);
> }
> });
> });
>
>
>
> Please wait.
>
>
>
> I've also added a bit more to the
Hi,
Does anyone can help?
Here are all contents in my files, I tried variable ways, but when I
submit a form, it only return the please_wait page and then stay there
forever. There is no redirect happened.
Since I want to check if it works first, there is no actual
calculation in the code.
##
Hi all,
I have the problem for constructing waiting page using Django + ajax.
I followed instructions mentioned in the following link,
http://groups.google.com/group/django-users/browse_thread/thread/c1b0d916bbf86868.
However, when I run my program, it stops in http://127.0.0.1:8000/please_wait
an
Model:
class X(models.Model):
user = models.ForeignKey(User, blank=True, null=True)
x= other()
# I want to add current user when add X
Form:
class xForm(forms.ModelForm):
class Meta:
model = X
exclude = ('marker')
View:
def add_X(request):
print request.user
Suppose that you have a Section model that has a foreign key to
Magazine, and the field in the Section model is called magazine. You
can then do something like this once you get the section:
s = Section.objects.select_related.get()
s.magazine.id will return the id of the magazine, if it has a
I can't say that I know the answer since I haven't tried it, yet. In
the example that I referenced, the fields were defined and set in the
manipulator class.
You might be able to to do this as two different forms, that appear on
the same page, the javascript may update an ingredient model through
You can modify multiple models with the same view. I've managed to do
it, but involved creating my own manipulator. This isn't nearly as
scarry as it sounds, once you understand what's going on. I posted what
I did on a http://ssy5.blogspot.com/2006/11/taking-care-of-registration.html";>blog
. The
Thanks for the advice. I've checked that the settings.py file was saved
before syncing the database. The correct setting file is getting
loaded. And finally there is no problem with the PYTHONPATH. The
project is the first one shown when using '>>>sys.path'.
The tables that were created were:
aut
In the view you would need to check if the voter has already voted in
the poll. If the query is empty, then you can allow the person to vote,
if the query contains a record for a particular poll and a particular
voter, then you need to redirect them to an "You've already voted on
this poll" page.
As I'm relatively new to Django (I'm still reading through tutorials
and documentation), I was wondering how you managed user
authentication. I know that it can be managed throught the auth
package, but I was curious how you specifically handled it because I
think it was pretty neat.
--~--~-
I'm currently working through the tutorial using the lastest
development verison of django, downloaded from subversion. I've
installed django on an Ubuntu 6.06 linux box, and was wondering why I
wasn't prompted to create a super user account when I first tryed
'>manage.py syncdb'. I ask, because I
14 matches
Mail list logo