Re: How to create form to show user input and return results from DB

2020-01-04 Thread victor jack

Hi Nina , just read your write up 
For some form of clarification to your Confusion I’ll just answer the ones I 
can 

For the database , don’t make two different ones , one database with two tables 
2000 and 2010 will do just fine , just query then right. 

For the forms it is required to use POST cause it is more secure since you are 
POSTING form data ( which I feel is sensitive information)

I hope this helps , if I am free I might check out your github link 

>> On 4 Jan 2020, at 00:12, "nmaxbe...@gmail.com"  wrote:
> 
> Hi,
> 
> I am creating a website that lists my states congressional districts based on 
> the US census (i.e. 2000, 2010 and ultimately to update when the 2020 survey 
> is completed).  The entire exercise is to track how the representation could 
> possibly change based on the US census.
> 
> So far, I have a mock-up for two user inputs: one for 2000 and one for 2010 
> entering their zip codes on the homepage. The user is prompted to input their 
> zip code (for each census year) in order to see their representative for 2000 
> and 2010 (basically pulling from a db to show the results) and the results 
> show on the results page (new tab).
> 
> My confusion: 
> Should I combine the DB's to "respond" to the users input or keep DB's (2000, 
> 2010) separate?
> I understand how to create models and I understand how to create views, but I 
> am confused on creating the form (specifically "GET" vs "POST".
> Is POST what the user inputs? If so, how do I "search through the existing 
> DB"?
> I have reviewed the form docs within Django but still am lost.  Please help.
> As you suspected, I am new to Django but want to "get over this hump".  I 
> feel I am reaching too far and the answer is in front of my face.  My github 
> is: https://github.com/NinaMaxberry/Cornerstone-Project. Once you visit, you 
> will see, I've tried a lot of options.
> 
> Any help would be greatly 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/5f1995c7-6e6c-4147-b53b-10373c7b4b31%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/751A25AC-EF77-4519-97D0-A55CC94FDCAD%40gmail.com.


Re: Complete book

2019-10-22 Thread victor jack
Thanks a lot for sharing 

> On 19 Oct 2019, at 15:09, ISAAC NELSON S.B. KARGBO  
> wrote:
> 
> 
> Try this one out
> 
>> On Sat, Oct 19, 2019, 13:47 Md Nayem Tushar  wrote:
>> Have any easy and properly complete book in django? pls ans me
>> -- 
>> 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/b523ac3b-9aad-4c1b-a4f9-d9310b6f69da%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/CAA4EwCsFAkvbZ99z5aT9jX-R849Gkxg%3DTbSaSRvE-qUShgOL6w%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/E13DDDE6-5FEA-413A-B3AF-97BE709454C9%40gmail.com.


Re: NoReverseMatch at /catalog/author/1

2018-10-09 Thread victor jack
Manjunath thanks i have fixed the bug in my code , the problem was in the
author_detail page. THanks so much for your time , i really appreciate your
help
On Tue, Oct 9, 2018 at 9:40 AM Manjunath  wrote:

> No issues.
> So, is the issue resolved now?
>
> On Tuesday, October 9, 2018 at 10:51:13 AM UTC+5:30, victor jack wrote:
>>
>> Will check it out . Thanks for your input very much appreciated
>>
>> On Tue, 9 Oct 2018 6:17 AM Manjunath,  wrote:
>>
>>> Hi Victor,
>>> Are you sure book.author.pk has value?
>>> can you send the model definition of Book & Author to verify?
>>> Or you can verify yourself by using django Shell.
>>>
>>>
>>> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack wrote:
>>>>
>>>>
>>>> Thanks Manjunath, i will post two screen shots of the templates
>>>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>>>
>>>>> Seems like you are not passing the argument along with the url.
>>>>> Please share your template file to verify.
>>>>>
>>>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote:
>>>>>>
>>>>>> Hello guys, i am in dire need of any django user's knowledge, i have
>>>>>> this issue that has been bugging me literally in my codebase. I want to
>>>>>> render a html page but the error keeps on coming, i have tried but to no
>>>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps
>>>>>> throwing me off please guys i need your assistance. Attached are the
>>>>>> screenshots . 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...@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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/a619bb69-b9be-481b-8731-51f9b920c817%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/8b5f8e90-5ecb-4593-915e-e495e998760a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/8b5f8e90-5ecb-4593-915e-e495e998760a%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/CABkm6MWJzMANM0xZEgMkLOVA76_yQFD%2BDf4PJDpSZ0%3DKccNQ4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-08 Thread victor jack
Your application'software URL  is not mapped correctly , from the error
page it is only the admin that can be loaded .

On Tue, 9 Oct 2018 6:40 AM Pradeep Singh,  wrote:

>
>
> On Mon, 8 Oct 2018 at 22:30, victor jack  wrote:
>
>> screenshot of the error message Singh will be helpful
>>
>> On Tue, 9 Oct 2018 6:24 AM Pradeep Singh,  wrote:
>>
>>> i am using python 3.7+django 2.0
>>>
>>> On Tue, 9 Oct 2018 at 10:52, Pradeep Singh 
>>> wrote:
>>>
>>>> what is wrong with my...code...and setting please tell me
>>>>
>>>> On Tue, 9 Oct 2018 at 10:52, Pradeep Singh 
>>>> wrote:
>>>>
>>>>> please help me ...i am always getting django 404 error .how to fix
>>>>> it
>>>>>
>>>>> On Mon, 8 Oct 2018 at 22:17, Manjunath 
>>>>> wrote:
>>>>>
>>>>>> Hi Victor,
>>>>>> Are you sure book.author.pk has value?
>>>>>> can you send the model definition of Book & Author to verify?
>>>>>> Or you can verify yourself by using django Shell.
>>>>>>
>>>>>>
>>>>>> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Thanks Manjunath, i will post two screen shots of the templates
>>>>>>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>>>>>>
>>>>>>>> Seems like you are not passing the argument along with the url.
>>>>>>>> Please share your template file to verify.
>>>>>>>>
>>>>>>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Hello guys, i am in dire need of any django user's knowledge, i
>>>>>>>>> have this issue that has been bugging me literally in my codebase. I 
>>>>>>>>> want
>>>>>>>>> to render a html page but the error keeps on coming, i have tried but 
>>>>>>>>> to no
>>>>>>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps
>>>>>>>>> throwing me off please guys i need your assistance. Attached are
>>>>>>>>> the screenshots . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/django-users/a619bb69-b9be-481b-8731-51f9b920c817%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/CANwgZcaRK6uCOy0QPRWe%3DgNeo%3DaLcyTRx2U7adixe-mB5Xof1g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CANwgZcaRK6uCOy0QPRWe%3DgNeo%3DaLcyTRx2U7adixe-mB5Xof1g%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 fr

Re: NoReverseMatch at /catalog/author/1

2018-10-08 Thread victor jack
screenshot of the error message Singh will be helpful

On Tue, 9 Oct 2018 6:24 AM Pradeep Singh,  wrote:

> i am using python 3.7+django 2.0
>
> On Tue, 9 Oct 2018 at 10:52, Pradeep Singh  wrote:
>
>> what is wrong with my...code...and setting please tell me
>>
>> On Tue, 9 Oct 2018 at 10:52, Pradeep Singh  wrote:
>>
>>> please help me ...i am always getting django 404 error .how to fix it
>>>
>>> On Mon, 8 Oct 2018 at 22:17, Manjunath  wrote:
>>>
>>>> Hi Victor,
>>>> Are you sure book.author.pk has value?
>>>> can you send the model definition of Book & Author to verify?
>>>> Or you can verify yourself by using django Shell.
>>>>
>>>>
>>>> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack wrote:
>>>>>
>>>>>
>>>>> Thanks Manjunath, i will post two screen shots of the templates
>>>>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>>>>
>>>>>> Seems like you are not passing the argument along with the url.
>>>>>> Please share your template file to verify.
>>>>>>
>>>>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack
>>>>>> wrote:
>>>>>>>
>>>>>>> Hello guys, i am in dire need of any django user's knowledge, i have
>>>>>>> this issue that has been bugging me literally in my codebase. I want to
>>>>>>> render a html page but the error keeps on coming, i have tried but to no
>>>>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps
>>>>>>> throwing me off please guys i need your assistance. Attached are
>>>>>>> the screenshots . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/a619bb69-b9be-481b-8731-51f9b920c817%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/CANwgZcaRK6uCOy0QPRWe%3DgNeo%3DaLcyTRx2U7adixe-mB5Xof1g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CANwgZcaRK6uCOy0QPRWe%3DgNeo%3DaLcyTRx2U7adixe-mB5Xof1g%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/CABkm6MVqrT9tydRX6ndJf2xk_AMMTBqvqvjYn3yqAiRTHaWPjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-08 Thread victor jack
Will check it out . Thanks for your input very much appreciated

On Tue, 9 Oct 2018 6:17 AM Manjunath,  wrote:

> Hi Victor,
> Are you sure book.author.pk has value?
> can you send the model definition of Book & Author to verify?
> Or you can verify yourself by using django Shell.
>
>
> On Tuesday, October 9, 2018 at 12:52:28 AM UTC+5:30, victor jack wrote:
>>
>>
>> Thanks Manjunath, i will post two screen shots of the templates
>> On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>>>
>>> Seems like you are not passing the argument along with the url.
>>> Please share your template file to verify.
>>>
>>> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote:
>>>>
>>>> Hello guys, i am in dire need of any django user's knowledge, i have
>>>> this issue that has been bugging me literally in my codebase. I want to
>>>> render a html page but the error keeps on coming, i have tried but to no
>>>> avail, ['catalog\\/author/(?P\\d+)$'] - this regex keeps throwing
>>>> me off please guys i need your assistance. Attached are the
>>>> screenshots . 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/a619bb69-b9be-481b-8731-51f9b920c817%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a619bb69-b9be-481b-8731-51f9b920c817%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/CABkm6MVhDKdF9AY010WYV_WhfrD96Cakw_6Q37gdQe_s4sdvMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: NoReverseMatch at /catalog/author/1

2018-10-08 Thread victor jack

Thanks Manjunath, i will post two screen shots of the templates 
On Saturday, October 6, 2018 at 7:25:50 AM UTC+1, Manjunath wrote:
>
> Seems like you are not passing the argument along with the url.
> Please share your template file to verify.
>
> On Saturday, October 6, 2018 at 7:06:08 AM UTC+5:30, victor jack wrote:
>>
>> Hello guys, i am in dire need of any django user's knowledge, i have this 
>> issue that has been bugging me literally in my codebase. I want to render a 
>> html page but the error keeps on coming, i have tried but to no avail, 
>> ['catalog\\/author/(?P\\d+)$'] 
>> - this regex keeps throwing me off please guys i need your assistance. 
>> Attached are the screenshots . 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/3b890b8c-5bb3-4d5f-9603-4bacc3bba790%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can i modify the base_site.html Template?

2018-09-03 Thread victor jack
*Ok i see, you create an admin folder in your template folder then create a
base_site.html and an index. html file , these file will contain your
custom feature ,then when you runserver the new admin site will be rendered
from there(admin ) folder. I hope this helps.*
On Mon, Sep 3, 2018 at 7:58 PM  wrote:

> Yes, that exactly
>
> --
> 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/9eaec872-a629-4b70-994d-2b6d2b3c942c%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/CABkm6MXKVH-AXoSGwSW3RjMc-ywTBrqGink%3Dd%3D6pAYLY9G-2vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can i modify the base_site.html Template?

2018-09-03 Thread victor jack
Do u want to customise  the admin page to be different  from the default
 one django  provides?


On Mon, 3 Sep 2018 8:04 AM ,  wrote:

> Hello, i want to change de title and the default text in the header of the
> Django-Admin site but i don´t know 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/51312f80-3d0c-417a-b36e-d42b397fa5f1%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/CABkm6MVsBM8KO0-TBLqam%2Br8sjnwTCauXW10pU%2B0i6V2wZOC7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: text editor

2018-09-02 Thread victor jack
More like vim and vs code are the best editors

On Sun, 2 Sep 2018 06:51 RONAK JAIN,  wrote:

> Atom is best editor.
>
> On Sun, 2 Sep 2018, 11:11 a.m. sankar ardhas, 
> wrote:
>
>>
>> Hi to all,
>> Which is the best editor for django framework  in Ubuntu os
>> 18.04
>>
>> Get Outlook for Android 
>>
>>
>>
>>
>> On Sun, Sep 2, 2018 at 1:46 AM +0530, "RONAK JAIN" <
>> jainronak...@gmail.com> wrote:
>>
>> Namaste !!
>>>
>>> Dear ,
>>>
>>> I have two models categories and Project.
>>>
>>>  created like that :
>>>
>>> class Category(models.Model):
>>> categorys = models.ManyToManyField('Category',blank=True)
>>> name = models.CharField(max_length=100)
>>> created_at = models.DateTimeField(auto_now=False, auto_now_add=True)
>>> updated_at = models.DateTimeField(auto_now=True)
>>>
>>>
>>>
>>> class Meta:
>>> verbose_name_plural = "Categories"
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>> def __unicode__(self):
>>> return self.categorys
>>>
>>> class Project(models.Model):
>>> categorys = models.ManyToManyField('Category',blank=True)
>>> name = models.CharField(max_length=100)
>>> description = models.CharField(max_length=100)
>>> created_at = models.DateTimeField(auto_now=False, auto_now_add=True)
>>> updated_at = models.DateTimeField(auto_now=True)
>>> photo = models.ImageField(upload_to="pictures")
>>>
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>> def __unicode__(self):
>>> return self.categorys
>>>
>>> *and Views I did here :*
>>>
>>> *from web.models import Category,Project*
>>>
>>> class Portfolio(TemplateView):
>>> template_name = "web/protfolio.html"
>>>
>>> def post(self, request, *args, **kwargs):
>>> context = self.get_context_data()
>>> return super(TemplateView, self).render_to_response(context)
>>>
>>> def portfolio(request):
>>>   context = RequestContext(request)
>>>   # Project_list = Project.objects.order_by('-likes')[:3]
>>>   # context_dict = {'Project': project_list}
>>>   # return render(template_name, context_dict, context
>>>   brand_list = Category.objects.all()
>>>   return render(template_name, {'brand_list' : brand_list},
>>> context)
>>>
>>> *I need correct relationship both I mean project and categories. How can
>>> I do correct here ? *
>>> Note : I attached picture please analyse briefly.
>>>
>>> How to do approch html page and   I want  the html(view) page should
>>> load from our db.
>>> please give me quickly answer.
>>> How can i do ?
>>>
>>>
>>> Thanks
>>> Ronak
>>>
>>> --
>>> 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/63ecd6f1-411a-4581-b245-296efbd49303%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/39ABAA35669F59A4.eb8de1ab-f7fe-4f09-ac86-ab24def151d1%40mail.outlook.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/CA%2BAqMUcMUft6Wfa_YUzhRshp4vDF4fT5UxfUfUh2XeazH%2BxSxQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this messag

Re: How can I get back my English pages (multi-lingual site updated from en to en-us)

2018-09-02 Thread victor jack
https://docs.djangoproject.com/en/2.0/topics/i18n/

check this out, but i don't think changing language_code from en to en-us
is the problem.

On Sat, Sep 1, 2018 at 2:31 PM Leo Treasure  wrote:

> Hello,
>
> I've needed to update the settings.py file LANGUAGE_CODE = 'en' to 'en-us'
> which has resulted in the English pages becoming empty.
>
> I've been told by my host that there maybe an SQL command I need to run to
> change the languages for the previously created pages over to en-us.
>
> Can someone help me with this please?
>
> --
> 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/086037f5-08b3-4816-85c1-82d22e03be70%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/CABkm6MVvxLBM-%2BhwnyFDmyn_s74G8Ycs8fnxGF5m%2B5EZ9T7MLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: creating virtualenv for django but i get import zlib module error what could be the problem

2018-09-02 Thread victor jack
from the error message , i think you need to install the  package zlib and
import it.

On Sat, Sep 1, 2018 at 2:31 PM Lutalo Bbosa joseph 
wrote:

> raceback (most recent call last):
>   File "/usr/local/bin/virtualenv", line 9, in 
> load_entry_point('virtualenv==15.0.1', 'console_scripts',
> 'virtualenv')()
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 542, in load_entry_point
> return get_distribution(dist).load_entry_point(group, name)
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2569, in load_entry_point
> return ep.load()
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2229, in load
> return self.resolve()
>   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line
> 2235, in resolve
> module = __import__(self.module_name, fromlist=['__name__'], level=0)
>   File "/usr/lib/python3/dist-packages/virtualenv.py", line 1993, in
> 
> """)
>   File "/usr/lib/python3/dist-packages/virtualenv.py", line 1848, in
> convert
> return zlib.decompress(b).decode('utf-8')
> NameError: name 'zlib' is not defined
>
> --
> 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/44266161-c188-45e9-9b91-94901b7d8232%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/CABkm6MV-OVYFk_vxZwRKCPwmOO7V1hhXccdYcUfYj1yo2v0%2BwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: __init__.py Won't Upload To Github Respository

2018-09-02 Thread victor jack
Thanks for the link stephen , really much appreciated.

On Sat, Sep 1, 2018 at 7:59 PM Stephen J. Butler 
wrote:

> GitHub has an excellent set of gitignore files. My first commit to a
> project is always one of these:
>
> https://github.com/github/gitignore
>
> In particular:
> https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
>
>
> On Sat, Sep 1, 2018 at 10:52 AM Kasper Laudrup 
> wrote:
>
>> Hi Sandy,
>>
>> On 01/09/2018 17.18, Sandy Leon wrote:
>> > Hello everyone,
>> > I am trying to upload my Django site files to github to then deploy with
>> > Heroku.
>> > I have had no major problems except in trying to upload the folder that
>> > contains my Django site, github gets stuck on trying to upload '
>> > /mysite/polls/__pycache__/__init__.cpython-36.pyc'
>> > Just to be clear, my project is called 'mysite' and the app that I made
>> > following the Django tutorial is called polls.
>> > Thanks you in advance to anyone who can help.
>> >
>>
>> I have no idea why you are not able to upload these files, but you
>> shouldn't be uploading cache files or compiled python modules to you git
>> repository anyway.
>>
>> If you have any of these files in your local git repository, remove them
>> using "git rm".
>>
>> Something like:
>>
>> # find -name __pycache__ -exec git rm -r {} \;
>>
>> And:
>>
>> # find -name *.pyc -exec git rm {} \;
>>
>> Ought to do it.
>>
>> Then commit these changes with something like:
>>
>> # git commit -m "Remove cache and object files from repository"
>>
>> Finally add cache and compiled object files to you .gitignore. Something
>> like:
>>
>> *.pyc
>> __pycache__
>>
>> And try to push your changes again.
>>
>> Be aware that I have not actually tested any of these commands, so
>> please be careful before blindly executing them.
>>
>> Hope that helps a bit.
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> --
>> 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/12e119ed-9ffe-d30a-2f88-71f8c70c37dd%40stacktrace.dk
>> .
>> 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/CAD4ANxVoJg7y9%2B6jga5PSpCR%3Dc0hGy6F2DBTqDY%3Di9nO7RVv7g%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/CABkm6MU77ZMrspuzQeiCQBFrPTsnbb-Nb9RZ1FxwTDJO9E00KQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django website hosting

2018-08-27 Thread victor jack
Check out the documentation  on digital ocean

On Sat, 25 Aug 2018 15:36 ERICK OMONDI AYARA,  wrote:

> I would like to host a django project onto a web domain but cant seem to
> get around it. i cant also find the python setup on the SOFTWARE section of
> my file manager. Is there a way to do this? 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/714a85d5-3bc3-4817-a66c-a92c0397f332%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/CABkm6MVwK4ys61H6mWq%3DF0Mnni7%3Dq7dZto_iNapCHfm92EWo0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.