Re: Django use id=models.IntegerField(primary_key=True) as autokey

2019-07-03 Thread Piotr Duda
W dniu środa, 3 lipca 2019 03:34:30 UTC+2 użytkownik P O napisał:
>
> Hello,
> sorry if I am wrong, but I use somethig like:
> id=models.IntegerField(db_name="some_id", primary_key=True)
> and Django uses auto-key when I add objects this way:
> obj = Obj()
> obj.some_id= 1
> obj.save()
> obj = Obj()
> obj.some_id= 3
> obj.save()
> In default DB this objects have some_id=1 and some_id=2, There us no 
> errors, no warnings.
>
> Is it a bug? Without db_name works well. 
>


In python code use `id` not `some_id`. `some_id` is only used by django 
internally when talking to db server.

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ac9aaeff-a6ad-4d01-ab18-0b0525cf345c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django to exe ... windows executable

2019-07-03 Thread Mike Dewhirst

On 3/07/2019 3:03 pm, Balaji Shetty wrote:

Hello everyone

I want to can work my D jango application into exe  format  this 
application will run on windows machine my application have libraries 
and dependencies.


 There are lots of options which are available on web.
 which is the best option.


Either py2exe or pyoxidizer

I have used py2exe successfully some years ago but not pyoxidizer. It is 
new so the developer supporty will probably be quite good.




please help me

Thank you very much.  Have a good day



--
Mr Shetty Balaji
Asst. Prof.
IT Department
SGGS I&T
Nanded. My. India

--
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 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECSbOsZob4OvbxhChcdsLAN1JBw6EieVKGOsnsar3yVV5wYrw%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/93190799-c97a-191c-3c8d-ff7fba1cf56a%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: Django to exe ... windows executable

2019-07-03 Thread Roger Gammans
On Wed, 2019-07-03 at 19:42 +1000, Mike Dewhirst wrote:
>  web.
> >  which is the best option.
> 
> Either py2exe or pyoxidizer
> 
> I have used py2exe successfully some years ago but not pyoxidizer. It
> is 
> new so the developer supporty will probably be quite good.

There is also briefcase:
https://beeware.org/project/projects/tools/briefcase/

I've not used it ; so this isn't a recommendation; just a head up that
it exists; but does it seems to have explicit django support, if that's
important

-- 
Roger Gammans 
Gamma Science Ltd. (GB Nr. 07356014 )

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/56b99c6c22d18c86db375d93c8a514f65ac2561f.camel%40gammascience.co.uk.
For more options, visit https://groups.google.com/d/optout.


login page not working

2019-07-03 Thread KUMBHAGIRI SIVAKRISHNA
I entered username and password ,and click submit ,then it directs same login 
page with empty username and password columns,  logic is correct in views.py
Please help me ,give any suggestions to solve this issue
views.py:
==
from django.shortcuts import render ,redirect
from django.contrib import messages
from django.contrib.auth.models import User,auth
from django.contrib.auth import authenticate, login,logout
def Login(request):
if request.method=='POST':
username = request.POST['username']
password = request.POST['password']

user = auth.authenticate(username=username,password=password)

if user is not None:
auth.login(request, user)
return redirect('/')
else:
messages.info(request,'invalid credentials')
return redirect('Login')
else:
return render(request,'login.html') 




login.html:







Login



{% csrf_token %}







{% for message in messages %}
{{message}}
{% endfor %}





home.html:
===

{% if request.user.is_authenticated %}
Hello,{{user.first_name}}
Logout
{%else%}
Register
Login
{%endif%}


-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c2984d46-acfb-49a5-a93a-062797e98a23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: login page not working

2019-07-03 Thread Joe Reitman
Try debugging your view with a print statement. Print the username and 
password to see if those values are getting passed in.

On Wednesday, July 3, 2019 at 6:02:52 AM UTC-5, KUMBHAGIRI SIVAKRISHNA 
wrote:
>
> I entered username and password ,and click submit ,then it directs same 
> login page with empty username and password columns,  logic is correct in 
> views.py
> Please help me ,give any suggestions to solve this issue
> views.py:
> ==
> from django.shortcuts import render ,redirect
> from django.contrib import messages
> from django.contrib.auth.models import User,auth
> from django.contrib.auth import authenticate, login,logout
> def Login(request):
> if request.method=='POST':
> username = request.POST['username']
> password = request.POST['password']
>
> user = auth.authenticate(username=username,password=password)
>
> if user is not None:
> auth.login(request, user)
> return redirect('/')
> else:
> messages.info(request,'invalid credentials')
> return redirect('Login')
> else:
> return render(request,'login.html') 
>
>
> login.html:
> 
> 
> 
> 
> 
> 
> 
> Login
> 
> 
> 
> {% csrf_token %}
> 
> 
> 
> 
> 
> 
> 
> {% for message in messages %}
> {{message}}
> {% endfor %}
> 
> 
>
> home.html:
> ===
>
> {% if request.user.is_authenticated %}
> Hello,{{user.first_name}}
> Logout
> {%else%}
> Register
> Login
> {%endif%}
>
>
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1309851a-107a-429a-a012-33761a4ab38b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: login page not working

