Re: Is it Possible to run django locally without internet connection

2019-05-07 Thread Shashank Singh
Run server with command ./manage.py runserver 0:8000. 0 here tells that any
one on the same network can access the project's urls like this. Suppose
your laptop's ip is 10.0.0.156 so from your phone go to
10.0.0.156:8000/admin and you are connected to your django projects. You
must be on the same network/lan. It may or may not have a working internet
connection.

On Tue, May 7, 2019, 9:18 PM Rob Gmail  wrote:

> Yes you can.  I do it for an IOT device that we have using Django/python,
> many times it does not have an Internet connection but runs fine.
>
> Rob
> 203-671-6514
> Sent from my mobile device, please excuse the typos.
>
> On May 7, 2019, at 11:38 AM, Idris Adegbite 
> wrote:
>
> Good day guys, Please can i run django on laptop without internet
> connection.
>  if yes, Please kindly help me out with the procedures.
>
> I am having issues connecting my  phone and laptop and i dont want that to
> slow down my learning.
> Any help would be 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/809870ae-92a1-4881-96ae-838d9342ee0b%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/A015232A-FE14-4BA8-9C45-70E4C6CD6F23%40gmail.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/CAD-d1sbsFh7TxOc-oDtDSnkEeDFkQV4xa26xMUaFLaP5Zo-Dow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Unit conversions between model field value and form field value

2019-05-07 Thread Shashank Singh
One way could be make a custom read only field to show it in current value
in days and take a custom field and on save_model take its value as days
multiply it with 24 and save it in model's field.

On Wed, May 8, 2019, 7:05 AM Joe Reitman  wrote:

> Hi Tim,
>
> There is a 'Best Practices' guide for Django that recommends making models
> fat,
> https://django-best-practices.readthedocs.io/en/latest/applications.html#models.
> With that it would be logical to do both conversions in the model.
>
> Regards,
> Joe
>
> On Tuesday, May 7, 2019 at 5:24:09 PM UTC-5, Tim Bell wrote:
>>
>> Hi,
>>
>> I have a model with an integer field storing a duration in hours, while I
>> want to present that to users in a form in days. (The choice of these
>> different units is imposed by other factors not under my control.)
>>
>> So, when saving a form, I need to convert a value in days to hours by
>> multiplying by 24. I've done that with a clean_() method on
>> the form, as described at
>> https://docs.djangoproject.com/en/2.2/ref/forms/validation/. That works
>> fine for when saving a new model.
>>
>> When editing an existing model however, I need to take the value from the
>> model stored in hours, and convert that to days for display in the edit
>> form. I've considered various places where I could do that conversion, for
>> instance in the edit view, or the form __init__() method, or the model
>> field's value_from_object() method, but none of those choices seem like
>> the obvious choice, and I can't find a recommendation for how to do this
>> either.
>>
>> What would you suggest? And is the recommended approach actually
>> documented somewhere that I've missed?
>>
>> Thanks,
>>
>> Tim
>>
> --
> 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/bc42a210-77ba-45bb-ab36-5b6f16d03ec0%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/CAD-d1sYxKVpO08ZK6LR8m5_N4jzAdbK9Zt9JB9qkYiUrpTTxWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to run ORM commands in Javascript DOM?

2019-04-09 Thread Shashank Singh
Get the data in the current screen before opening the popup or hit a ajax
request to the server to get the said data.

On Tue, 9 Apr, 2019, 8:32 PM sairanganadh Narayana, 
wrote:

> I am trying to run model.objects.filter(id=2) through javascript and show
> results in popup. I am unable to find the solution. Please guide me with
> solution or any alternative to get this.
>
> 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 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/d949ec4b-9caa-42ac-8c63-50a9315a9cfc%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/CAD-d1sZ%2BH1t2woWw79hA%3DnUK9%3DE51Pti8FhCej9Ne%3D5vzGGcaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: filter two columns django

2019-03-17 Thread Shashank Singh
OR
from django.db.models import Q
news_list =
LeagueNews.objects.filter(Q(publication_date__lte=timezone.now)|Q(league_name='english')).order_by('-publication_date')[:10]

