when I click the right button in my slider it moves right, but after once moving right its neither moves right nor left even after clicking the slide left button or slide right button. views.py here i

2020-10-24 Thread Dhruvil Shah
views.py

def index(request):
 allProds = []
catprods = Allmusic.objects.values('category', 'sno') 
cats = {item['category'] for item in catprods} for cat in cats: prod = 
Allmusic.objects.filter(category=cat) n = len(prod) nSlides = n // 4 + 
ceil((n / 4) - (n // 4)) allProds.append([prod, range(1, nSlides), nSlides])
params = {'allProds':allProds}
return render(request,'index.html',params) 

index.html



For More details you can see my stackoverflow page
https://stackoverflow.com/questions/64207103/when-i-click-on-slide-button-of-slider-in-my-website-it-only-slides-only-once-an




   






-- 
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/49c95009-8d05-4f71-bccb-1bcec2e97d26n%40googlegroups.com.
{% extends 'base.html' %}

{% block title %} DdsMusic.com Best Music Website! {% endblock %}
{% block css %}

.col-md-3
{
display: inline-block;
margin-left:-4px;
}
.carousel-indicators .active {
background-color: blue;
}
.col-md-3 img{
width:276px;
height: 217px;
}
.card-img, .card-img-top {
border-top-left-radius: calc(.25rem - 1px);
border-top-right-radius: calc(.25rem - 1px);
}
.card-img-top {
-ms-flex-negative: 0;
flex-shrink: 0;
width: 100%;

}

body .carousel-indicator li{
background-color: blue;
}
body .carousel-indicators{
bottom: -40px;
}
.carousel-indicators li {


background-color: #7270fc;
}
body .carousel-control-prev-icon,
body .carousel-control-next-icon{
background-color: blue;
}
.carousel-control-prev,
.carousel-control-next{
top: auto;
bottom: auto;
padding-top: 222px;
}

body .no-padding{
padding-left: 0,
padding-right: 0;
}


#headcat1{
font-family:sans-serif;
font-style:bold;

}
.categorywid{
font-size:40px;
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
}



{% endblock%}


{% block body %}
{%load static%}





{% for product, range, nSlides in allProds %}
{{product.0.category}} 




{% for i in range %}

{% endfor %}
 



{% for i in product %}




{{i.name}}

{% if user.is_authenticated %}

{% csrf_token %}


{% comment %} Play
Music {% endcomment %}
Play
Song


{% else %}
Play Music
{% endif %}




{% if forloop.counter|divisibleby:4 and forloop.counter > 0 and not forloop.last %}


{% endif %}
{% endfor %}












{% endfor %}

{% endblock body %}

Re: Integrating GeoDjango with Esri API

2020-11-20 Thread Dhruvil Shah
You can follow this YouTuber he has made a project on GeoDjango.

https://youtu.be/_KIMevaubfQ


On Fri, 20 Nov 2020, 18:29 Rodrigo Cea,  wrote:

> I'm developing a mapping website. I will be consuming map layers from ESRI
> Online. I see they have a fairly sophisticated Python API. The site will be
> django based. I wonder how easy it would be to use GeoDjango for local
> storage and editing of geographical  data as well as other, not geolocated
> info, and using the ESRI api to sync it to ESRI's servers and generate maps?
>
> Using ESRI maps and interacting with other ESRI based sites is a client
> requirement, and non-negotiable.
>
> --
> 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/1a346478-d46a-43d7-9621-3a1859133774n%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/CADsP_izDws3Msb0uRdvkt1zi0FFPvKN8h8A8RHnE_PfXbBq_MQ%40mail.gmail.com.


Re: Integrating GeoDjango with Esri API

2020-11-20 Thread Dhruvil Shah
I don't think. so, it's basic project on how to use it and also find
distance from your current location to what u write in text box.

On Sat, 21 Nov 2020, 01:58 Rodrigo Culagovski,  wrote:

> Does it connect to ESRI services? I can't find any reference to that in
> the video, and that's what I specifically need.
>
> Saludos,
>   *Rodrigo Culagovski*
> Director
> +569 7667 0402
> H98R+8C Santiago
>
>
>
> On Fri, 20 Nov 2020 at 15:43, Dhruvil Shah  wrote:
>
>> You can follow this YouTuber he has made a project on GeoDjango.
>>
>> https://youtu.be/_KIMevaubfQ
>>
>>
>> On Fri, 20 Nov 2020, 18:29 Rodrigo Cea,  wrote:
>>
>>> I'm developing a mapping website. I will be consuming map layers from
>>> ESRI Online. I see they have a fairly sophisticated Python API. The site
>>> will be django based. I wonder how easy it would be to use GeoDjango for
>>> local storage and editing of geographical  data as well as other, not
>>> geolocated info, and using the ESRI api to sync it to ESRI's servers and
>>> generate maps?
>>>
>>> Using ESRI maps and interacting with other ESRI based sites is a client
>>> requirement, and non-negotiable.
>>>
>>> --
>>> 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/1a346478-d46a-43d7-9621-3a1859133774n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/1a346478-d46a-43d7-9621-3a1859133774n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/W4ps2dL4er0/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CADsP_izDws3Msb0uRdvkt1zi0FFPvKN8h8A8RHnE_PfXbBq_MQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CADsP_izDws3Msb0uRdvkt1zi0FFPvKN8h8A8RHnE_PfXbBq_MQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CALU%3DqNN3o9ojR5AuVrp%3DoAFpOUkS2%2Bh%2B9get_3%2B2U54Qkpk2Ug%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALU%3DqNN3o9ojR5AuVrp%3DoAFpOUkS2%2Bh%2B9get_3%2B2U54Qkpk2Ug%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADsP_iy%2BX3Ye08yVR22PaFoRNv-QL%2BfegBr9ieAZkWQWCWD67Q%40mail.gmail.com.


Guidance for Django-React

2020-11-30 Thread Dhruvil Shah
 I am currently learning Django and made many projects in it. And I
have also made DRF API projects. So, now I am thinking of learning React
for frontend development and will make projects with React and Django.

Afterwards, I am also thinking of making Django Rest API of any
project and making React-Native application with DRF API.

I have doubts about following things:

1-Is Django+React Stack good according to current Industry Trends?
2-Can this Stack lend me a good package job?

-- 
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/CADsP_izB3OyiFgoH1ZZNFy-RS2%2BWwCqQaAXF9XRdsLFnLA2b6g%40mail.gmail.com.


Re:

2020-12-03 Thread Dhruvil Shah
I suggest u to watch tutorial on YT if
Code with Harry
Geeky Shows
Code with Mitch


On Thu, 3 Dec 2020, 19:26 neha,  wrote:

> Hi,
>
> I am a beginner in Django,I watched a tutorial on Django from edx
> course,and followed the same procedures but getting 404 error for the very
> basic app(hello app). Can someone please help me.
>
> I have attached the screenshots of the error page and my codes.
>
>
>
> Sent from Mail  for
> Windows 10
>
>
>
> --
> 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/1AF7F91D-2668-461E-B020-65FD005CB6FC%40hxcore.ol
> 
> .
>

-- 
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/CADsP_iyC6oBOWJOiyqNakL_N6cGWu3mYMZe5aPGjBHeu-NhW5g%40mail.gmail.com.


Django has Future?

2020-12-13 Thread Dhruvil Shah
 I am currently confused that Django has Future or not. Because I am not
able to find that much local companies using Django. I also see demand of
Nodejs is increasing day by day. So, should I start learning Nodejs,
express for Backend due to lack of opportunities or if Django has future I
will stick to 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADsP_ixTO5LjytvF%2BVqieXu5jiQnZFfBc7yf1mTEwqzBeciPPg%40mail.gmail.com.


Migration of database

2020-12-14 Thread Dhruvil Shah
I have already made my project in Django and used built-in database Sqlite
and now I want it in production on heroku so how can I switch all data from
Sqlite database to Postgresql database?

-- 
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/CADsP_iywX5jsBNRsoSgtPZtzgDD3befGdJgjWL-XgZi-feRdAA%40mail.gmail.com.


Re: 127.0.0.1 refused to connect.

2020-12-18 Thread Dhruvil Shah
Try uninstalling django and re-install it

On Fri, 18 Dec 2020, 23:42 Parul.,  wrote:

> I am using the command python manage.py runserver
> But it is not running the servers
> I tried localhost with 8000 and 8080 also
> The tried 0.0.0.0:8000 and with 8080
>
>
> I am not running any other servers.
>
> While checking the ip4 in cmd...it's showing 192.168.1.11 tried python
> manage.py runserver with this also but didn't work.
>
> On Fri, Dec 18, 2020, 11:27 PM Akanimoh Osutuk 
> wrote:
>
>> The port is probably being used by another app. Are u running other
>> development servers?
>>
>> On Fri, 18 Dec 2020, 18:34 Parul.,  wrote:
>>
>>> This is the error which I am getting.
>>>
>>> On Fri, Dec 18, 2020, 10:59 PM Akanimoh Osutuk 
>>> wrote:
>>>
 What errors are you getting?

 On Fri, 18 Dec 2020, 17:28 Parul.,  wrote:

> i am not able to connect , i tried to use 0.0.0.0:8000 , 0.0.0.0:8080
> as well, still getting same error.
> used 127.0.0.1 with ports 8000 and 8080 still getting error
> i have put '*' in ALLOWED_HOSTS
>
> --
> 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/b6e49e34-46f1-4c5f-9829-358b3323d381n%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/CADA0syjmtd4q9Lfx6dzqoZTiK-FQ8zz6V22ArB-5HdzUB7azkw%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/CAHjHRFo2GOfxpcDbJJZ1LHLYUHRoguAuStvwVW0h%2Bzw2AuxvUw%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/CADA0sygCesoKDxeJxYTY%3DN61VG50ViW5bj%2Bq2nVxwvu6qYrfpQ%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/CAHjHRFo%3DiW576Jyxz234HdmfxDb8X7qR8NF-sOp6%3DZv39eeo3g%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/CADsP_iy%3Dba0pyzTT9C4zWPLTYROeov%2BG42BLuRpoCbk5PdWzFg%40mail.gmail.com.


Can anyone please look at this query and help me to make a model for it

2020-12-23 Thread Dhruvil Shah
https://stackoverflow.com/questions/65427344/how-to-select-multiple-person-for-same-project

-- 
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/CADsP_ixnN0XB3Jm2FdYG1cSS54aNjUV%2BMtYsbfs7fKJAMdjZkg%40mail.gmail.com.


How to make relationship in django models in such scenario

2020-12-31 Thread Dhruvil Shah
*models.py* So,here i want to make Invoicemgmt model in which i can have
multiple entries for Invoice table having customer,project and
Invoice_amount.

Basically,requirement is that whenever i see 'view_Invoice' of some
id,first i will see all data of that specific id on that page and then i
want to have small table below for invoice_mgmt,where i can add amount
received for that specific id invoice.

*so,i want to know what fields should i add in invoice_mgmt model for
relationship "


"models.py"

class Invoice(models.Model):
company_choice = (
('VT_India', 'VT_India'),
('VT_USA', 'VT_USA'),
)
company = models.CharField(
max_length=30, blank=True, null=True, choices=company_choice)
customer = models.ForeignKey(Customer, on_delete=models.CASCADE)
project = models.ForeignKey(Allproject, on_delete=models.CASCADE)

invoice_title = models.CharField(max_length=15)

invoice_id = models.IntegerField(primary_key=True)
invoice_amount = models.IntegerField()
invoice_date = models.DateField(
blank=True, null=True)
invoice_duedate = models.DateField(
blank=True, null=True)

invoice_description = models.TextField()

def __str__(self):
return self.invoice_title

class Paymentmethod(models.Model):
paymentmethod_id = models.IntegerField(primary_key=True)
paymentmethod_name = models.CharField(max_length=15)

def __str__(self):
return self.paymentmethod_name

class Invoicemgmt(models.Model):
invoicemanagement_id = models.IntegerField(primary_key=True)
invoice_received = models.IntegerField()
date = models.DateField(
blank=True, null=True)
payment_method = models.ForeignKey(Paymentmethod, on_delete=models.CASCADE)


"So, basically i want to have multiple entries in invoice mgmt table
for one specific invoice table id(one specific data)"

-- 
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/CADsP_iz2TOzNc%2BShAH-SU4xhVu_mxE1xaa1uVHdDy6Vi3mOciw%40mail.gmail.com.


How to Use CRUD Operation in Any Page

2021-01-03 Thread Dhruvil Shah
Basically i want to do CRUD operation in one specific table Id


for example if i am in 'http://127.0.0.1:8000/view/1' this page i want to
do crud operation for this specific id and have small table below it.

2 tables

class Allinvoice(models.Model):

class Invoicedetails(models.Model)

invoice = models.ForeignKey(

Allinvoice, on_delete=models.CASCADE)

So here for each individual Allinvoice table object i want to have multiple
Invoicedetails record and with functional based views only,anyone please
recommend me any example for such case

-- 
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/CADsP_iy3v8TxL9-ONHZ48VxZ%2BcKvyY8EC6Pog2_JCKdNSn%2BPOA%40mail.gmail.com.


How to use chartjs

2021-01-08 Thread Dhruvil Shah
Basically I want to use 'chartjs' for display "Clustered Bar chart", with
following things year wise

Total amount
Amount Received
Amount Left

I want to fetch data from data base and display it on chart, I have saved
data of all above field  3 fields in one table for each date and I want to
also fetch year from Datefield.

So, basically can anyone give me any resource or something for such type
of  requirement. Main things is how to display Clustered bar chart by
fetching data from database for each year.

-- 
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/CADsP_iwqys-XhALXm2CwGV20%2B9XXfRaD6TkASUBvE9COYzg_Qw%40mail.gmail.com.