2019-07-03 Thread Aldian Fazrihady
Redirection should only be done on successful login.
Invalid login should directly render the form plus error message.

Regards,

Aldian Fazrihady

On Wed, 3 Jul 2019, 18:03 KUMBHAGIRI SIVAKRISHNA, 
wrote:

> I entered username and password ,and click submit ,then it directs same
> login page with empty username and password columns,  logic is correct in
> views.py
> Please help me ,give any suggestions to solve this issue
> views.py:
> ==
> from django.shortcuts import render ,redirect
> from django.contrib import messages
> from django.contrib.auth.models import User,auth
> from django.contrib.auth import authenticate, login,logout
> def Login(request):
> if request.method=='POST':
> username = request.POST['username']
> password = request.POST['password']
>
> user = auth.authenticate(username=username,password=password)
>
> if user is not None:
> auth.login(request, user)
> return redirect('/')
> else:
> messages.info(request,'invalid credentials')
> return redirect('Login')
> else:
> return render(request,'login.html')
>
>
>
>
> login.html:
> 
> 
> 
> 
> 
> 
> 
> Login
> 
> 
> 
> {% csrf_token %}
> 
> 
> 
> 
>
> 
> 
> {% for message in messages %}
> {{message}}
> {% endfor %}
> 
> 
>
>
>
> home.html:
> ===
>
> {% if request.user.is_authenticated %}
> Hello,{{user.first_name}}
> Logout
> {%else%}
> Register
> Login
> {%endif%}
>
>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c2984d46-acfb-49a5-a93a-062797e98a23%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAZPeeRZnXGsPryNQnv-iqe7nH6YLVFMNHsgiZDixP0qSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: login page not working

2019-07-03 Thread KUMBHAGIRI SIVAKRISHNA
Even I was entered wrong username and  wrong password  ,but it directs to
same login with empty spaces.

On Wed, 3 Jul 2019, 8:09 pm Aldian Fazrihady,  wrote:

> Redirection should only be done on successful login.
> Invalid login should directly render the form plus error message.
>
> Regards,
>
> Aldian Fazrihady
>
> On Wed, 3 Jul 2019, 18:03 KUMBHAGIRI SIVAKRISHNA, <
> kumbhagirish...@gmail.com> wrote:
>
>> I entered username and password ,and click submit ,then it directs same
>> login page with empty username and password columns,  logic is correct in
>> views.py
>> Please help me ,give any suggestions to solve this issue
>> views.py:
>> ==
>> from django.shortcuts import render ,redirect
>> from django.contrib import messages
>> from django.contrib.auth.models import User,auth
>> from django.contrib.auth import authenticate, login,logout
>> def Login(request):
>> if request.method=='POST':
>> username = request.POST['username']
>> password = request.POST['password']
>>
>> user = auth.authenticate(username=username,password=password)
>>
>> if user is not None:
>> auth.login(request, user)
>> return redirect('/')
>> else:
>> messages.info(request,'invalid credentials')
>> return redirect('Login')
>> else:
>> return render(request,'login.html')
>>
>>
>>
>>
>> login.html:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Login
>> 
>> 
>> 
>> {% csrf_token %}
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> {% for message in messages %}
>> {{message}}
>> {% endfor %}
>> 
>> 
>>
>>
>>
>> home.html:
>> ===
>>
>> {% if request.user.is_authenticated %}
>> Hello,{{user.first_name}}
>> Logout
>> {%else%}
>> Register
>> Login
>> {%endif%}
>>
>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/c2984d46-acfb-49a5-a93a-062797e98a23%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN7EoAZPeeRZnXGsPryNQnv-iqe7nH6YLVFMNHsgiZDixP0qSA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMM5N91jxrsoKsRWjYeWBJWJMR2V_%3DP6kJ3DdS8O%3DHJXXM5xtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


help

2019-07-03 Thread Tosin Ayoola
Good day guyz
sorry i'm working on a django e-commerce project which i am new to, and i'm
stuck, i wan have a page that will display the list of all for the list of
all products under a particular category, which i have checked out on
stackoverflow, i tried every suggestion and yet since not working below is
my code hoping anyone can lead mr in d right direction

##View

def index(request):
products = Product.objects.all()
category = get_list_or_404(Category)
cat = Category.objects.filter(pk = id)
return render(request, 'shop/index.html', locals())

##product_list Page
Categories
{% if cat %}

{% for c in cat %}

 {{c.name}}

{% for product in cat.get_product %}
 {(product.name}}
{% endfor %}
{% endfor %}

{% else %}
 There's no item category yet
{% endif %}


-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHLKn70PDKYwv30LhTsRaQEJ5V9mwE0xri-EdmwPp8ZoAC5nng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: help

2019-07-03 Thread Charlotte Wood
What is the name of the field in your model?  ie:  Title, Name, etc  so
one option would be product.title   or product.name

can you just put your model in here?


Charlotte Wood, MEd

Educator

(405) 578-5701

Zoom Meeting ID#: 4055785701

*Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912

Classroom Google Site:
https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home