AND
news_list = LeagueNews.objects.filter(publication_date__lte=timezone.now,
league_name='english').order_by('-publication_date')[:10]

On Sun, 17 Mar, 2019, 7:25 PM omar ahmed,  wrote:

> hi guys
> this is my view
> def premierleague(request):
> news_list =
> LeagueNews.objects.filter((publication_date__lte=timezone.now)|(league_name='english')).order_by('-publication_date')[:10]
> return render(request, 'core/premierleague.html', {'news_list':news_list})
> i want to filter my objects by two columns
> publication_date and league_name
> but it doesn't work
>
> --
> 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/58a97b33-b41e-4f87-a003-e9f82bcb9790%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/CAD-d1sbsWA5q_M2SQdTfVpePHm3vkyXdvdko2imNZfrtwFg_vA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Redirect to another page

2019-03-09 Thread Shashank Singh
I have a model, say ModelA, and on the admin add page of this model i have
recieved some parameter based on which i sonetimes want to let the user add
a object of the model and sometime wants to redirect to another page.
How do I do that?

-- 
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/CAD-d1sbSnFr_C0PaakwdUXL7Yti%3DfJ_RV-qLXxzZgrTPMsgbmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: the name of Django package

2019-02-25 Thread Shashank Singh
Wagtail

On Mon, 25 Feb, 2019, 8:44 PM Suresh Kannan,  wrote:

> Hello everyone,
>
> I am relatively new to Django. I am looking for a package where a client
> can edit the front end of the Django app.
> Say for example the client wants to change the typo/contact details in the
> web app in the GUI version (preferably they can edit the webpage and
> preview directly).
> I understand they will be doing this in the testing server rather than the
> production server.
> I have searched in google but, it seems to me I am not using the right
> keyword.
> Django admin provides for editing only the database (am I wrong?).
>
> Thank you for your time!
>
> Suresh
>
> --
> 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/7b0a5d0f-6554-4ddb-8f33-340641268447%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/CAD-d1sZdzX108kWc%3D6NdSevJ_iEb_fy2RizXx2yfdZD%3Dba9WAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing child relations when overriding save()

2019-02-10 Thread Shashank Singh
And how?

On Sun, 10 Feb, 2019, 9:23 PM Shashank Singh  When do you create child objects??
>
> On Sun, 10 Feb, 2019, 9:17 PM Nick Emery 
>> Tried this too but save() never actually gets called on the child (it
>> seems that the foreign key field of the child is updated at the database
>> level and never goes through the Django orm Child).
>>
>> On Sunday, February 10, 2019 at 8:37:54 AM UTC-5, Shashank Singh wrote:
>>>
>>> Override the save() of the child?
>>>
>>> On Sun, 10 Feb, 2019, 7:04 PM Nick Emery >>
>>>> I am trying to wrap up my first app using Django (specifically Django
>>>> Rest Framework which may change the save behavior), but have run into
>>>> an issue that I haven't been able to solve for about 10 hours now.
>>>>
>>>> I am trying to override the save() method of a model to modify a field
>>>> on a bunch of child objects when it is created; however, I can't figure out
>>>> *any* way get the objects or ids for the children.
>>>>
>>>> My code looks something like:
>>>> class Parent(models.Model):
>>>>"""When I create this, I want the children to be modified."""
>>>>def save(self, *args, **kwargs):
>>>>if not self.pk:
>>>>self._begin(*args, **kwargs)
>>>>else:
>>>>super(Parent, self).save(*args, **kwargs)
>>>>
>>>> def _begin(self, *args, **kwargs):
>>>>super(Parent, self).save(*args, **kwargs)
>>>>print(self.child_set.all())  # --> This gives: ""
>>>>for i in self.child_set.all():
>>>>i.last_name = self.last_name
>>>>i.save()
>>>>
>>>> last_name = models.CharField(max_length=100)
>>>>
>>>>
>>>> class Child:
>>>>parent = models.ForeignKey(
>>>>'Parent',
>>>>on_delete=models.SET_NULL,
>>>>null=True,
>>>> )
>>>>last_name = models.CharField(max_length=100)
>>>>
>>>> ANY way to modify the children when the parent is saved would be a life
>>>> saver (even if hacky or sub-optimal).
>>>>
>>>> --
>>>> 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...@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/24c7156b-6873-4cd3-952e-dc819fa72be0%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/24c7156b-6873-4cd3-952e-dc819fa72be0%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> 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/8dca6561-aea1-492d-b209-a9767ce30bd0%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/8dca6561-aea1-492d-b209-a9767ce30bd0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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/CAD-d1samXw4%2BQqO-hnUw020WjNtDRwoSYxPxFBCBhN%3DP6%3D_ucQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing child relations when overriding save()

