Take a look here:
https://nemec.lu/en/how-to/~django-nginx-uwsgi-ssl
It is not apache, but nginx + uwsgi app + django
wsgi.py is generated automatically by manage.py startproject
example is here:
https://github.com/lunemec/wysiwyg/blob/master/wysiwyg/wsgi.py
Note: this is the app that runs un
That depends, you could use django.db models to access that table,
but that depends on the table - there is a ton of information on this
subject here:
https://docs.djangoproject.com/en/dev/topics/db/models/
Or, you could write a custom SQL that would fetch exactly the data you
want, and
save
w if it would work..
I'm sorry but I don't have enough information to tell you more ...
On 07/16/2013 03:07 PM, Randa Hisham wrote:
my problem not to save to database but is how to get data from template
On Tue, Jul 16, 2013 at 3:03 PM, Lukas Nemec <mailto:lu.ne...@gmail.com>&
If you have some DB model where is the data saved, you can do this
from project.app.models import NameOfModel
# try this, but if it will not work, look at django models help
filtered_data =
NameOfModel.objects.filter(job_id___gt=29).filter(job_id__lt=401)
for d in filtered_data:
print d
Hi,
You are not the first to have trouble when serving images from django's
built-in server.
It is not only images, but all staticfiles.
I'd like to clarify your settings.py
The directory you have put in STATICFILES_DIRS will be available to
django as /static/ in your web app, but you need t
I meant like this:
views.py:
form = PersonActionsForm()
actions = form.fields['actions']
# set checked_choice to None
checked_choice = None
for choice in actions.choices:
# if choice.selected (confirm this against request.POST)
checked_choice = choice
return render_to_response(
Well, after some consideration,
result of a view is rendered HTML page which you send to browser,
what do you mean by rendering multiple templates?
are you talking about template inheritance = one root template which all
other templates use?
in that case, use {% extends 'root.html' %} tag,
or
Hi
I'd suggest you to contact the developers of Zinnia blog,
they should be able to help you easily
Cheers :)
Lukas
On 08/01/2013 10:50 AM, zhao yan wrote:
HELLOļ¼
I am a new django user
I want to display Chinese in my webpage
but it can't
this is my settings.py:
--
On 08/01/2013 03:04 PM, Harjot Mann wrote:
On Thu, Aug 1, 2013 at 6:10 PM, Lukas Nemec wrote:
Well, after some consideration,
result of a view is rendered HTML page which you send to browser,
what do you mean by rendering multiple templates?
are you talking about template inheritance = one
Exactly, tell us what is required on the page..
If it is a simple informational website, with some content, you can
either use django's staticpages, or some CMS
few examples:
https://www.django-cms.org/
https://github.com/lunemec/django-pages # I use this to run my own website
On 08/06/201
Well, this may not be the best idea
On a production server, you'd make it differently
Sure, you could do it this way, but Django should serve dynamic context,
so unless you are rendering images on your machine, you should use
Nginx, or apache to serve your images, aka. staticfiles/media
you'd
In that case, create a model in models.py, that represents your plot data..
add some data ...
and in views filter some data from that model ..
pass them to matplotlib
render to image
and either send back a image, or save the image and render html with
path to that image..
If you don't know how
+1
At least install some linux distro into VirtualBox, ... Ubuntu if you
are beginner...
I have W8 on my main machine, but for gaming mainly, for any serious
development get linux, on dualboot or vbox ... I tried to do it on
Windows, but once you smell the ease of things in linux, you'll
un
Why do you want apache? It is not as good as say Nginx with UWSGI or
gunicorn...
And there is a lot of information about this. ..
http://nemec.lu/en/how-to#django-nginx-uwsgi-ssl
enjoy
On 10/11/2013 05:40 PM, Diogene Laerce wrote:
Actually the default django server works but I can't get apache
On 10/21/2013 02:35 PM, Diogene Laerce wrote:
Hi,
Anyone could share a good process control system software name to use
with uwsgi ? Apart from supervisor, I couldn't make it work :
- can't stop it only kill it
- bug on supervisorctl reload.. Even when using the last version.
Thank you
Hi,
I
On 10/21/2013 02:51 PM, Diogene Laerce wrote:
Thanks for reply.
the trick is to add supervisor command that specifically tells the
program to NOT daemonize
[program:my_uwsgi]
command = /usr/local/bin/uwsgi -i /path/to/config.ini
autorestart = True
user = your_user
config.ini:
your standard u
You need to re-create your database.
Good way is to create a script that populates your DB with some test
data, and drop DB after a major change, or when something breaks, and
re-create it.
For now, you should try to create different DB (to preserve your data)
and do
python manage.py syncdb
17 matches
Mail list logo