RE: Django IIS windows

2020-06-04 Thread gurmeetkaurjuneja23
This guy has explained it all and that too step by step. May be you could refer 
to this link – 

 

https://www.mattwoodward.com/2016/07/23/running-a-django-application-on-windows-server-2012-with-iis/

 

Thanks,

Gurmeet Kaur

IT  Developer cum Consultant

 

From: django-users@googlegroups.com  On Behalf 
Of Larry Martell
Sent: June 4, 2020 10:11 PM
To: django-users@googlegroups.com
Subject: Re: Django IIS windows

 

On Thu, Jun 4, 2020 at 10:05 PM Giovanni Silva mailto:gmr...@gmail.com> > wrote:

Hello. 

 

I need help to set up my Django Project in my IIS server. 

 

Does anyone has a tutorial or a link to help me to configure it?

 

I did this once and it was incredibly painful. If there is any way you can 
deploy on Linux do so. It will improve your quality of life immeasurably.  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY5p7wFtmKZ%2BE4Tmmsf9bDdPh86QHFKQaEOLtG0yGt%3D-jA%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/000a01d63aeb%2450a192a0%24f1e4b7e0%24%40gmail.com.


Re: Django IIS windows

2020-06-04 Thread Larry Martell
On Thu, Jun 4, 2020 at 10:05 PM Giovanni Silva  wrote:

> Hello.
>
> I need help to set up my Django Project in my IIS server.
>
> Does anyone has a tutorial or a link to help me to configure it?
>

I did this once and it was incredibly painful. If there is any way you can
deploy on Linux do so. It will improve your quality of life immeasurably.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACwCsY5p7wFtmKZ%2BE4Tmmsf9bDdPh86QHFKQaEOLtG0yGt%3D-jA%40mail.gmail.com.


Django IIS windows

2020-06-04 Thread Giovanni Silva
Hello.

I need help to set up my Django Project in my IIS server.

Does anyone has a tutorial or a link to help me to configure it?

-- 
*Giovanni Silva*
(31) 9 9532-1877

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABO2r9foeOLuw76cvoqT%3DbuYC6DWhYHAg_4wFb7WaiDKtYT4qQ%40mail.gmail.com.


Re: Deciding on Database

2020-06-04 Thread RLM

Hello

I am a 25 year python dev working with Flask and Django experience and 
this is totally off topic but may I suggest you look at Hugo the static 
web site generator in the Go language.

It is easy to use, easier than some pythonic web site generators.

Easy to modify and update and is essentially ready to use and can be 
fully manipulated to do what you want. I used this system on AWS for a 
Australian national web site and find updating documents and comments is 
very simple, plus no one  can modify anything unless you grant express 
permissions. Plus you can decide whether it becomes public or private 
with the click of a checkbox.


Used in conjunction with AWS S3 buckets  it provides, for us, a very 
workable system. With AWS security the site is entirely safe.


My utmost apologies to the Python, Django community but sometimes other 
tools are worth looking at.


Roger



On 4/6/20 1:40 pm, Rushikesh Patil wrote:

Hello everyone, Hope you are doing well.

I am building a website with django which will be used to view 
different documentation related to the construction industry, in an 
easy to use and share format.


The main viewer page will have a vertical nav bar with different 
chapters and sections. And the right side will be the content.


What I am trying to figure out is instead of doing a hardcoded HTML 
css static file, use the database to create a html file . What do you 
think is the best way to go about ir. I thought about it a lot and the 
problems I see is where there are lists/tables/images in content. I am 
having a hard time deciding what models should I create.


Please see attached for what I am trying to build.
--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eca1e72f-7b8f-4d14-884f-d7a3b2d67491%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f8609fd2-849a-7d5c-5f65-4d7a0046f71f%40gmail.com.


Re: Possible Django bug I am considering raising

2020-06-04 Thread Tim Graham
You can try to find the commit that introduced the issue: 
https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression

On Thursday, June 4, 2020 at 11:25:09 AM UTC-4, OwlHoot wrote:
>
> Hi all
>
> I believe the issue I have enquired about on the following Stack Exchange 
> page :
>
>
> https://stackoverflow.com/questions/62162288/baffling-error-filtering-django-objects-of-derived-class-by-values-in-foreign-ke
>
> may well be a Django bug, or at the least no longer works with Django as 
> this has evolved since v 1.10 (when it worked fine).
>
> In summary, the issue is that if a model class B inherits from A, which 
> inherits from models.model, then a call to B.objects.filter() cannot locate 
> a field actually defined in B (because, it seems, Django starts its walk 
> through the relevant/related models from A rather than B and for some 
> unfathomable reason checks everything _except_ B !)
>
> Regards
>
> John R Ramsden
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ce8987ee-a001-47bd-8d74-2d1b8469da25o%40googlegroups.com.


Media Filename Manipulation