2019-02-10 Thread Shashank Singh
When do you create child objects??

On Sun, 10 Feb, 2019, 9:17 PM Nick Emery  Tried this too but save() never actually gets called on the child (it
> seems that the foreign key field of the child is updated at the database
> level and never goes through the Django orm Child).
>
> On Sunday, February 10, 2019 at 8:37:54 AM UTC-5, Shashank Singh wrote:
>>
>> Override the save() of the child?
>>
>> On Sun, 10 Feb, 2019, 7:04 PM Nick Emery >
>>> I am trying to wrap up my first app using Django (specifically Django
>>> Rest Framework which may change the save behavior), but have run into
>>> an issue that I haven't been able to solve for about 10 hours now.
>>>
>>> I am trying to override the save() method of a model to modify a field
>>> on a bunch of child objects when it is created; however, I can't figure out
>>> *any* way get the objects or ids for the children.
>>>
>>> My code looks something like:
>>> class Parent(models.Model):
>>>"""When I create this, I want the children to be modified."""
>>>def save(self, *args, **kwargs):
>>>if not self.pk:
>>>self._begin(*args, **kwargs)
>>>else:
>>>super(Parent, self).save(*args, **kwargs)
>>>
>>> def _begin(self, *args, **kwargs):
>>>super(Parent, self).save(*args, **kwargs)
>>>print(self.child_set.all())  # --> This gives: ""
>>>for i in self.child_set.all():
>>>i.last_name = self.last_name
>>>i.save()
>>>
>>> last_name = models.CharField(max_length=100)
>>>
>>>
>>> class Child:
>>>parent = models.ForeignKey(
>>>'Parent',
>>>on_delete=models.SET_NULL,
>>>null=True,
>>> )
>>>last_name = models.CharField(max_length=100)
>>>
>>> ANY way to modify the children when the parent is saved would be a life
>>> saver (even if hacky or sub-optimal).
>>>
>>> --
>>> 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...@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/24c7156b-6873-4cd3-952e-dc819fa72be0%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/24c7156b-6873-4cd3-952e-dc819fa72be0%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> 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/8dca6561-aea1-492d-b209-a9767ce30bd0%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/8dca6561-aea1-492d-b209-a9767ce30bd0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CAD-d1saAWzXP02mpHNhPYA7M%3D%3DKPOJ1MesROScsLLx2JpLOg_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing child relations when overriding save()

2019-02-10 Thread Shashank Singh
Override the save() of the child?

On Sun, 10 Feb, 2019, 7:04 PM Nick Emery  I am trying to wrap up my first app using Django (specifically Django
> Rest Framework which may change the save behavior), but have run into an
> issue that I haven't been able to solve for about 10 hours now.
>
> I am trying to override the save() method of a model to modify a field on
> a bunch of child objects when it is created; however, I can't figure out
> *any* way get the objects or ids for the children.
>
> My code looks something like:
> class Parent(models.Model):
>"""When I create this, I want the children to be modified."""
>def save(self, *args, **kwargs):
>if not self.pk:
>self._begin(*args, **kwargs)
>else:
>super(Parent, self).save(*args, **kwargs)
>
> def _begin(self, *args, **kwargs):
>super(Parent, self).save(*args, **kwargs)
>print(self.child_set.all())  # --> This gives: ""
>for i in self.child_set.all():
>i.last_name = self.last_name
>i.save()
>
> last_name = models.CharField(max_length=100)
>
>
> class Child:
>parent = models.ForeignKey(
>'Parent',
>on_delete=models.SET_NULL,
>null=True,
> )
>last_name = models.CharField(max_length=100)
>
> ANY way to modify the children when the parent is saved would be a life
> saver (even if hacky or sub-optimal).
>
> --
> 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/24c7156b-6873-4cd3-952e-dc819fa72be0%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/CAD-d1sb3WVXk262-dfKuJUZ_9Kj49NDzShyv5ivL_SRrAiaMmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: filtering and searching help - regarding

