Re: Django deployment

2015-09-17 Thread Hugo Kitano
What is the nginx config? And where do I find it? On Tuesday, September 15, 2015 at 12:46:40 PM UTC-7, Shawn Milochik wrote: > > It's very simple. Just follow these instructions: > > http://milocast.com/flasknginx.html > > Instead of the final line (gunicorn filename:appname -b 127.0.0.1:),

Re: Django deployment

2015-09-17 Thread Hugo Kitano
I'm having trouble deciphering what a APPMODULE is: $(MODULE_NAME):$(VARIABLE_NAME) What does Module_Name and Variable_NAME refer to in the context of a Django project named "stats"? Thanks On Tuesday, September 15, 2015 at 1:02:59 PM UTC-7, Michiel Overtoom wrote: > > Hi Hugo, > > > I keep

Django deployment

2015-09-15 Thread Hugo Kitano
Hi, I'm a Django newbie, and I'm trying to decide how to deploy my small Django project. I've read into a few options, but I keep hearing that Django deployment is unnecessarily difficult. For a website with very little traffic, and for somebody who's new to it all, what is the best way to

Re: HTTPS instead of HTTP in view

2015-09-14 Thread Hugo Kitano
This is my settings.py, but I've commented out all the code I added -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.

HTTPS instead of HTTP in view

2015-09-14 Thread Hugo Kitano
Only one view in my project uses HTTPS instead of HTTP, now, after me fooling around with SSL's and cookies and such. My view for that project is simple enough that it isn't the problem It's the home page of the project. Any ideas for why only one view uses HTTPS? I can't use the view in

Sending a FileField attachment by email

2015-09-09 Thread Hugo Kitano
I'm having problems sending a FileField attachment via email. This should send an email, but doesn't. Is there something I have to configure in my gmail account for this to work? settings.py: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_USE_TLS = True EMAIL_HOST

Form with MultipleChoiceField

2015-08-31 Thread Hugo Kitano
Hi, Django beginner here. I'm trying to use a form with a MultipleChoiceField, but any choice that is selected doesn't seem to be processed. Here is my form (very simple): Here is my view: And here is my template, which I'm sure is correct. I notice there is a problem since when I

Re: Forms questions

2015-08-25 Thread Hugo Kitano
2015 at 10:10:30 AM UTC-7, Hugo Kitano wrote: > > Here it is, very simple: > > Submit form: > > {% csrf_token %} > {{ form.as_p }} > > > > > > On Monday, August 24, 2015 at 4:31:47 PM UTC-7, Sait Maraşlıoğlu wrote: >> >> Can you prov

Re: Using ModelForms

2015-08-25 Thread Hugo Kitano
25, 2015, at 14:16, Hugo Kitano wrote: > > Noted. "/stat/s" is an index page. Here is what my urls.py looks like. > Also, by using print statements, I've realized that the request.method is > always GET, not POST, which makes it so no model instance is ever saved. >

Re: Working with FileFields/FieldFiles

2015-08-25 Thread Hugo Kitano
> > On Fri, Aug 21, 2015, at 14:28, Hugo Kitano wrote: > > Hi, I'm a beginner with Django, and I'm trying to figure out how to work > with FieldFiles. > > One of my models has a FileField in which the user must submit a .bed > file. I use another library in pyth

Re: Using ModelForms

2015-08-25 Thread Hugo Kitano
On Monday, August 24, 2015 at 3:29:40 PM UTC-7, Hugo Osvaldo Barrera wrote: > > > On Mon, Aug 24, 2015, at 16:41, Hugo Kitano wrote: > > I'm actually now pretty certain that my html file is what's causing it to > not work > > > > Including your message as

Re: Forms questions

2015-08-25 Thread Hugo Kitano
Here it is, very simple: Submit form: {% csrf_token %} {{ form.as_p }} On Monday, August 24, 2015 at 4:31:47 PM UTC-7, Sait Maraşlıoğlu wrote: > > Can you provide the template code? > > > On Tuesday, 25 August 2015 00:16:40 UTC+3, Hugo Kitano wrote: >&

Forms questions

2015-08-24 Thread Hugo Kitano
Hi, I'm trying to figure out what's wrong with my form: I've noticed that every time I load my submit view, the request.method is GET not POST, so nothing gets saved to the database. Here's views.py models.py Thanks!! -- You received this message because you are subscribed to the Google

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
Also, it looks like the request.method is always 'GET', not 'POST', which means the form is never saved. How is this happening? On Monday, August 24, 2015 at 12:56:39 PM UTC-7, Hugo Kitano wrote: > > More specifically, what does the action="/stats/" field do and require? >

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
More specifically, what does the action="/stats/" field do and require? On Monday, August 24, 2015 at 12:41:16 PM UTC-7, Hugo Kitano wrote: > > I'm actually now pretty certain that my html file is what's causing it to > not work > > > > On Monday, August 24,

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
I'm actually now pretty certain that my html file is what's causing it to not work On Monday, August 24, 2015 at 11:34:41 AM UTC-7, Hugo Kitano wrote: > > It always redirects to the stats page, though the model instance isn't > saved. > I suspect it has to do with the .save() fun

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
It always redirects to the stats page, though the model instance isn't saved. I suspect it has to do with the .save() function, but I can't tell why, since I even create the modelform in the views.py file. Thanks, Hugo On Saturday, August 22, 2015 at 3:19:07 AM UTC-7, James Schneider

Working with FileFields/FieldFiles

2015-08-21 Thread Hugo Kitano
Hi, I'm a beginner with Django, and I'm trying to figure out how to work with FieldFiles. One of my models has a FileField in which the user must submit a .bed file. I use another library in python to analyze the .bed file. The .bed file is saved to a specific directory on disk, and I want

Re: Using ModelForms

2015-08-21 Thread Hugo Kitano
rint > {{form.errors}} in your template to check. > > > Shouldn't {{ form.as_p }} include errors as well? This seems to be what > the doc indicates: > > > https://docs.djangoproject.com/en/1.8/topics/forms/#working-with-form-templates > > > On Thu, Aug 20, 2015

Re: Using ModelForms

2015-08-20 Thread Hugo Kitano
Could you elaborate on my form has some error? On Thursday, August 20, 2015 at 1:43:32 PM UTC-7, Edgar Gabaldi wrote: > > The code seems right. Probably your form has some error. Try print > {{form.errors}} in your template to check. > > On Thu, Aug 20, 2015 at 4:45 PM, Hu

Using ModelForms

2015-08-20 Thread Hugo Kitano
Hi, I'm a beginner using Django, and I'm having trouble using model forms to create instances of my model. When a user submits a form, the database saves nothing. Here's my code for the view def submit(request): SubmissionForm = modelform_factory(Submission, fields=('sub_name', 'sub_file'))