Epic Technical Support: (405) 652-0935



Jordan McKesson Principal

405-749-4550 ext. 309

jordan.mckes...@epiccharterschools.org

 






On Wed, Jul 3, 2019 at 6:25 PM Tosin Ayoola  wrote:

> Good day guyz
> sorry i'm working on a django e-commerce project which i am new to, and
> i'm stuck, i wan have a page that will display the list of all for the list
> of all products under a particular category, which i have checked out on
> stackoverflow, i tried every suggestion and yet since not working below is
> my code hoping anyone can lead mr in d right direction
>
> ##View
>
> def index(request):
> products = Product.objects.all()
> category = get_list_or_404(Category)
> cat = Category.objects.filter(pk = id)
> return render(request, 'shop/index.html', locals())
>
> ##product_list Page
> Categories
> {% if cat %}
> 
> {% for c in cat %}
> 
>  {{c.name}}
> 
> {% for product in cat.get_product %}
>  {(product.name}}
> {% endfor %}
> {% endfor %}
> 
> {% else %}
>  There's no item category yet
> {% endif %}
> 
>
>
>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHLKn70PDKYwv30LhTsRaQEJ5V9mwE0xri-EdmwPp8ZoAC5nng%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPZR0N619g%2B4WKjJ5DsSKO55xnwa5aR1UfxE9YmKVRmDAVdCug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: help

2019-07-03 Thread Charlotte Wood
and, are you using a base.html?  and a form.html?  then customizing the
template for the product_view?



Charlotte Wood, MEd

Educator

(405) 578-5701

Zoom Meeting ID#: 4055785701

*Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912

Classroom Google Site:
https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home

Epic Technical Support: (405) 652-0935



Jordan McKesson Principal

405-749-4550 ext. 309

jordan.mckes...@epiccharterschools.org

 






On Wed, Jul 3, 2019 at 6:32 PM Charlotte Wood <
charlotte.w...@epiccharterschools.org> wrote:

> What is the name of the field in your model?  ie:  Title, Name, etc
> so one option would be product.title   or product.name
>
> can you just put your model in here?
>
>
> Charlotte Wood, MEd
>
> Educator
>
> (405) 578-5701
>
> Zoom Meeting ID#: 4055785701
>
> *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912
>
> Classroom Google Site:
> https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home
>
> Epic Technical Support: (405) 652-0935
>
>
>
> Jordan McKesson Principal
>
> 405-749-4550 ext. 309
>
> jordan.mckes...@epiccharterschools.org
>
>  
> 
> 
>
>
>
>
> On Wed, Jul 3, 2019 at 6:25 PM Tosin Ayoola 
> wrote:
>
>> Good day guyz
>> sorry i'm working on a django e-commerce project which i am new to, and
>> i'm stuck, i wan have a page that will display the list of all for the list
>> of all products under a particular category, which i have checked out on
>> stackoverflow, i tried every suggestion and yet since not working below is
>> my code hoping anyone can lead mr in d right direction
>>
>> ##View
>>
>> def index(request):
>> products = Product.objects.all()
>> category = get_list_or_404(Category)
>> cat = Category.objects.filter(pk = id)
>> return render(request, 'shop/index.html', locals())
>>
>> ##product_list Page
>> Categories
>> {% if cat %}
>> 
>> {% for c in cat %}
>> 
>>  {{c.name}}
>> 
>> {% for product in cat.get_product %}
>>  {(product.name}}
>> {% endfor %}
>> {% endfor %}
>> 
>> {% else %}
>>  There's no item category yet
>> {% endif %}
>> 
>>
>>
>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHLKn70PDKYwv30LhTsRaQEJ5V9mwE0xri-EdmwPp8ZoAC5nng%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPZR0N4xhpP0JLmFTQn_ogOztTAhj%2BKrP2kF-9DkxXK3NxXq8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: help

2019-07-03 Thread Tosin Ayoola
this' my model
from django.db import models
from django.shortcuts import reverse

class Category(models.Model):
name = models.CharField(max_length = 100, db_index = True)
slug = models.SlugField(max_length = 130, db_index= True, unique = True)
class Meta:
db_table = 'categories'
verbose_name = 'catergories'

def __str__(self):
return self.name

def get_absolute_url(self):
return reverse("category-detail", args=[self.slug])

def get_product(self):
return Product.objects.filter(category= self.name)


class Product(models.Model):
name = models.CharField(max_length = 100, db_index = True)
slug = models.SlugField(max_length= 100, db_index= True)
brand = models.CharField(max_length = 100)
available = models.BooleanField(default= True)
meta_keywords = models.CharField(max_length = 150, blank = True)
stock = models.PositiveIntegerField()
updated = models.DateTimeField(auto_now= True)
price = models.DecimalField(max_digits = 10, decimal_places = 2, default =
0.00)
image = models.ImageField(upload_to = 'product_imgs', blank = True)
best_seller = models.BooleanField(default=False)
category = models.ForeignKey(Category, on_delete = 'MODEL.CASCADE',
related_name='product')
description = models.TextField()
created = models.DateTimeField()