2019-02-03 Thread Shashank Singh
Can you give an example.

On Sun, 3 Feb, 2019, 7:49 PM Mohan Goud  here the problem is, i can't give sectionname, dept and year directly. It
> has to do it for all sections in the database. can u help me how to do this.
>
>
>
> On Sun, Feb 3, 2019 at 7:41 PM Shashank Singh <
> shashank.singh10...@gmail.com> wrote:
>
>> Student.objects.filter(section__iexact="a",
>> department=1,year=2019).order_by("name")
>>
>> On Sun, 3 Feb, 2019, 7:32 PM Mohan Goud >
>>> django
>>>
>>>
>>>
>>> On Sun, Feb 3, 2019 at 7:30 PM Birol Demirtaş 
>>> wrote:
>>>
>>>> Django ? Or ?
>>>>
>>>> 3 Şub 2019 Paz, saat 16:59 tarihinde Mohan Goud <
>>>> kathi.mohang...@gmail.com> şunu yazdı:
>>>>
>>>>>
>>>>>
>>>>> students list is in database. I have to search based on section,
>>>>> department and year and sort them in ascending order. can any one help me
>>>>> on this through any video links or any other.
>>>>>
>>>>> --
>>>>> 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/CAB29Dk%3D9sLASp9Gr4q73qzh8ozw-ecYukUZZ62WkC8XKXtMDZA%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAB29Dk%3D9sLASp9Gr4q73qzh8ozw-ecYukUZZ62WkC8XKXtMDZA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> 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/CAN908so%3DSjsqv%2B%2BhA5Kw3W7tctGX%3D5WbtC4t9ZuwnsnZg92Xww%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAN908so%3DSjsqv%2B%2BhA5Kw3W7tctGX%3D5WbtC4t9ZuwnsnZg92Xww%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> 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/CAB29DkneL1r4QeznCQG-4%2Bg7cSEnU5kcpsE_mowj0Y0pzN3Sgg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAB29DkneL1r4QeznCQG-4%2Bg7cSEnU5kcpsE_mowj0Y0pzN3Sgg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> 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/CAD-d1sYc53o2itdGW_Ohrv2Rb2HXKutLHtrFkSGrbBrJCEQ%2B5w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAD-d1sYc53o2itdGW_Ohrv2Rb2HXKutLHtrFkSGrbBrJCEQ%2B5w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
&

Re: filtering and searching help - regarding

2019-02-03 Thread Shashank Singh
Student.objects.filter(section__iexact="a",
department=1,year=2019).order_by("name")

On Sun, 3 Feb, 2019, 7:32 PM Mohan Goud  django
>
>
>
> On Sun, Feb 3, 2019 at 7:30 PM Birol Demirtaş 
> wrote:
>
>> Django ? Or ?
>>
>> 3 Şub 2019 Paz, saat 16:59 tarihinde Mohan Goud <
>> kathi.mohang...@gmail.com> şunu yazdı:
>>
>>>
>>>
>>> students list is in database. I have to search based on section,
>>> department and year and sort them in ascending order. can any one help me
>>> on this through any video links or any other.
>>>
>>> --
>>> 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/CAB29Dk%3D9sLASp9Gr4q73qzh8ozw-ecYukUZZ62WkC8XKXtMDZA%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/CAN908so%3DSjsqv%2B%2BhA5Kw3W7tctGX%3D5WbtC4t9ZuwnsnZg92Xww%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/CAB29DkneL1r4QeznCQG-4%2Bg7cSEnU5kcpsE_mowj0Y0pzN3Sgg%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/CAD-d1sYc53o2itdGW_Ohrv2Rb2HXKutLHtrFkSGrbBrJCEQ%2B5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem with a form