2020-06-04 Thread Desmond Nyamador
Hi, 
I have my images uploaded to Google Cloud Storage which invokes a function to 
provide three variations of my image. I'd like to know how I can manipulate my 
image name in the template from the default say {{ foo.image.url }} that 
results in media/foo.jpg to media/foo_200x200.jpg

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f6f59c4-3230-46bd-a6a0-035ba49a72cd%40googlegroups.com.


Re: Any free MAP API available

2020-06-04 Thread RANGA BHARATH JINKA
import pgeocode
import folium


'''
Provide a Country code and postal code.
It will generate a map in a html file based on these details.
Used pgeocode and folium packages.
'''

def zipcode_to_map(country_code, postal_code):
country_code = pgeocode.Nominatim(country_code)

zip_code = country_code.query_postal_code(postal_code)

postal_code = zip_code['postal_code']
multiple_zip_codes = country_code.query_postal_code(["560034", "560083"])

m = folium.Map(location=[zip_code['latitude'], zip_code['longitude']], 
zoom_start=9,
   detect_retina=True, control_scale=False)

m.save(f'{postal_code}-map.html')

zipcode_to_map('in','515411')

I wrote this function.You can use this function to generate map using a 
zipcode and countrycode. Hope it will be useful for you.

On Thursday, June 4, 2020 at 3:15:55 AM UTC+5:30, Ram wrote:
>
> Hi,
>
> We need to add location map based on the zip code in our DJango web 
> application. Is there any free API available out there? if you have used it 
> already could you suggest one?
>
> Thanks,
> ~Ram
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7b985c15-b523-497b-91a4-8b08586e7f28%40googlegroups.com.


Re: Configure a VPS

2020-06-04 Thread Luciano Martins
https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-digital-ocean.html

Em quarta-feira, 3 de junho de 2020 17:05:22 UTC-3, Giovanni Silva escreveu:
>
> I need to deploy a django application on my vps server
>
> alguém tem algum passo a passo de como configurar o VPS?  my system is 
> windows
>
> -- 
> *Giovanni Silva*
> (31) 9 9532-1877
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7dd7f012-d2af-404b-93b4-fc9986a07c99%40googlegroups.com.


Re: Any free MAP API available

2020-06-04 Thread RANGA BHARATH JINKA
Hi, You can convert zipcode to latitude and longitude using this module. 
And use those in your map using folium.

https://pypi.org/project/pgeocode/

On Thursday, June 4, 2020 at 3:15:55 AM UTC+5:30, Ram wrote:
>
> Hi,
>
> We need to add location map based on the zip code in our DJango web 
> application. Is there any free API available out there? if you have used it 
> already could you suggest one?
>
> Thanks,
> ~Ram
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/16faa60b-b52b-492c-a1d4-3e03e29f96fa%40googlegroups.com.


Possible Django bug I am considering raising

2020-06-04 Thread 'OwlHoot' via Django users
Hi all

I believe the issue I have enquired about on the following Stack Exchange 
page :

https://stackoverflow.com/questions/62162288/baffling-error-filtering-django-objects-of-derived-class-by-values-in-foreign-ke

may well be a Django bug, or at the least no longer works with Django as 
this has evolved since v 1.10 (when it worked fine).

In summary, the issue is that if a model class B inherits from A, which 
inherits from models.model, then a call to B.objects.filter() cannot locate 
a field actually defined in B (because, it seems, Django starts its walk 
through the relevant/related models from A rather than B and for some 
unfathomable reason checks everything _except_ B !)

Regards

John R Ramsden

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f694d71d-bb1a-4e60-80ff-c8589f797f51%40googlegroups.com.


Re: Any free MAP API available

2020-06-04 Thread RANGA BHARATH JINKA
You can refer these links.

https://towardsdatascience.com/visualizing-data-at-the-zip-code-level-with-folium-d07ac983db20

https://morioh.com/p/d896544d6977

https://towardsdatascience.com/making-3-easy-maps-with-python-fb7dfb1036

On Thursday, June 4, 2020 at 3:15:55 AM UTC+5:30, Ram wrote:
>
> Hi,
>
> We need to add location map based on the zip code in our DJango web 
> application. Is there any free API available out there? if you have used it 
> already could you suggest one?
>
> Thanks,
> ~Ram
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/78804b7c-c0c4-4258-bafb-809aa349f4b9%40googlegroups.com.


Re: Any free MAP API available

2020-06-04 Thread RANGA BHARATH JINKA
Hi, You can use folium module in python to achieve this. Link to module.

Folium Maps 

Hope this helps. All the best.

On Thursday, June 4, 2020 at 3:15:55 AM UTC+5:30, Ram wrote:
>
> Hi,
>
> We need to add location map based on the zip code in our DJango web 
> application. Is there any free API available out there? if you have used it 
> already could you suggest one?
>
> Thanks,
> ~Ram
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5d7f945f-2472-487b-ba8d-52b4cc17256a%40googlegroups.com.


Re: Any free MAP API available

2020-06-04 Thread RANGA BHARATH JINKA
Hi, I created this python module. It will convert zipcode to a html map. 
You can use this. I will link the example usage github link.

https://github.com/bharathjinka09/zipcode_to_map

