Hi Lucas,
Try moving the first novo=... Right after if request.method
Then dedent the else and the line following it (the second novo)
Then remove request.POST from the second novo
Explanation:
If the request method is not POST this will instanciate an unbound form that
loads the data from the
t;>
Hi Hendrik,
I did what you said but I got an error because the variable
"novo" is referenced before it's assignment.
My html of this view is:
{% csrf_token %}
{{ novo.as_p }}
2012/6/5 Hendrik Spei
Hi,
it seems that mysqldb is not installed.
Try installing python-mysqldb using apt.
If you are using a virtualenv then try this:
http://www.saltycrane.com/blog/2010/02/install-mysqldb-virtualenv-ubuntu-karmic/
Good luck!
hendrik
On 06/06/2012 09:56 PM, vinoth kumar renganathan wrote:
hi wh
and send this array to your django view
(assumed to
be at '/save_details/')
- in the view, access the list as
json.loads(request.POST.get('details', '[]')) and place it
into
request.session
As m
dropped node), put the detail of each node in the
details array.
- then json-encode and send this array to your django
view (assumed to
be at '/save_details/')
- in the view, access the li
Hi,
manage.py runserver is an embedded webserver for development and
debugging purposes only.
Do not use it in production!
Use mod_wsgi, uwsgi, gunicorn or sth. for production.
See: https://docs.djangoproject.com/en/dev/howto/deployment/
hendrik
On 06/09/2012 05:18 PM, Raitucarp wrote:
So,
Hi,
have a look at django-staticgenerator.
The original URL is no longer valid, but there is a fork here (but also
quite old):
https://github.com/timetric/django-staticgenerator*
*i hope that helps
*
*hendrik
*
*On 06/09/2012 04:06 PM, Gelonida N wrote:
Hi,
This is mostly out of curiousity.
Hi Raitucarp,
you can use the convert_to_south command to convert an existing app
(with existing database tables) to south.
In your case a
manage.py migrate ngobrol 0001 --fake
followed by a "manage.py migrate ngobrol" should fix your issue (given
that you ran south initially, before changin
Hi again,
can you verify that there are two migration scripts in your migrations
folder?
if yes, did you run manage.py migrate after the initial fake migration?
if not, i speculate, that you ran south only after you already changed
the models to include the aa column.
South needs to know the i
Hi,
as an alternative you can provide your own Storage implementation like
outlined here:
http://source.mihelac.org/2011/02/6/rename-uploaded-files-ascii-character-set-django/
Note: you may also need to override get_available_name to get it working
if i remember correctly.
hendrik
On 06/14/20
Hi,
django uses upload handlers to manage uploaded files.
In the default configuration, if the uploaded file is small, it is only
stored in memory at that point. Therefore, the uploaded file object does
not expose a temporary path as part of its public api.
When using a FileField/ImageField as par
Hi,
Accessing the request within models may be problematic ... E.g. when using a
management command, there is no request.
However, it's doable:
-implement a middleware that takes the request or request.user and stores it in
a thread local
-register this middleware in your settings
-in your mod
12 matches
Mail list logo