class meta:
db_name = 'Product'
ordering = [' -created']
index_together = (('id', 'slug'),)

def __str__(self):
return self.name

def get_absolute_url(self):
return reverse("product-detail", args= [self.slug,
self.created.year,
self.created.strftime('%m'),
self.created.strftime('%d')])

On Thu, Jul 4, 2019 at 12:33 AM Charlotte Wood <
charlotte.w...@epiccharterschools.org> wrote:

> and, are you using a base.html?  and a form.html?  then customizing the
> template for the product_view?
>
>
>
> Charlotte Wood, MEd
>
> Educator
>
> (405) 578-5701
>
> Zoom Meeting ID#: 4055785701
>
> *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912
>
> Classroom Google Site:
> https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home
>
> Epic Technical Support: (405) 652-0935
>
>
>
> Jordan McKesson Principal
>
> 405-749-4550 ext. 309
>
> jordan.mckes...@epiccharterschools.org
>
>  
> 
> 
>
>
>
>
> On Wed, Jul 3, 2019 at 6:32 PM Charlotte Wood <
> charlotte.w...@epiccharterschools.org> wrote:
>
>> What is the name of the field in your model?  ie:  Title, Name, etc
>> so one option would be product.title   or product.name
>>
>> can you just put your model in here?
>>
>>
>> Charlotte Wood, MEd
>>
>> Educator
>>
>> (405) 578-5701
>>
>> Zoom Meeting ID#: 4055785701
>>
>> *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912
>>
>> Classroom Google Site:
>> https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home
>>
>> Epic Technical Support: (405) 652-0935
>>
>>
>>
>> Jordan McKesson Principal
>>
>> 405-749-4550 ext. 309
>>
>> jordan.mckes...@epiccharterschools.org
>>
>> 
>> 
>> 
>> 
>>
>>
>>
>>
>> On Wed, Jul 3, 2019 at 6:25 PM Tosin Ayoola 
>> wrote:
>>
>>> Good day guyz
>>> sorry i'm working on a django e-commerce project which i am new to, and
>>> i'm stuck, i wan have a page that will display the list of all for the list
>>> of all products under a particular category, which i have checked out on
>>> stackoverflow, i tried every suggestion and yet since not working below is
>>> my code hoping anyone can lead mr in d right direction
>>>
>>> ##View
>>>
>>> def index(request):
>>> products = Product.objects.all()
>>> category = get_list_or_404(Category)
>>> cat = Category.objects.filter(pk = id)
>>> return render(request, 'shop/index.html', locals())
>>>
>>> ##product_list Page
>>> Categories
>>> {% if cat %}
>>> 
>>> {% for c in cat %}
>>> 
>>>  {{c.name}}
>>> 
>>> {% for product in cat.get_product %}
>>>  {(product.name}}
>>> {% endfor %}
>>> {% endfor %}
>>> 
>>> {% else %}
>>>  There's no item category yet
>>> {% endif %}
>>> 
>>>
>>>
>>>
>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAHLKn70PDKYwv30LhTsRaQEJ5V9mwE0xri-EdmwPp8ZoAC5nng%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -

Connecting to SQL Server

2019-07-03 Thread John Burke
Trying to connect to SQL Server from Django

DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'dbname',
'HOST': 'hostname',
'PORT': '',
'USER': 'user',
'PASSWORD': 'password',
'OPTIONS': {
'driver': 'ODBC Driver 13 for SQL Server',
},
}
}


I get the following error:
File "...\venv\lib\site-packages\sql_server\pyodbc\base.py", line 362, in 
init_connection_state
val = cursor.execute('SELECT SYSDATETIME()').fetchone()[0]
ValueError: hour must be in 0..23


-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/58c14df7-0b4e-49dd-a19e-11c1101ff947%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Connecting to SQL Server

2019-07-03 Thread John Burke
Getting the following error:

  File "...\venv\lib\site-packages\sql_server\pyodbc\base.py", line 362, in 
init_connection_state
val = cursor.execute('SELECT SYSDATETIME()').fetchone()[0]
ValueError: hour must be in 0..23

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4498b3d6-d65e-4ef2-a11d-82cddcd1b6a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django channels daphne static files

2019-07-03 Thread Sanjeev
Any fix to this problem or what could be the underlying issue here?
Got one today while trying to deploy to heroku
Help is appreciated 

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f6d47c26-4f59-4d80-9f75-2419d268a89a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to convert files from .bin to .png with Python or Django

2019-07-03 Thread Fernando Garrido Villalobos
How to create a function that have like argument the path of a .bin file 
and returns a .png file ...
I need your help, 
thank you so much.

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b74b0c80-3af6-4791-b010-751cfd47e373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to convert files from .bin to .png with Python or Django

2019-07-03 Thread Aldian Fazrihady
What kind of file is `.bin` file?

On Thu, Jul 4, 2019 at 6:52 AM Fernando Garrido Villalobos <
ferelise...@gmail.com> wrote:

> How to create a function that have like argument the path of a .bin file
> and returns a .png file ...
> I need your help,
> thank you so much.
>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b74b0c80-3af6-4791-b010-751cfd47e373%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.com

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAa%3D0GpUSodrDUe9h7SPMJippvtkbe-39n52bnq6Nzfh5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Polls app not showing?

