Re: Admin site's css doesn't work.

2020-09-19 Thread Ogunsanya Opeyemi
Try creating a project locally on your computer set STATIC_ROOT in the settings fileand run this command python manage.py collectstatic then go to the static root folder and copy the static files the put it insIde the static root folder on the cpanel. On Saturday, September 19, 2020, English Lear

Re: Online food ordering system Django

2020-09-19 Thread sapna Choudhary
This is a nice app you have made. could you share the github link? On Fri, Sep 18, 2020 at 1:08 AM iheaka Ogechi wrote: > Yes > But both with Django > Php > > On Wed, Sep 16, 2020, 4:08 PM Tanni Seriki wrote: > >> Please those any one has a project like online food ordering system... >> >> -- >

Re: Online food ordering system Django

2020-09-19 Thread Madhav Nandan
Drop me a mail. If my work interests you. On Sat, Sep 19, 2020 at 3:49 PM sapna Choudhary wrote: > This is a nice app you have made. could you share the github link? > > On Fri, Sep 18, 2020 at 1:08 AM iheaka Ogechi > wrote: > >> Yes >> But both with Django >> Php >> >> On Wed, Sep 16, 2020, 4:

django.db.models.signals

2020-09-19 Thread Mohammad hassan Tahery
It would be cool to have pre_update and post_update in set of built-in signals. -- 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...@goog

how to create url helloworld

2020-09-19 Thread paidjoo indo
*file views.py in folder pages from django.htpp import HtppResponse from django.shortcuts import render # Create your views here. def home_view(*args, **kwargs): # *args, **kwargs return HtppResponse("hello world") C:\Users\leo>C:/python37/python.exe c:/python37/Try-Django-master/src/pag

Re: prefetch_related with slices

2020-09-19 Thread misraX x
I believe you are searching for queryset and SQL limits, if so take a look at https://docs.djangoproject.com/en/2.2/topics/db/queries/#limiting-querysets On Fri, Sep 18, 2020 at 7:00 PM אורי wrote: > Hi, > > I have a code with a query: > > qs = User.objects.active( > gender__in=user.speedy_m

Calculated feild in models

2020-09-19 Thread eankomah
I have two fields: quantity = models.FloatField() unit_price = models.FloatField() and i want ot do someting like this total_price = models.FloatField('unit_price' * 'quantity') Thanks -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: how to create url helloworld

2020-09-19 Thread coolguy
Instead of from pages import views use from . import views On Saturday, September 19, 2020 at 11:15:34 AM UTC-4 leoa...@gmail.com wrote: > *file views.py in folder pages > > from django.htpp import HtppResponse > from django.shortcuts import render > > # Create your views here. > def home_vie

Re: Calculated feild in models

2020-09-19 Thread coolguy
Create a function at class level like this.. *class xxx(models.Model):* quantity = models.FloatField() unit_price = models.FloatField() * def get_total_price(self):* return self.quantity * self.unit_price On Saturday, September 19, 2020 at 11:15:30 AM UTC-4 e

Re: Inline Formset

2020-09-19 Thread coolguy
Please share some code so we can look into. On Friday, September 18, 2020 at 12:50:49 AM UTC-4 lada...@gmail.com wrote: > Good day friends, Please i have a small challenge, I have an inline > formset in my admin where users can add more products to a store. The user > can also add a product if

Re: Calculated feild in models

2020-09-19 Thread Mohammad Ahshan Danish
Create a model and add functions if you want to go more deep use Model-manager. On Sun, Sep 20, 2020 at 12:27 AM coolguy wrote: > Create a function at class level like this.. > > *class xxx(models.Model):* > quantity = models.FloatField() > unit_price = models.FloatField() > >

Re: Calculated feild in models

2020-09-19 Thread Arpana Mehta
You can use @property On Sat, 19 Sep 2020, 20:45 eankomah, wrote: > I have two fields: > quantity = models.FloatField() > unit_price = models.FloatField() > > and i want ot do someting like this > > > total_price = models.FloatField('unit_price' * 'quantity') > > Thanks > > -- > You

Re: Calculated feild in models

2020-09-19 Thread EA Media House
Alright On Sat, 19 Sep 2020 at 21:32, Arpana Mehta wrote: > You can use @property > > On Sat, 19 Sep 2020, 20:45 eankomah, wrote: > >> I have two fields: >> quantity = models.FloatField() >> unit_price = models.FloatField() >> >> and i want ot do someting like this >> >> >> total_pr

Re: prefetch_related with slices

2020-09-19 Thread אורי
Thank you. אורי u...@speedy.net On Sat, Sep 19, 2020 at 6:14 PM misraX x wrote: > I believe you are searching for queryset and SQL limits, if so take a look > at > https://docs.djangoproject.com/en/2.2/topics/db/queries/#limiting-querysets > > On Fri, Sep 18, 2020 at 7:00 PM אורי wrote: > >> H

refresh template with recent data from view

2020-09-19 Thread Saurabh Pandey
hi Everyone, Namste ! I have a new project where i am getting data from data base table ( getting loaded in table every 10 min ) . i have written a function to select data from table and put in the dic and passed to template for rendering. my problem is even i refresh the page data is not getting

Re: Wants to make webpage auto reload whenever database is update.

2020-09-19 Thread Saurabh Pandey
hi Unnati can u help how it worked. i have same issue where i need to restart server to get latest data otherwise it is not updating fresh data. On Sunday, 26 November, 2017 at 8:39:34 pm UTC+8 Unnati C wrote: > it's working, Thanks... > > > On Sunday, November 26, 2017 at 11:24:39 AM UTC+5:30,

Re: how to create url helloworld

2020-09-19 Thread RANGA BHARATH JINKA
Hi, Please check the typo. It is django.http On Sun, 20 Sep 2020, 12:11 am coolguy, wrote: > Instead of > from pages import views > > use > from . import views > On Saturday, September 19, 2020 at 11:15:34 AM UTC-4 leoa...@gmail.com > wrote: > >> *file views.py in folder pages >> >> from

New Users Unable to Use Website

2020-09-19 Thread Lightning Bit
Encountering a lot of errors here. Here is the spill: *THE CASE:* So, I have created the base site with an operational store. However, now I am trying to add new users. I completed about half of the "setting up user accounts" tutorial, however, now, whenever a new user logs in, he/she is una

Re: New Users Unable to Use Website

2020-09-19 Thread RANGA BHARATH JINKA
Hi, Try this. https://stackoverflow.com/questions/36317816/relatedobjectdoesnotexist-user-has-no-userprofile All the best 👍 On Sun, 20 Sep 2020, 8:50 am Lightning Bit, < thelegendofearthretu...@gmail.com> wrote: > Encountering a lot of errors here. Here is the spill: > > > *THE CASE:* >

Re: Wants to make webpage auto reload whenever database is update.

2020-09-19 Thread Unnati C
Hello Saurabh, Before 3 years I solved my problem using Ajax and Javascript. If you know some front end coding try to fetch the updated data from backend database. Don't try to push it from backend to front end. Hope you get your answer. On Sunday, September 20, 2020 at 7:49:54 AM UTC+5:30 s1