https://pypi.org/project/zipcode-to-map/

On Thursday, June 4, 2020 at 3:15:55 AM UTC+5:30, Ram wrote:
>
> Hi,
>
> We need to add location map based on the zip code in our DJango web 
> application. Is there any free API available out there? if you have used it 
> already could you suggest one?
>
> Thanks,
> ~Ram
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/089c1398-6656-41fc-a595-475cee1f1831%40googlegroups.com.


logidin user catch into a table column

2020-06-04 Thread Chandan Sarkar
hi,
 
how can I insert logged in username insert into a table column named is " 
createdby"  at the time of the insert brand name .


Please help me .. Thanks in advance.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1fab48fe-4c62-4b4a-8572-c6b9c9b7f540%40googlegroups.com.
Title: {% block title %}Brand{% endblock %}







Inventary Management System


  



Home



logout







Store Name
Lorem ipsum dolor sit ame.


Active


BRAND


Category


Subcategory


Unit






{% csrf_token %}





Brand Entry


   


 


Brand Name:

{{ form.brand_name }}





Submit











from django.shortcuts import render,redirect
from stock.forms import BrandForm
from stock.models import Brand

# Create your views here.

def BrandInsert(request):
if request.method == "POST":
createdBy = request.POST.get('username')
form = BrandForm(request.POST)
if form.is_valid():
try:
form.save()
print(user)
return redirect('/BrandShow')
except :
pass
else: 
 form = BrandForm()
return render (request,"brand_insert.html",{'form': form})

def BrandShow(request):
sbrand = Brand.objects.all()
return render (request,"brandlist.html",{'sbrand':sbrand})

def BrandEdit(request,id):
ebrand = Brand.objects.get(id=id)
print(ebrand)
return render (request,"brand_edit.html",{'ebrand':ebrand})

def BrandUpdate(request,id):
ubrand = Brand.objects.get(id=id)
form = BrandForm(request.POST, instance= ubrand)
if form.is_valid():
   form.save()
   return redirect('/BrandShow')
return render (request,"brand_edit.html",{'ubrand':ubrand})

def BrandDelete(request,id):
dbrand = Brand.objects.get(id=id)
dbrand.delete()
return redirect('/BrandShow')




from django.db import models


# Create your models here.

class Brand(models.Model):
createdBy = models.CharField(max_length=20,blank=False)
brand_name = models.CharField(max_length=50,unique=True)
flag =models.BooleanField()
#createdon = models.DateField(auto_now_add=True)
#updatedon = models.DateField(auto_now=True,)

class meta:
db_table = 'brand'



class Category(models.Model):
brand = models.CharField(max_length=50,)
category_name = models.CharField(max_length=50,unique=True)
flag =models.BooleanField()

class meta:
db_table = 'category'

class Subcategory(models.Model):
category = models.CharField(max_length=50,)
subcategory_name = models.CharField(max_length=50,unique=True)
flag =models.BooleanField()
   
class meta:
db_table = 'subcategory'


class Unit(models.Model):
#brand_id = models.IntegerField()
unit_name = models.CharField(max_length=50)
flag =models.BooleanField()

class meta:
db_table = 'unit'

from django import forms
from stock.models import Brand,Category,Subcategory,Unit

class BrandForm(forms.ModelForm):
class Meta:
model = Brand
fields = "__all__"

class CategoryForm(forms.ModelForm):
class Meta:
model = Category
fields = "__all__"

class SubCatForm(forms.ModelForm):
class Meta:
model = Subcategory
fields = "__all__"

class UnitForm(forms.ModelForm):
class Meta:
model = Unit

Django Report Generation Tool

2020-06-04 Thread Balaji Shetty
Hi

Can anyone suggest for report generation tool which involves annotate
queries with operations avg, min, max, sum and count.

1. In django Admi

2 In Tepmlates


-- 
Mr Shetty Balaji
Asst. Prof.
IT Department
SGGS I
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECSbOtw%2BFGRRA3XmpTcRMiDP9%3DuJPXmqVpdCcyuo7AsMwbm7Q%40mail.gmail.com.


RE: Any free MAP API available

2020-06-04 Thread Vishesh Mangla
There’s map-box too if you w’d like to use it.  https://www.mapbox.com/ Sent from Mail for Windows 10 From: meera ganganiSent: 04 June 2020 09:22To: django-users@googlegroups.comSubject: Re: Any free MAP API available you can use Geo-Django Library available in django  On Thu, Jun 4, 2020 at 3:15 AM Ram  wrote:Hi, We need to add location map based on the zip code in our DJango web application. Is there any free API available out there? if you have used it already could you suggest one? Thanks,~Ram-- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BOi5F02G9gW64FAPfKYHjEGf28hp34ePmg%3Dd%2BtVtHNSEs%2BqQg%40mail.gmail.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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANaPPPKaoD3WGBis436dRPzyc96UsKq6SUg8RfyFV%2BkvPC1gsA%40mail.gmail.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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5C45CF8F-5DA7-4933-A87F-BC3CAA3CDCC5%40hxcore.ol.