2019-07-03 Thread Scott Winter
Ok so the images I attached to this comment are the view of the file path 
in my file explorer, which isn't consistent with the results of the tree 
command in "mysite". The files are there but I of course I don't see the 
polls app folders anywhere.

I entered the command you suggested and received the message "manage.py 
already exists, overlaying a project or app into an existing directory 
won't replace conflicting files"

And thanks for clearing up the virtual environment part. 

On Tuesday, July 2, 2019 at 11:02:32 PM UTC-4, Joe Reitman wrote:
>
> That looks really weird.
>
> Try running this command in a new folder exactly as shown.
> django-admin startproject polls_project .
>
> Remember to include a space and period after polls_ project. 
>
> It should create a directory structure like this in your new folder.
>
> .
>
> ├── manage.py
>
> ├── polls_project
>
> │   ├── __init__.py
>
> │   ├── settings.py
>
> │   ├── urls.py
>
> │   └── wsgi.py
>
> Most developers use a virtual environment when creating new projects. A 
> virtual env separates the dependencies between different projects. It is 
> not necessary for you to do that on your first project so don't worry about 
> it. You can always watch youtube tutorials on creating virtual envs later 
> on. 
>
> On Tuesday, July 2, 2019 at 9:25:35 PM UTC-5, Scott Winter wrote:
>>
>> Ok, attached a pic of the mysite folder and the other items inside. Polls 
>> 2 and 3 are my attempt at making another polls app. Feels like I'm missing 
>> something really simple here.
>>
>> On Sunday, June 30, 2019 at 11:06:54 PM UTC-4, Joe Reitman wrote:
>>>
>>> What does your project directory look like?
>>>
>>>
>>>
>>> On Sunday, June 30, 2019 at 8:29:02 PM UTC-5, Scott Winter wrote:

 Sorry, you'll have to be clearer than that. Not sure how to do that nor 
 how it relates to the issue

 On Friday, June 28, 2019 at 12:28:33 AM UTC-4, karthikvignesh28 wrote:
>
> Create virtual environment
>
> On Fri, Jun 28, 2019, 6:14 AM ScottW  wrote:
>
>> The server ran a few weeks ago before I ran into this issue. I used 
>> the run server command just now and now its not working. Interesting
>>
>> On Thursday, June 27, 2019 at 3:09:29 PM UTC-4, karthikvignesh28 
>> wrote:
>>>
>>>
>>>
>>> On Thursday, June 27, 2019 at 8:04:39 AM UTC+5:30, ScottW wrote:

 Hi, 

 I'm attempting to get started with Django and very first part of 
 the polls app. When I type "python manage.py startapp polls"  into the 
 Windows Powershell I don't see a folder for it in my file explorer 
 under 
 "mysite". Even stranger is that when I type 'tree' for this folder it 
 shows 
 that its on the computer, but there's nothing in it besides 
 'migrations' 
 and '_pycache_ '. Please refer to the screenshot attached for a 
 picture of 
 the Powershell code. If someone could help steer me in the right 
 direction 
 that would be great! 

>>>
>>>
>>>
>>> Can you run the server Without Creating a new app? 
>>>
>> -- 
>> 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...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/003f95c0-4e7d-4806-af90-6a4e9f6da018%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/007c5deb-a3b7-4ff5-a9c1-68f624cf7c5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: help

2019-07-03 Thread Charlotte Wood
OK, this is CLOSE and it may even workmaybe someone else can correct
it, because I may have category/product backwards, and I put a filter in
there so you can search for a product by attribute, but you'll have to
tweak it...

category_view.html

{% extends "base.html" %}
{% block content %}
 Products in a Category 

{{ object_list.form.as_p }}
  Search

{% for object in object_list.qs%}
{% include 'category-inline.html'%}
{% endfor %}
{% endblock %}




category_inline.html



  

{{object.name}}-{{object.slug}}
{% for product in object.category.category.all %}
{{product.name}}--{{product.slug}}--{{product.brand}}--
{{product.available}}{{product.stock}}
{% endfor %}


views.py

from .filters import ProductFilter

def category_view(request):
my_title = "Products"
qs = Category.objects.prefetch_related('category__category')
category_list = ProductFilter(request.GET, queryset=qs)
template_name = 'category_view.html'
context = {'object_list': category_list,"title":my_title}
return render (request, template_name, context)



filters.py