2019-01-22 Thread Shashank Singh
post is a queryset and it doesn't have comment_text attribute.
{% for single_post in post %}
{{single_post.comment_text}}

On Tue, 22 Jan, 2019, 7:54 PM  in your html use
> {{post}} instead of the .comment added
>
> --
> 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/cad1a7bf-c20c-4a0a-89bc-7cb9d8be3d3d%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/CAD-d1sYVfhc-k2Z8e9J4d%3DwVz9YSjbTeWR7XVpoC9nRMNZv%2B4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add fields Django admin

2019-01-22 Thread Shashank Singh
Take those fields out as a foreign key and use that foreign key as inline
in this admin.

On Wed, 23 Jan, 2019, 4:14 AM Alexandr Bulgakov  Hello All!
>
> I need help(
>
>
> There is a class, it has 2 fields. I need to add an add button to display
> these fields again when required.
> models.py:
>
> class IPhone(models.Model):
>> iPhone_name = models.CharField(max_length=50)
>> iPhone_image = models.ImageField(upload_to='models', blank=True)
>>
>> price_name = models.CharField(max_length=150, default=' ')
>> price_cell = models.IntegerField(default=0)
>>
>> def __str__(self):
>>
>> return '{}'.format(self.iPhone_name)
>>
>>
> [image: django_add.png]
>
>
> --
> 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/c79b62de-fc5c-4acd-917c-8068b3e2e370%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/CAD-d1sZvgp7oi-tFL2TfAm%3D-tm%3D2rnqoadGM6V69CTkvftbh8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: best way to generate PDFs in django - handling concurrency

2018-12-28 Thread Shashank Singh
Celery + django + rabbitmq + template+ django-hardcopy

https://github.com/loftylabs/django-hardcopy


On Sat, 29 Dec, 2018, 9:17 AM Danny Blaker  Great. Thanks
>
> --
> 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/bc336d88-c70f-42af-aa6e-87e40c6ca12e%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/CAD-d1saCU1YGwmEXpO2WTrv3Q%3D16dD-y8_WyTgiwkaZm40gOiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking for a Django Co-Founder.

2018-11-25 Thread Shashank Singh
I am also interested. Is there is anything I can do now?

On Mon, 19 Nov, 2018, 7:04 PM Idowu Tunde  Helo you can do public found raising
> In term of ICO which help to get more fund from the puplic
>
> On Sunday, November 18, 2018, Zack Amaral  wrote:
>
>> What time are you available today?
>>
>> On Sun, Nov 18, 2018 at 12:03 PM Erol DEMİRHAN 
>> wrote:
>>
>>> Hi Zack,
>>>
>>> I'm interested in setting up a video conference whenever you and other
>>> people are available. We'd better set an hour for the meeting.
>>> By the way can we use Slack app for the communication? If everybody okay
>>> with that?
>>>
>>> Sincerely
>>>
>>> Erol DEMİRHAN
>>>
>>> On Sun, 18 Nov 2018 at 06:17, Zack Amaral 
>>> wrote:
>>>
 Let me know if you guys are interested in setting up a video
 conference. I'd love to tell you more about it. I can show you the UI/UX
 I've been working on.

 Thank you for your consideration,

 Zack Amaral

 On Sat, Nov 17, 2018 at 8:10 PM Zack Amaral 
 wrote:

> Erol,
>
> Here's a link to the plan:
> https://app.liveplan.com/accept-invitation?ic=107ef0ab-8bc5-4b9d-aeea-bf72324a0261
>
> Cheers,
>
> Zack Amaral
>
> On Sat, Nov 17, 2018 at 8:04 PM Erol DEMİRHAN 
> wrote:
>
>> Hi Zack,
>>
>> My name is Erol DEMIRHAN,
>>
>> I received your email. It sounds interesting. I'm waiting for
>> your reply about the details of the project.
>>
>> Sincerely
>>
>> On Sun, 18 Nov 2018 at 05:32, Lucas G. Navarro <
>> lucasgnava...@gmail.com> wrote:
>>
>>> Hi! How are you? Can you tell us more about this?
>>>
>>> Regards!
>>>
>>> El sáb., 17 nov. 2018 7:29 PM, Zack Amaral 
>>> escribió:
>>>
 Hi,

 I have an idea for a next generation PaaS. I was wondering if there
 are any Django developers that would be interested in being a 
 co-founder
 with my company. I'm an AWS Architect but sadly a really bad 
 developer. If
 there's anybody on this forum that would be interested please let me 
 know
 and we can setup a time to talk about the details of the project.

 Thanks,

 Zack

 --
 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/987d359b-263b-4ecf-957c-f2537f2d4ad1%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/CABomRVVygn%3DNqk1b%2BLkvA5Ktn7PmGYz3W226QQucwWhfx0OwEQ%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/CAJBVZ3xqfv_3sgkg8foJb-g5kbpmrTZXJ6hqNHVbbAvYZLJrvA%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+unsubs

Re: Upload Image Field? ASAP PLS

2018-11-17 Thread Shashank Singh
Why not doing it? Where are you stuck?

On Sun, 18 Nov, 2018, 8:02 AM Richard Vo  Need to upload an image, manipulate the image through Python Pillow, then
> display it.
>
> Whatever additional information I need to provide, please let me know.
>
> --
> 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/42fd7a1a-df2f-4ded-807e-413587beaefc%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/CAD-d1sZiOfx-pKxvQO_CkmTT_PhsVH3EBuZ3usJL_j4K7S1Adw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to move readonly_fields on top of page?

2018-11-05 Thread Shashank Singh
fields = ['a', 'b', 'c']
readonly_fields = ['a', 'b']
A and b will appear before c.

On Mon, 5 Nov, 2018, 8:03 PM Karol Ołtarzewski <2004ka...@gmail.com wrote:

> I want to place normal fields below readonly_fields
>
>
> On Mon, 5 Nov 2018 at 07:08, Joel  wrote:
>
>> Explain. What do you mean move on top of page?
>>
>> On Mon, 5 Nov, 2018, 2:46 AM Karol Ołtarzewski <2004ka...@gmail.com
>> wrote:
>>
>>> Good morning guys.
>>>
>>> I have a problem namely:
>>> I have to place readonly_fields on top of
>>> /admin///change page, higher than normal fields.
>>> I was looking through docs and I can't find proper function to achieve
>>> that.
>>>
>>> What I have to do to reach my goal?
>>>
>>> --
>>> 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/2d680835-393a-4011-8599-495ef8d3da29%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/CAA%3Diw_-9u1HAJCsDh00YzCUR2ONQ6MJOW7kvT5fEPYShtr1Khw%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/CAF5bKVzRMHaEiWU3bpxTRXougkF0NQVbk-5oCj6dJ2jH3D1RwQ%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/CAD-d1sbjZR%3DycjN7ePBiLhiNvbyD1UF961Hg8NLdg_k30j_%2Byg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to move readonly_fields on top of page?

2018-11-05 Thread Shashank Singh
Override fields and add readonly_fields first.

On Mon, 5 Nov, 2018, 11:38 AM Joel  Explain. What do you mean move on top of page?
>
> On Mon, 5 Nov, 2018, 2:46 AM Karol Ołtarzewski <2004ka...@gmail.com wrote:
>
>> Good morning guys.
>>
>> I have a problem namely:
>> I have to place readonly_fields on top of
>> /admin///change page, higher than normal fields.
>> I was looking through docs and I can't find proper function to achieve
>> that.
>>
>> What I have to do to reach my goal?
>>
>> --
>> 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/2d680835-393a-4011-8599-495ef8d3da29%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/CAA%3Diw_-9u1HAJCsDh00YzCUR2ONQ6MJOW7kvT5fEPYShtr1Khw%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/CAD-d1sab3PRLxFXdsr9DGYpnqLK9B0veKMM2yqfWxhWOuipxiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.