Re: Images

2022-05-10 Thread Arshad Noman
You change the names of the pictures in the separate folder then copy them
in a static folder then change the picture file names in the template
folder then refresh then see pictures are new ones or not

On Mon, 9 May 2022 at 20:15, Aliya Janmohamed 
wrote:

> Hi
>
> It is still displaying the same image as above.
>
> On Sun, 8 May 2022 at 03:34, Arshad Noman  wrote:
>
>> First, you change the picture name and place it in the pictures folder
>> like static or media folder then change the picture name in templates where
>> you want the picture to be displayed
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
>>  Virus-free.
>> www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
>> <#m_-4392793013509788988_m_-8012441007838514003_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> On Sun, 8 May 2022 at 03:37, Aliya Janmohamed <
>> aliya.janmohame...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I cannot load my images, this is what shows:
>>>
>>>
>>> --
>>> 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/2dc9f275-adcf-4a03-b8ed-db4aad8dfbc6n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/2dc9f275-adcf-4a03-b8ed-db4aad8dfbc6n%40googlegroups.com?utm_medium=email_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/M5ZOBHwScMA/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/CA%2B0oV2hu4SW1VJc0H%3DEfCnBsXLts0K8y_T_C-jjdpE5754r90g%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CA%2B0oV2hu4SW1VJc0H%3DEfCnBsXLts0K8y_T_C-jjdpE5754r90g%40mail.gmail.com?utm_medium=email_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/CALHQhB7p5fnh2PQRKZYx9rCt3ZgHyGazV41Px4gyqBZv%3DQZJJA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CALHQhB7p5fnh2PQRKZYx9rCt3ZgHyGazV41Px4gyqBZv%3DQZJJA%40mail.gmail.com?utm_medium=email_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/CA%2B0oV2iubvRi-GAdH5gx38hnTJzW41xt2CiMFXgieqQFUPATZQ%40mail.gmail.com.


Re: Images

2022-05-08 Thread Arshad Noman
First, you change the picture name and place it in the pictures folder like
static or media folder then change the picture name in templates where you
want the picture to be displayed


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Sun, 8 May 2022 at 03:37, Aliya Janmohamed 
wrote:

> Hello,
>
> I cannot load my images, this is what shows:
>
>
> --
> 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/2dc9f275-adcf-4a03-b8ed-db4aad8dfbc6n%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/CA%2B0oV2hu4SW1VJc0H%3DEfCnBsXLts0K8y_T_C-jjdpE5754r90g%40mail.gmail.com.


Web based movie app

2022-05-05 Thread Arshad Noman


I want to make a web-based movie app in Django with data already given in a 
JSON file. The first page will be movie listings and the second page for 
details separate from other movie details means each movie details on a 
separate page. A JSP search bar is also required on top to search movies.  

-- 
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/84bd7a7b-c535-4661-be4d-143c76d609d6n%40googlegroups.com.


Re: cannot resolve FieldError

2022-05-03 Thread Arshad Noman

django.core.exceptions.FieldError: Cannot resolve keyword 'y' into field. 
Choices are: author, category, id, isbn, name

I am also getting the same error.




On Sunday, 18 July 2021 at 19:36:51 UTC+5 frank...@gmail.com wrote:

> I am getting this error message:
>
> raise FieldError("Cannot resolve keyword '%s' into field. "
> django.core.exceptions.FieldError: Cannot resolve keyword 'date' into 
> field. Choices are: bad, created, doa, entered, id, non, para, received, 
> released, slabel, specie, specie_id, supplier, supplier_id
>
> these are my models:
> Shipment:
> class Shipment(models.Model):
> supplier = models.ForeignKey(Supplier, on_delete=models.CASCADE)
> created = models.DateTimeField(default=timezone.now)
> slabel = models.CharField(max_length=10)
> specie = models.ForeignKey(Specie, on_delete=models.CASCADE)
> received = models.PositiveIntegerField(default=0)
> bad = models.PositiveIntegerField(default=0)
> non = models.PositiveIntegerField(default=0)
> doa = models.PositiveIntegerField(default=0)
> para = models.PositiveIntegerField(default=0)
> released = models.PositiveIntegerField(default=0)
> entered = models.BooleanField(default=False)
>
> def get_absolute_url(self):
> return reverse("shipments:detail", kwargs={"pk": self.pk})
>
> def __str__(self):
> return f"{self.specie.name}-{self.created.strftime('%Y/%m/%d')}-{
> self.supplier.name}"
>
> suppliers:
>
> class Supplier(models.Model):
> supplierID = models.PositiveIntegerField(default=1)
> name = models.CharField(max_length=120)
> logo = models.ImageField(upload_to="suppliers", default="no_picture.png")
> phone = models.CharField(max_length=15, null=True)
> email = models.CharField(max_length=120)
> country = models.CharField(max_length=120, null=True, blank=True)
> address = models.CharField(max_length=120, null=True, blank=True)
> city = models.CharField(max_length=120, null=True, blank=True)
> state = models.CharField(max_length=120, null=True, blank=True)
> zipCode = models.CharField(max_length=10, null=True, blank=True)
>
> def __str__(self):
> return self.name
>
> species:
>
> class Specie(models.Model):
> name = models.CharField(max_length=50)
> image = models.ImageField(upload_to="species", default="no_picture.png")
> created = models.DateTimeField(default=timezone.now)
>
> def __str__(self):
> return self.name
>
> class Meta:
> ordering = [
> "name",
> ]
>
> everything is working the way I want but when I try to get data into a 
> variable I get the above error and I don't have a clue where to start to 
> resolve this.  As from the models I have no field named date so I am 
> confused.
>
> The error is generated by this line:
> qs = Shipment.objects.filter(date__range=[date_from, date_to])
>
> even if I enter strings for testing, for example
> qs = Shipment.objects.filter(date__range=['2021-01-01', '2021-02-01'])
>
> I been all over the web looking for possible solutions but I am at a 
> loss.  Thanks for any thoughts or suggestions you may have.
>
>
>

-- 
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/4adf0810-b383-45e0-b69e-85db67be603an%40googlegroups.com.


Show only remaining books instead of all books

2022-04-30 Thread Arshad Noman


In a book bank made in Django, I want to show only the remaining books 
instead of all books. This I want to upgrade in the code below


def view_books_student(request): 
books = Book.objects.all() 
return render(request, "view_books_student.html", {'books':books})

-- 
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/8328314e-2e63-46b8-9bf0-d2b5caf649b6n%40googlegroups.com.