class ProductFilter(django_filters.FilterSet):
category__name =
django_filters.CharFilter(lookup_expr='icontains',label='Product Name
contains')
class Meta:
model = Product
fields = {
}


Charlotte Wood, MEd

Educator

(405) 578-5701

Zoom Meeting ID#: 4055785701

*Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912

Classroom Google Site:
https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home

Epic Technical Support: (405) 652-0935



Jordan McKesson Principal

405-749-4550 ext. 309

jordan.mckes...@epiccharterschools.org

 






On Wed, Jul 3, 2019 at 6:37 PM Tosin Ayoola  wrote:

> this' my model
> from django.db import models
> from django.shortcuts import reverse
>
> class Category(models.Model):
> name = models.CharField(max_length = 100, db_index = True)
> slug = models.SlugField(max_length = 130, db_index= True, unique = True)
> class Meta:
> db_table = 'categories'
> verbose_name = 'catergories'
>
> def __str__(self):
> return self.name
>
> def get_absolute_url(self):
> return reverse("category-detail", args=[self.slug])
>
> def get_product(self):
> return Product.objects.filter(category= self.name)
>
>
> class Product(models.Model):
> name = models.CharField(max_length = 100, db_index = True)
> slug = models.SlugField(max_length= 100, db_index= True)
> brand = models.CharField(max_length = 100)
> available = models.BooleanField(default= True)
> meta_keywords = models.CharField(max_length = 150, blank = True)
> stock = models.PositiveIntegerField()
> updated = models.DateTimeField(auto_now= True)
> price = models.DecimalField(max_digits = 10, decimal_places = 2, default =
> 0.00)
> image = models.ImageField(upload_to = 'product_imgs', blank = True)
> best_seller = models.BooleanField(default=False)
> category = models.ForeignKey(Category, on_delete = 'MODEL.CASCADE',
> related_name='product')
> description = models.TextField()
> created = models.DateTimeField()
>
> class meta:
> db_name = 'Product'
> ordering = [' -created']
> index_together = (('id', 'slug'),)
>
> def __str__(self):
> return self.name
>
> def get_absolute_url(self):
> return reverse("product-detail", args= [self.slug,
> self.created.year,
> self.created.strftime('%m'),
> self.created.strftime('%d')])
>
> On Thu, Jul 4, 2019 at 12:33 AM Charlotte Wood <
> charlotte.w...@epiccharterschools.org> wrote:
>
>> and, are you using a base.html?  and a form.html?  then customizing the
>> template for the product_view?
>>
>>
>>
>> Charlotte Wood, MEd
>>
>> Educator
>>
>> (405) 578-5701
>>
>> Zoom Meeting ID#: 4055785701
>>
>> *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912
>>
>> Classroom Google Site:
>> https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home
>>
>> Epic Technical Support: (405) 652-0935
>>
>>
>>
>> Jordan McKesson Principal
>>
>> 405-749-4550 ext. 309
>>
>> jordan.mckes...@epiccharterschools.org
>>
>> 
>> 
>> 
>> 
>>
>>
>>
>>
>> On Wed, Jul 3, 2019 at 6:32 PM Charlotte Wood <
>> charlotte.w...@epiccharterschools.org> wrote:
>>
>>> What is the name of the field in your model?  ie:  Title, Name, etc
>>> so one option would be product.title   or product.name
>>>
>>> can you just put your model in here?
>>>
>>>
>>> Charlotte Wood, MEd
>>>
>>> Educator
>>>
>>> (405) 578-5701
>>>
>>> Zoom Meeting ID#: 4055785701
>>>
>>> *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912
>>>
>>> Classroom Google Site:
>>> https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home
>>>
>>> Epic Technical Support: (405) 652-0935
>>>
>>>
>>>
>>> Jordan McKesson Principal
>>>
>>> 40

Deploying a static website

2019-07-03 Thread Django Dojo
I’ve created a static website in Django and i would like to know the cheapest 
and best way to design ploy it.

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: login page not working

2019-07-03 Thread Aldian Fazrihady
Your code shows you that it redirects on invalid login instead of
immediately rendering the same form plus error message.

On Wed, 3 Jul 2019, 23:04 KUMBHAGIRI SIVAKRISHNA, 
wrote:

> Even I was entered wrong username and  wrong password  ,but it directs to
> same login with empty spaces.
>
> On Wed, 3 Jul 2019, 8:09 pm Aldian Fazrihady,  wrote:
>
>> Redirection should only be done on successful login.
>> Invalid login should directly render the form plus error message.
>>
>> Regards,
>>
>> Aldian Fazrihady
>>
>> On Wed, 3 Jul 2019, 18:03 KUMBHAGIRI SIVAKRISHNA, <
>> kumbhagirish...@gmail.com> wrote:
>>
>>> I entered username and password ,and click submit ,then it directs same
>>> login page with empty username and password columns,  logic is correct in
>>> views.py
>>> Please help me ,give any suggestions to solve this issue
>>> views.py:
>>> ==
>>> from django.shortcuts import render ,redirect
>>> from django.contrib import messages
>>> from django.contrib.auth.models import User,auth
>>> from django.contrib.auth import authenticate, login,logout
>>> def Login(request):
>>> if request.method=='POST':
>>> username = request.POST['username']
>>> password = request.POST['password']
>>>
>>> user = auth.authenticate(username=username,password=password)
>>>
>>> if user is not None:
>>> auth.login(request, user)
>>> return redirect('/')
>>> else:
>>> messages.info(request,'invalid credentials')
>>> return redirect('Login')
>>> else:
>>> return render(request,'login.html')
>>>
>>>
>>>
>>>
>>> login.html:
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Login
>>> 
>>> 
>>> 
>>> {% csrf_token %}
>>> 
>>> >> placeholder="PASSWORD">
>>> 
>>> 
>>>
>>> 
>>> 
>>> {% for message in messages %}
>>> {{message}}
>>> {% endfor %}
>>> 
>>> 
>>>
>>>
>>>
>>> home.html:
>>> ===
>>>
>>> {% if request.user.is_authenticated %}
>>> Hello,{{user.first_name}}
>>> Logout
>>> {%else%}
>>> Register
>>> Login
>>> {%endif%}
>>>
>>>
>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/c2984d46-acfb-49a5-a93a-062797e98a23%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN7EoAZPeeRZnXGsPryNQnv-iqe7nH6YLVFMNHsgiZDixP0qSA%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMM5N91jxrsoKsRWjYeWBJWJMR2V_%3DP6kJ3DdS8O%3DHJXXM5xtg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAYOKYWGyOBdm8b6rPHPxNAjpnM063-jHiKjYNcg6KUzxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying a static website

2019-07-03 Thread Aldian Fazrihady
Why does a static website need help from a Python web app framework such as
Django?

On Thu, 4 Jul 2019, 08:47 Django Dojo,  wrote:

> I’ve created a static website in Django and i would like to know the
> cheapest and best way to design ploy it.
>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAabcZpKK_fDfaoHsHikdnmjJoLTkoz8cS-Yx%2BAzBRhxvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying a static website

2019-07-03 Thread Django Dojo
I’m just learning Django and was trying it out, but is it better to deploy
just using simple html, css and launch using a ftp

On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:

> Why does a static website need help from a Python web app framework such
> as Django?
>
> On Thu, 4 Jul 2019, 08:47 Django Dojo,  wrote:
>
>> I’ve created a static website in Django and i would like to know the
>> cheapest and best way to design ploy it.
>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%
>> 40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAN7EoAabcZpKK_fDfaoHsHikdnmjJoLTkoz8cS-Yx%
> 2BAzBRhxvw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANO9Ro_OJe1ykjVFhZrYr-bSTDzN6rOgY83FRT1LYYMVRAqTXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying a static website

2019-07-03 Thread Aldian Fazrihady
You can also use Amazon S3 to host static website.

Regards,

Aldian Fazrihady
http://aldianfazrihady.com

On Thu, 4 Jul 2019, 09:25 Django Dojo,  wrote:

> I’m just learning Django and was trying it out, but is it better to deploy
> just using simple html, css and launch using a ftp
>
> On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:
>
>> Why does a static website need help from a Python web app framework such
>> as Django?
>>
>> On Thu, 4 Jul 2019, 08:47 Django Dojo,  wrote:
>>
>>> I’ve created a static website in Django and i would like to know the
>>> cheapest and best way to design ploy it.
>>>
>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN7EoAabcZpKK_fDfaoHsHikdnmjJoLTkoz8cS-Yx%2BAzBRhxvw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANO9Ro_OJe1ykjVFhZrYr-bSTDzN6rOgY83FRT1LYYMVRAqTXA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAb9BK-M%2BM1wT5VpQuCQVyHXHzyVg44LyiZmOy39eKOqmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying a static website

2019-07-03 Thread Django Dojo
Thanks, but what do you think about Heroku?

On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:

> You can also use Amazon S3 to host static website.
>
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.com
>
> On Thu, 4 Jul 2019, 09:25 Django Dojo,  wrote:
>
>> I’m just learning Django and was trying it out, but is it better to
>> deploy just using simple html, css and launch using a ftp
>>
>> On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:
>>
>>> Why does a static website need help from a Python web app framework such
>>> as Django?
>>>
>>> On Thu, 4 Jul 2019, 08:47 Django Dojo,  wrote:
>>>
 I’ve created a static website in Django and i would like to know the
 cheapest and best way to design ploy it.

 --
 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.
 To post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%
 40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/CAN7EoAabcZpKK_fDfaoHsHikdnmjJoLTkoz8cS-Yx%
>>> 2BAzBRhxvw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/CANO9Ro_OJe1ykjVFhZrYr-bSTDzN6rOgY83FRT1LYYMVRAqTXA%
>> 40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAN7EoAb9BK-M%2BM1wT5VpQuCQVyHXHzyVg44LyiZmO
> y39eKOqmw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANO9Ro_6R70k5a8%3DaLVUD%3DjZLftQfKGVcfeDhQ3P_n1TAgOW%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying a static website

2019-07-03 Thread Aldian Fazrihady
I have never used heroku. By the way, I am using 500 MB of S3 space. I am
only billed 1 cent per month.

On Thu, Jul 4, 2019 at 9:45 AM Django Dojo  wrote:

> Thanks, but what do you think about Heroku?
>
> On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:
>
>> You can also use Amazon S3 to host static website.
>>
>> Regards,
>>
>> Aldian Fazrihady
>> http://aldianfazrihady.com
>>
>> On Thu, 4 Jul 2019, 09:25 Django Dojo,  wrote:
>>
>>> I’m just learning Django and was trying it out, but is it better to
>>> deploy just using simple html, css and launch using a ftp
>>>
>>> On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:
>>>
 Why does a static website need help from a Python web app framework
 such as Django?

 On Thu, 4 Jul 2019, 08:47 Django Dojo,  wrote:

> I’ve created a static website in Django and i would like to know the
> cheapest and best way to design ploy it.
>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 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.
 To post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAN7EoAabcZpKK_fDfaoHsHikdnmjJoLTkoz8cS-Yx%2BAzBRhxvw%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CANO9Ro_OJe1ykjVFhZrYr-bSTDzN6rOgY83FRT1LYYMVRAqTXA%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN7EoAb9BK-M%2BM1wT5VpQuCQVyHXHzyVg44LyiZmOy39eKOqmw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANO9Ro_6R70k5a8%3DaLVUD%3DjZLftQfKGVcfeDhQ3P_n1TAgOW%2Bw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.com

-- 
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.
To post to this group, s

Re: Deploying a static website

2019-07-03 Thread Nick Sarbicki
The best way to deploy a static website is certainly on a bucket like s3.
Heroku is massive overkill for this.

Django is also unnecessary to host a static website. I do have a CMS that
generates and uploads static websites built with Django, but not django
actually hosting the site.

On Thu, 4 Jul 2019, 04:29 Aldian Fazrihady,  wrote:

> I have never used heroku. By the way, I am using 500 MB of S3 space. I am
> only billed 1 cent per month.
>
> On Thu, Jul 4, 2019 at 9:45 AM Django Dojo  wrote:
>
>> Thanks, but what do you think about Heroku?
>>
>> On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:
>>
>>> You can also use Amazon S3 to host static website.
>>>
>>> Regards,
>>>
>>> Aldian Fazrihady
>>> http://aldianfazrihady.com
>>>
>>> On Thu, 4 Jul 2019, 09:25 Django Dojo,  wrote:
>>>
 I’m just learning Django and was trying it out, but is it better to
 deploy just using simple html, css and launch using a ftp

 On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:

> Why does a static website need help from a Python web app framework
> such as Django?
>
> On Thu, 4 Jul 2019, 08:47 Django Dojo,  wrote:
>
>> I’ve created a static website in Django and i would like to know the
>> cheapest and best way to design ploy it.
>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN7EoAabcZpKK_fDfaoHsHikdnmjJoLTkoz8cS-Yx%2BAzBRhxvw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 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.
 To post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CANO9Ro_OJe1ykjVFhZrYr-bSTDzN6rOgY83FRT1LYYMVRAqTXA%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAN7EoAb9BK-M%2BM1wT5VpQuCQVyHXHzyVg44LyiZmOy39eKOqmw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANO9Ro_6R70k5a8%3DaLVUD%3DjZLftQfKGVcfeDhQ3P_n1TAgOW%2Bw%40mail.gmail.com
>> 

Re: Deploying a static website

2019-07-03 Thread Dave Edwards
If you want a simple way that manages all the deployment then use
https://www.zappa.io/

Be warned- the IAM permissions for storage can be a pain (as with using
most of AWS)!

On Thu, 4 Jul 2019, 07:15 Nick Sarbicki,  wrote:

> The best way to deploy a static website is certainly on a bucket like s3.
> Heroku is massive overkill for this.
>
> Django is also unnecessary to host a static website. I do have a CMS that
> generates and uploads static websites built with Django, but not django
> actually hosting the site.
>
> On Thu, 4 Jul 2019, 04:29 Aldian Fazrihady,  wrote:
>
>> I have never used heroku. By the way, I am using 500 MB of S3 space. I am
>> only billed 1 cent per month.
>>
>> On Thu, Jul 4, 2019 at 9:45 AM Django Dojo  wrote:
>>
>>> Thanks, but what do you think about Heroku?
>>>
>>> On Wednesday, July 3, 2019, Aldian Fazrihady  wrote:
>>>
 You can also use Amazon S3 to host static website.

 Regards,

 Aldian Fazrihady
 http://aldianfazrihady.com

 On Thu, 4 Jul 2019, 09:25 Django Dojo,  wrote:

> I’m just learning Django and was trying it out, but is it better to
> deploy just using simple html, css and launch using a ftp
>
> On Wednesday, July 3, 2019, Aldian Fazrihady 
> wrote:
>
>> Why does a static website need help from a Python web app framework
>> such as Django?
>>
>> On Thu, 4 Jul 2019, 08:47 Django Dojo,  wrote:
>>
>>> I’ve created a static website in Django and i would like to know the
>>> cheapest and best way to design ploy it.
>>>
>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/c2c4536d-6de9-46c4-9c37-4a233f174803%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN7EoAabcZpKK_fDfaoHsHikdnmjJoLTkoz8cS-Yx%2BAzBRhxvw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANO9Ro_OJe1ykjVFhZrYr-bSTDzN6rOgY83FRT1LYYMVRAqTXA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
 --
 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.
 To post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAN7EoAb9BK-M%2BM1wT5VpQuCQVyHXHzyVg44LyiZmOy39eKOqmw%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit th