Re: University management system

2019-10-09 Thread Nitin Kumar
I can do this for you over the week end, you will have to pay me for that.



On Wed, 9 Oct, 2019, 10:24 PM Ankita Gupta, 
wrote:

> Hello everyone!
> I have a project to make on university management system.
> BASIC requirements-
> 1. Heirarichal mode(multiple users like mentor, student, Dean, advisors
> etc)
> 2. Students need to post daily blogs about their progress(if certain task
> is given to them by their mentors).
> 3. Blogs will have images, url, links, etc.
> 4. Discussion forum or maybe comment system in simple language where
> mentor and student can interact over the blog.
> 5. Weekly and monthly report generator of student's progress like no. Of
> blogs, how much they were active etc.
> 6. Mentor provided with grading facility just like we have different
> emojis on Facebook post.
> I want to know if is this possible with any cms because I am very much
> short of time. And I have less practical knowledge of django. I have tried
> many open source projects regarding blog part but couldn't find useful to
> me. I have to submit this project in 1 week.
> Django users, waiting for your valuable response to this thread.
>
> --
> 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/5740d448-d6ad-48b7-a8ab-11bb6a6982ab%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/CAKzNicEC5d1fjq%2BNxk80%3DkUdG0AP%2BCVb-5WmEEx8B16EYA9Cgw%40mail.gmail.com.


ANYONE!!! Django ai working

2019-09-13 Thread nitin kumar
How does make application to understand a document!

-- 
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/39637257-1b12-46ff-bbf5-ebf0fdfb2cb7%40googlegroups.com.


Re: Dblink creation from Oracle 11g to postgres

2019-09-10 Thread nitin kumar
Sure, for what we are here.
How?

On Tue 10 Sep, 2019, 10:18 PM Peter Mudoko,  wrote:

> Hey I have done one can we discuss about it
>
> On Tue, 10 Sep 2019, 18:12 nitin kumar,  wrote:
>
>> I just want to fetch the data to populate (non editable)in different
>> interface from Oracle 11g to postgresql.
>>
>> How to create the dblink between these two database. What procedure I
>> have to follow?
>>
>> --
>> 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/f20f9a61-f6f3-43af-8cde-8024eb55976a%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/CABfSCxfenog8PgDVm5%3D_zAupV%2ByLsHkhTbfysJaJcg5JQw3BFA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABfSCxfenog8PgDVm5%3D_zAupV%2ByLsHkhTbfysJaJcg5JQw3BFA%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/CACNQfLGRX_aV5eLZXsF4CuDfOrwJRsE7A7%2BuxyRFKbEjVVbyag%40mail.gmail.com.


Re: Django ORM

2019-09-10 Thread nitin kumar
Not getting you exactly.
Want to populate data based on searching db?

-- 
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/c35cfe2b-2187-463a-bba2-19ee39244456%40googlegroups.com.


Dblink creation from Oracle 11g to postgres

2019-09-10 Thread nitin kumar
I just want to fetch the data to populate (non editable)in different interface 
from Oracle 11g to postgresql.

How to create the dblink between these two database. What procedure I have to 
follow?

-- 
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/f20f9a61-f6f3-43af-8cde-8024eb55976a%40googlegroups.com.


Data on Popup

2019-09-08 Thread nitin kumar
How to popup unique id of recently saved data.
I get the data by 
 data = Class(##inserting value into table)
data.save()
data.id


But how to print this is on popup

-- 
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/88bd1632-60a1-4cfb-ab72-256679a6ff93%40googlegroups.com.


Re: On submitting data using get errors

2019-09-02 Thread nitin kumar
Thank you !!

On Tue 3 Sep, 2019, 1:52 AM Nitin Kumar,  wrote:

> form3 at line 16 is no longer model form3 you imported in line 3
> it is a function you defined at line 8.
>
> So form3 does not take **kwargs.
> at line 16 you are passing keyword arguments to the form3 function defined
> in line 8.
>
> Use camel-case to define models.
>
>
>
> On Tue, Sep 3, 2019 at 12:31 AM nitin kumar 
> wrote:
>
>> Please find models.py, views.py and error on browser
>>
>> Thanks
>>
>> On Mon 2 Sep, 2019, 9:29 PM Suraj Thapa FC, 
>> wrote:
>>
>>> Code pls
>>>
>>> On Mon, 2 Sep, 2019, 9:20 PM nitin kumar, 
>>> wrote:
>>>
>>>> On submitting data using text field of html getting error of
>>>>  form2() got an unexpected keyword argument 'aname'
>>>> Where
>>>> Form2()- class defined in model
>>>> aname- attribute of class
>>>> In other way form2 is table with column Anne
>>>> Db - postgresql
>>>>
>>>> --
>>>> 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/3decfa9b-ec45-467e-b4a7-01e083d60e83%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/CAPjsHcG_GC1tm72z%3D%2BSPF1jKOzgrox2WJ0pAn0Wp%2BM2Gp9FjFQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAPjsHcG_GC1tm72z%3D%2BSPF1jKOzgrox2WJ0pAn0Wp%2BM2Gp9FjFQ%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/CACNQfLEpQwgP2xDWEU16EiX%2B%2BA3myw3gB_wqQea4c74M1a1g7A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACNQfLEpQwgP2xDWEU16EiX%2B%2BA3myw3gB_wqQea4c74M1a1g7A%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/CAKzNicH0PujwYrkgZQ7dMA9sP9VhQMpE6k%2BFt9LTWJuH9W-WRQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKzNicH0PujwYrkgZQ7dMA9sP9VhQMpE6k%2BFt9LTWJuH9W-WRQ%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/CACNQfLF%2B%2B7hD2YNjvSeDhUZiV1hPhB4kCvge1x2sVV3QtsBx_g%40mail.gmail.com.


Re: On submitting data using get errors

2019-09-02 Thread Nitin Kumar
form3 at line 16 is no longer model form3 you imported in line 3
it is a function you defined at line 8.

So form3 does not take **kwargs.
at line 16 you are passing keyword arguments to the form3 function defined
in line 8.

Use camel-case to define models.



On Tue, Sep 3, 2019 at 12:31 AM nitin kumar  wrote:

> Please find models.py, views.py and error on browser
>
> Thanks
>
> On Mon 2 Sep, 2019, 9:29 PM Suraj Thapa FC, 
> wrote:
>
>> Code pls
>>
>> On Mon, 2 Sep, 2019, 9:20 PM nitin kumar, 
>> wrote:
>>
>>> On submitting data using text field of html getting error of
>>>  form2() got an unexpected keyword argument 'aname'
>>> Where
>>> Form2()- class defined in model
>>> aname- attribute of class
>>> In other way form2 is table with column Anne
>>> Db - postgresql
>>>
>>> --
>>> 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/3decfa9b-ec45-467e-b4a7-01e083d60e83%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/CAPjsHcG_GC1tm72z%3D%2BSPF1jKOzgrox2WJ0pAn0Wp%2BM2Gp9FjFQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAPjsHcG_GC1tm72z%3D%2BSPF1jKOzgrox2WJ0pAn0Wp%2BM2Gp9FjFQ%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/CACNQfLEpQwgP2xDWEU16EiX%2B%2BA3myw3gB_wqQea4c74M1a1g7A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACNQfLEpQwgP2xDWEU16EiX%2B%2BA3myw3gB_wqQea4c74M1a1g7A%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/CAKzNicH0PujwYrkgZQ7dMA9sP9VhQMpE6k%2BFt9LTWJuH9W-WRQ%40mail.gmail.com.


On submitting data using get errors

2019-09-02 Thread nitin kumar
On submitting data using text field of html getting error of 
 form2() got an unexpected keyword argument 'aname'
Where
Form2()- class defined in model
aname- attribute of class
In other way form2 is table with column Anne
Db - postgresql

-- 
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/3decfa9b-ec45-467e-b4a7-01e083d60e83%40googlegroups.com.


Re: select records from a model in another django app

2019-07-30 Thread Nitin Kumar
Import another app model.

On Tue, 30 Jul, 2019, 4:28 PM Perceval Maturure, 
wrote:

> i want to display  model data using a class based view from another model
> in a different app.any idead
>
> --
> 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/5529da22-0981-43ca-a98a-d13edcc5ba94%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/CAKzNicG9paZfyTWFqMD5hNxwrhT-FH1rKFqxA24oj%3DMprzQZtw%40mail.gmail.com.


Re: Display image in template

2019-05-28 Thread Nitin Kumar
{{ album.album_logo.url }}

On Wed, 29 May, 2019, 12:08 AM anchal agarwal  Thanks for the answer but  I have already set the MEDIA path
> here is my urls.py
> from . import settings
> from django.contrib.staticfiles.urls import static
> from django.contrib.staticfiles.urls import staticfiles_urlpatterns
> urlpatterns += staticfiles_urlpatterns()
> urlpatterns += static(settings.MEDIA_URL, document_root
> =settings.MEDIA_ROOT)
>
> models.py
> from django.db import models
>
> class Album(models.Model):
> artist = models.CharField(max_length=250)
> album_title = models.CharField(max_length=500)
> genre=models.CharField(max_length=100)
> album_logo = models.ImageField(upload_to="gallery")
>
> def __str__(self):
> return self.album_title
>
>
>  settings.py
> import os
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
> MEDIA_ROOT=os.path.join(BASE_DIR,'media')
> MEDIA_URL= '/media/'
>
> On Tue, May 28, 2019 at 11:42 PM Anirudh Jain 
> wrote:
>
>> You will have to setup MEDIA path f8rst. All your uploded files will be
>> stored in that folder. STATIC path is used only for, well, static content
>> like css and js.
>>
>> On Tue, 28 May 2019, 23:31 anchal agarwal, 
>> wrote:
>>
>>> I want to display image dynamically from the database in a django
>>> template. I have used ImageField for this purpose. The code shows no error
>>> but it is only displaying an icon of image.
>>> This is my template file,
>>> here album is the context and album_logo is the variable in which i have
>>> stored my image. please tell me how can i fix this issue
>>> 
>>>
>>> {{ album.album_title}}
>>> {{ album.artist }}
>>>
>>> 
>>> {% for song in album.song_set.all %}
>>> {{song.song_title}}-{{song.file_type}}
>>> {% endfor %}
>>> 
>>>
>>> --
>>> 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/CAMT%3DisWxuO9d1tTMacyYauDAmQS%2B2e_B9HawfZP7eY8smCS%3D2Q%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/CAC3mK7fGps2XR1S7V%2B4WvU-%2Boma-eoUTrtDjEwVJe2QtCTL_Xg%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/CAMT%3DisWvaOt-NYXGa-Ps5yO7b-bbTfi3%3Dii4wzQmzVCOH%3DO50A%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/CAKzNicEyaCS_7OFhNU00AsANZ%2Bz%3DpW7_XCL-1pi7Jfo%3DR4bd-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need help for Cascading Drop Down for Continent, Country in Admin GUI - Not Getting correct Answer from Many Days

2019-05-22 Thread Nitin Kumar
Hi,

The field 'continent'  in Location model is redundant, should not be there.

class Location(models.Model):
continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
country = models.ForeignKey(Country,on_delete=models.CASCADE)
city = models.CharField(max_length=50)
street = models.CharField(max_length=100)




On Wed, May 22, 2019 at 11:22 AM Balaji Shetty 
wrote:

> Hi
>
> I have registered model in admin.py
> Added Continent  ( Cont1, Cont2, Cont3 )
>
> Added Country under Continent
>
> Cont1 - Count11
> Cont1- Count12
>
> Cont2 - Count21
> Cont2-Count22
>
> Con3-Count31
> Con3-Count31
>
> When I add Location
>
> When i select Cont1, I should get only Count11 , Count12
>
> When i select Cont2, I should get only Count21 , Count22
>
> When i select Cont3, I should get only Count31 , Count32
>
> But I get all Countries under all Continent. Cascading dependency are not
> shown
>
> I tried different option but lot of issues are there .
>
>
>
> Example
>
>
>
> On Wed, May 22, 2019 at 10:56 AM Nitin Kumar 
> wrote:
>
>> Everything seems alright. It seems you haven't created any continents
>> yet. The table is empty.
>>
>> On Wed, 22 May, 2019, 10:52 AM Balaji Shetty > wrote:
>>
>>> Hi
>>>
>>> I am learning Django from last months and want to implement Cascading
>>> Drop Down for Continent and  Country  in Admin GUI.
>>>
>>> I dropped same query two times but i could not get exact correct
>>> solution.
>>>
>>> I tried lot of option like
>>> django-smart-select and many more..
>>>
>>> But i could not get updates in drop down.
>>>
>>>  Can Any Django Expert solve this issue? Your help would be highly
>>> appreciated.
>>>
>>> This is sample Model for  demonstration of the schema
>>> models.py
>>> --
>>>
>>>
>>> class Continent(models.Model):
>>> name = models.CharField(max_length=255)
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>>
>>> class Country(models.Model):
>>> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
>>> name = models.CharField(max_length=255)
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>> class Location(models.Model):
>>> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
>>> country = models.ForeignKey(Country,on_delete=models.CASCADE)
>>> city = models.CharField(max_length=50)
>>> street = models.CharField(max_length=100)
>>>
>>> def __str__(self):
>>> return self.city
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information
>>> Technology,*
>>> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
>>> *Official: bsshe...@sggs.ac.in  *
>>> *  Mobile: +91-9270696267*
>>>
>>> --
>>> 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/CAECSbOtoje0sdMsoeQvCO-mq-h-AQVOKtnYA3wFnLAE-tPhXGg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAECSbOtoje0sdMsoeQvCO-mq-h-AQVOKtnYA3wFnLAE-tPhXGg%40mail.gmail.com?utm_medium=email_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/CAKzNicGqspLgrFnYf%3D%2B22s8SJUc2uVTt5223UJ7Ba1d6ZbtqbA%40mail.gmail.com
>> <https://groups.goo

Re: Need help for Cascading Drop Down for Continent, Country in Admin GUI - Not Getting correct Answer from Many Days

2019-05-21 Thread Nitin Kumar
Everything seems alright. It seems you haven't created any continents yet.
The table is empty.

On Wed, 22 May, 2019, 10:52 AM Balaji Shetty  Hi
>
> I am learning Django from last months and want to implement Cascading Drop
> Down for Continent and  Country  in Admin GUI.
>
> I dropped same query two times but i could not get exact correct solution.
>
> I tried lot of option like
> django-smart-select and many more..
>
> But i could not get updates in drop down.
>
>  Can Any Django Expert solve this issue? Your help would be highly
> appreciated.
>
> This is sample Model for  demonstration of the schema
> models.py
> --
>
>
> class Continent(models.Model):
> name = models.CharField(max_length=255)
>
> def __str__(self):
> return self.name
>
>
> class Country(models.Model):
> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
> name = models.CharField(max_length=255)
>
> def __str__(self):
> return self.name
>
> class Location(models.Model):
> continent = models.ForeignKey(Continent,on_delete=models.CASCADE)
> country = models.ForeignKey(Country,on_delete=models.CASCADE)
> city = models.CharField(max_length=50)
> street = models.CharField(max_length=100)
>
> def __str__(self):
> return self.city
>
>
>
>
> --
>
>
> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
> *Official: bsshe...@sggs.ac.in  *
> *  Mobile: +91-9270696267*
>
> --
> 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/CAECSbOtoje0sdMsoeQvCO-mq-h-AQVOKtnYA3wFnLAE-tPhXGg%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/CAKzNicGqspLgrFnYf%3D%2B22s8SJUc2uVTt5223UJ7Ba1d6ZbtqbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: looking for team members as my technical Advisory

2019-02-22 Thread Nitin Kumar
I am interested.

On Fri 22 Feb, 2019, 9:22 PM Jani Tiainen  I am interested in as well.
>
> On Fri, Feb 22, 2019 at 12:02 PM Nura Bash  wrote:
>
>> Good day, all am Nura bashir CEO of Teamlead enterprise Nigeria, am
>> looking for Technical advisory members for my project which am about to
>> start here in West Africa, is a plot project from 10 selected schools to
>> help train  kids django..
>>
>> If any one is interested I can be reach out via whatpp +23434832618 or my
>> email nurabas...@gmail.com
>> Thank you
>>
>> --
>> 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/4298c126-9392-4691-a40b-51420ebbaea1%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Jani Tiainen
>
> - Well planned is half done, and a half done has been sufficient before...
>
> --
> 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/CAHn91oc-%2B56jawabRBzNQ0W1bDrhfw%3Dw7WSgb%3DTBDLPsr_Pb7Q%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/CAKzNicFUd4fC4XWymLO9HBW6%2Bb5SgsLSzOdajg05sd0ZcDV-AA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Job Request

2019-01-25 Thread Nitin Kumar
@Roshan
I am interested.

On Fri, Jan 25, 2019 at 11:49 PM Roshan Shah  wrote:

> I do have a project that I want to get built on. Can I get some help from
> people who are starting in Django to work on it?
>
> Roshan
> Founder Cogdina Inc
> http://www.cogdina.com
>
> On Fri, Jan 25, 2019 at 11:47 AM Okware Aldo 
> wrote:
>
>> I am looking for projects I can contribute on. so if you have a project I
>> can contribute on. I am happy to help 2 hours of code in a week for free.
>>
>> On Fri, Jan 25, 2019 at 3:51 PM Nitin Kalmaste 
>> wrote:
>>
>>> Where can I find Live Projects to work on So that I can Improve My
>>> python Skills
>>>
>>> On Thursday, January 24, 2019 at 9:05:39 PM UTC+5:30, Motaz Hejaze wrote:

 Hi all ,

 Is there any remote job regarding Django , i am a beginner to mid-level
 in Django ..

 Thanks all ..

>>> --
>>> 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/abc65682-9f58-4898-b555-88e8752c0957%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/CAMEZma9T34QG-q%2B5VGqgNW6kuQNaYK7sJRyjt7WEO86LfwCZgQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> --
>
> Roshan Shah / Sr. IT Consultant
> techieros...@gmail.com / (519) 496-8860
>
> This e-mail message may contain confidential or legally privileged
> information and is intended only for the use of the intended recipient(s).
> Any unauthorized disclosure, dissemination, distribution, copying or the
> taking of any action in reliance on the information herein is prohibited.
> E-mails are not secure and cannot be guaranteed to be error free as they
> can be intercepted, amended, or contain viruses. Anyone who communicates
> with me by e-mail is deemed to have accepted these risks.
>
> --
> 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/CALX19NjanqdvHy1YXDta4PGXAJbwDNcrZaAtrLuMeuMXLqtJPg%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/CAKzNicF4-gDmjAOSP6EcY4B%2BtiN0x-HQiA-8z-AtsowZj2k5kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Job Request

2019-01-24 Thread Nitin Kumar
Hi,

I am also looking for similar jobs. If you find anything do let me know.
Please find attached.

Regards,
Nitin

On Thu, Jan 24, 2019 at 9:05 PM Motaz Hejaze  wrote:

> Hi all ,
>
> Is there any remote job regarding Django , i am a beginner to mid-level in
> Django ..
>
> Thanks all ..
>
> --
> 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/CAHV4E-eipXC8kxPcWg%2BhOBeiL0jw3b82Sohv%3D-S5s9F%2BimvO_A%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHV4E-eipXC8kxPcWg%2BhOBeiL0jw3b82Sohv%3D-S5s9F%2BimvO_A%40mail.gmail.com?utm_medium=email_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/CAKzNicEOU2soBYa1cBWJ-oJEzcqt%3DaC5U%3DECOmxWo580U9O9pw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Nitin-Kumar-Resume.pdf
Description: Adobe PDF document


Projects in django

2019-01-16 Thread Nitin Kumar
Hi,

I have an year of experience working in python and django.
I am looking for some projects in django for remote work.

Regards,
Nitin Kumar

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


Re: hi, How can I deploy my first Django website ?

2019-01-15 Thread Nitin Kumar
Here is a tutorial :
https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html

On Tue, Jan 15, 2019 at 8:37 PM  wrote:

> i can not understand
>
>
> On Tuesday, January 15, 2019 at 5:03:58 PM UTC+2, Nitin Kumar wrote:
>>
>> uwsgi/gunicorn
>> Nginx
>>
>>
>> On Tue 15 Jan, 2019, 8:30 PM >
>>> what is the best web hosting provider for Django websites?
>>>
>>> What should I learn to deploy my first Django website?
>>>
>>> what is the process?
>>>
>>> --
>>> 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/9c4d2241-5660-4ee7-9dd3-08401fa57099%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/9c4d2241-5660-4ee7-9dd3-08401fa57099%40googlegroups.com?utm_medium=email_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/93c2dbd5-041a-4c97-8183-5b733a3ffe9a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/93c2dbd5-041a-4c97-8183-5b733a3ffe9a%40googlegroups.com?utm_medium=email_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/CAKzNicETeqzUo1SyS19zHBKtZjPm6a0Him0%3Df9e0Ntmj353UZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: hi, How can I deploy my first Django website ?

2019-01-15 Thread Nitin Kumar
uwsgi/gunicorn
Nginx


On Tue 15 Jan, 2019, 8:30 PM  what is the best web hosting provider for Django websites?
>
> What should I learn to deploy my first Django website?
>
> what is the process?
>
> --
> 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/9c4d2241-5660-4ee7-9dd3-08401fa57099%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/CAKzNicGHL4Sn%3Dv3Xher%2BmTALo4G5U8KpS8h_7KrMOqCfJ7hC6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Convoluted setup information

2018-08-18 Thread Nitin Kumar
Congratulations.

On Sun, Aug 19, 2018 at 12:19 AM, akshay kanade 
wrote:

> Excellent thought. I’ll work on it and share something soon which could be
> helpful for others.
>
> Anyway got the rocket up and running finally 
>
>
> On Sat, 18 Aug 2018 at 11:56 PM, Joel Mathew  wrote:
>
>> You could perhaps provide more constructive advice by contributing to the
>> setup pages. I have written a small list of commands that I used for my
>> django setup, at https://blog.droidzone.in/2018/08/17/create-virtualenv-
>> with-python3/
>>
>> I do this mostly to keep me from repeatedly reinventing the wheel.
>>
>> Sincerely yours,
>>
>> Dr Joel G Mathew
>>
>>
>> On 18 August 2018 at 23:35, akshay kanade  wrote:
>>
>>> Mac OS
>>>
>>> Problems:
>>> So it’s pretty clear to me that one MUST install a virtual env before
>>> trying to run django.
>>> However the setup guide almost makes it sound like it’s optional.
>>>
>>> Why can’t the steps be mentioned clearly as also visually (and
>>> differentiate what’s essential and optional)?
>>>
>>> I figured out that I had two versions of python which was causing the
>>> issue. My guess is this is a common problem for everyone.
>>>
>>> I’m pretty sure if I hadn’t installed virtualenv there was no way I
>>> would be able to run django without first messing up the python version I
>>> already had installed
>>>
>>> Anyway, my point is that the setup guide assumes that people will
>>> understand that these problems will occur and somehow figure a way out. I
>>> just feel it can be simplified.
>>> As a first experience especially for beginners it’s not very encouraging.
>>>
>>> On Sat, 18 Aug 2018 at 11:28 PM, mottaz hejaze 
>>> wrote:
>>>
 what is your operating system ?
 what problems do you have

 On Sat, Aug 18, 2018 at 7:44 PM,  wrote:

> Hi, I'm new to Django and I found the setup guide pretty useless. Had
> to refer to many articles on stackoverflow just to get basic django
> (+pip+python+virtualenv) installed.
> Why make it so complicated?
> Why not include screenshots?
>
> Also rather than pointing only to this group for help why not link to
> the best stackoverflow articles that cover the problems commonly faced by
> new users?
>
> --
> 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/025c7e3c-850f-439a-8b08-a3fdb5d44404%
> 40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

 --
 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/9b3lT9PXjg8/unsubscribe.
 To unsubscribe from this group and all its topics, 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/CAHV4E-fhnz1np4B4eEerok2x5WKDNABKRj2T
 fPMNXbGXJbjqqQ%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/CAJ8hMtaCZHm4YdAXcSauwZwVAQVyb
>>> vd3Tg_kaZmThO-XWoA_Rg%40mail.gmail.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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/9b3lT9PXjg8/unsubscribe.

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread Nitin Kumar
There is community version of pycharm.

Please write the logs that will be helpful.

On Fri, May 18, 2018 at 10:48 PM, <ankitklinke...@gmail.com> wrote:

> Hi James,
>
> Thanks for suggestion. I would buy that.
>
> Meanwhile, is there anyway, i could resolve this.
>
> Regards,
> Ankit
>
> On Friday, May 18, 2018 at 6:41:29 PM UTC+2, James Farris wrote:
>>
>> This is where an IDE like PyCharm comes in handy. It will tell you right
>> away that it doesn’t recognize something and will suggest importing that
>> package. It does a pretty good job with its suggestions.
>>
>> On Fri, May 18, 2018 at 9:35 AM Nitin Kumar <nitink...@gmail.com> wrote:
>>
>>> you have to import include.
>>>
>>> from django.urls import path, include
>>>
>>> On Fri, May 18, 2018 at 9:45 PM, <ankitkl...@gmail.com> wrote:
>>>
>>>> Hi Nitin,
>>>>
>>>> Thanks for quick response.
>>>>
>>>> Please find the below code from locallibrary/urls.py
>>>>
>>>> Could you please let me know, where shall i add the url.
>>>>
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> from django.contrib import admin
>>>> from django.urls import path
>>>>
>>>> urlpatterns = [
>>>> path('admin/', admin.site.urls),
>>>> ]
>>>>
>>>>
>>>> from django.urls import path
>>>> from django.contrib import admin
>>>>
>>>> # Use include() to add URLS from the catalog application and
>>>> authentication system
>>>> from django.urls import include
>>>>
>>>>
>>>> urlpatterns = [
>>>> path('admin/', admin.site.urls),
>>>> ]
>>>>
>>>>
>>>> urlpatterns += [
>>>> path('catalog/', include('catalog.urls')),
>>>> ]
>>>>
>>>>
>>>> # Use static() to add url mapping to serve static files during
>>>> development (only)
>>>> from django.conf import settings
>>>> from django.conf.urls.static import static
>>>>
>>>>
>>>> urlpatterns+= static(settings.STATIC_URL, document_root=settings.STATIC_
>>>> ROOT)
>>>>
>>>>
>>>> #Add URL maps to redirect the base URL to our application
>>>> from django.views.generic import RedirectView
>>>> urlpatterns += [
>>>> path('', RedirectView.as_view(url='/catalog/', permanent=True)),
>>>> ]
>>>>
>>>> 
>>>> 
>>>> 
>>>> --
>>>>
>>>> On Friday, May 18, 2018 at 6:09:33 PM UTC+2, Nitin Kumar wrote:
>>>>>
>>>>> Hi Ankit,
>>>>>
>>>>> You must add the urls of catalog to the project urls,
>>>>> locallibrary.urls.
>>>>>
>>>>> On Fri, May 18, 2018 at 8:32 PM, <ankitkl...@gmail.com> wrote:
>>>>>
>>>>>> Hi Doug,
>>>>>>
>>>>>> I am new to Django and i also started with MDN Locallibrary project.
>>>>>> Everything went fine until Django admin site but I stuck at "Creating
>>>>>> our home page
>>>>>> <https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Home_page>"
>>>>>> I have written the code in the suggested way only but get below error 
>>>>>> when
>>>>>> try to run the project. I tried taking the urls.py code from github also
>>>>>> but it gives same issue.
>>>>>>
>>>>>> Could you please help me here.
>>>>>>
>>>>>> Regards,
>>>>>> Ankit
>>>>>>
>>>>>>
>>>>>> Page not found (404)
>>>>>> Request Method: GET
>>>>>> Request URL: http://127.0.0.1:8000/catalog/
>>>>>>
>>>>>> Using the URLconf defined in locallibr

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread Nitin Kumar
you have to import include.

from django.urls import path, include

On Fri, May 18, 2018 at 9:45 PM, <ankitklinke...@gmail.com> wrote:

> Hi Nitin,
>
> Thanks for quick response.
>
> Please find the below code from locallibrary/urls.py
>
> Could you please let me know, where shall i add the url.
>
>
> 
> 
> 
> 
> from django.contrib import admin
> from django.urls import path
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> ]
>
>
> from django.urls import path
> from django.contrib import admin
>
> # Use include() to add URLS from the catalog application and
> authentication system
> from django.urls import include
>
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> ]
>
>
> urlpatterns += [
> path('catalog/', include('catalog.urls')),
> ]
>
>
> # Use static() to add url mapping to serve static files during development
> (only)
> from django.conf import settings
> from django.conf.urls.static import static
>
>
> urlpatterns+= static(settings.STATIC_URL, document_root=settings.STATIC_
> ROOT)
>
>
> #Add URL maps to redirect the base URL to our application
> from django.views.generic import RedirectView
> urlpatterns += [
> path('', RedirectView.as_view(url='/catalog/', permanent=True)),
> ]
>
> 
> ----
> 
> --
>
> On Friday, May 18, 2018 at 6:09:33 PM UTC+2, Nitin Kumar wrote:
>>
>> Hi Ankit,
>>
>> You must add the urls of catalog to the project urls, locallibrary.urls.
>>
>> On Fri, May 18, 2018 at 8:32 PM, <ankitkl...@gmail.com> wrote:
>>
>>> Hi Doug,
>>>
>>> I am new to Django and i also started with MDN Locallibrary project.
>>> Everything went fine until Django admin site but I stuck at "Creating
>>> our home page
>>> <https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Home_page>"
>>> I have written the code in the suggested way only but get below error when
>>> try to run the project. I tried taking the urls.py code from github also
>>> but it gives same issue.
>>>
>>> Could you please help me here.
>>>
>>> Regards,
>>> Ankit
>>>
>>>
>>> Page not found (404)
>>> Request Method: GET
>>> Request URL: http://127.0.0.1:8000/catalog/
>>>
>>> Using the URLconf defined in locallibrary.urls, Django tried these URL
>>> patterns, in this order:
>>>
>>>1. admin/
>>>2. ^static\/(?P.*)$
>>>3.
>>>
>>> The current path, catalog/, didn't match any of these.
>>>
>>> You're seeing this error because you have DEBUG = True in your Django
>>> settings file. Change that to False, and Django will display a standard
>>> 404 page.
>>>
>>>
>>>
>>> On Monday, January 22, 2018 at 5:46:31 AM UTC+2, Doug Nintzel wrote:
>>>>
>>>> Ok, makes sense. Thank you very much for the details Daniel.
>>>> Doug
>>>>
>>>> On Sunday, January 21, 2018 at 1:02:33 PM UTC-7, Daniel Hepper wrote:
>>>>>
>>>>> Yes, kind of. There are two kinds of redirects, temporary and
>>>>> permanent redirects. By default Django's redirect() method returns a
>>>>> temporary redirect. If you pass permanent=True, it returns a permanent
>>>>> redirect.
>>>>>
>>>>> So here is what happened in your case:
>>>>>
>>>>> 1. You run the MDN tutorial project and point your browser to
>>>>> http://127.0.0.1:8000/
>>>>> 2. The browser requests the path / from the server 127.0.0.1:8000
>>>>> (the runserver running the MDN tutorial project) and receives a permanent
>>>>> redirect to /catalog/
>>>>> 3. Then you stop the MDN project and run your own project.
>>>>> 4. You then point your browser to http://127.0.0.1:8000
>>>>> 5. Your browser thinks "wait a minute, last time I accessed the path /
>>>>> on the server 127.0.0.1:8000, it returned a permanent redirect to
>>>>> /c

Re: New project in virtual env referencing another project's default/redirected path

2018-05-18 Thread Nitin Kumar
Hi Ankit,

You must add the urls of catalog to the project urls, locallibrary.urls.

On Fri, May 18, 2018 at 8:32 PM,  wrote:

> Hi Doug,
>
> I am new to Django and i also started with MDN Locallibrary project.
> Everything went fine until Django admin site but I stuck at "Creating our
> home page
> "
> I have written the code in the suggested way only but get below error when
> try to run the project. I tried taking the urls.py code from github also
> but it gives same issue.
>
> Could you please help me here.
>
> Regards,
> Ankit
>
>
> Page not found (404)
> Request Method: GET
> Request URL: http://127.0.0.1:8000/catalog/
>
> Using the URLconf defined in locallibrary.urls, Django tried these URL
> patterns, in this order:
>
>1. admin/
>2. ^static\/(?P.*)$
>3.
>
> The current path, catalog/, didn't match any of these.
>
> You're seeing this error because you have DEBUG = True in your Django
> settings file. Change that to False, and Django will display a standard
> 404 page.
>
>
>
> On Monday, January 22, 2018 at 5:46:31 AM UTC+2, Doug Nintzel wrote:
>>
>> Ok, makes sense. Thank you very much for the details Daniel.
>> Doug
>>
>> On Sunday, January 21, 2018 at 1:02:33 PM UTC-7, Daniel Hepper wrote:
>>>
>>> Yes, kind of. There are two kinds of redirects, temporary and permanent
>>> redirects. By default Django's redirect() method returns a temporary
>>> redirect. If you pass permanent=True, it returns a permanent redirect.
>>>
>>> So here is what happened in your case:
>>>
>>> 1. You run the MDN tutorial project and point your browser to
>>> http://127.0.0.1:8000/
>>> 2. The browser requests the path / from the server 127.0.0.1:8000 (the
>>> runserver running the MDN tutorial project) and receives a permanent
>>> redirect to /catalog/
>>> 3. Then you stop the MDN project and run your own project.
>>> 4. You then point your browser to http://127.0.0.1:8000
>>> 5. Your browser thinks "wait a minute, last time I accessed the path /
>>> on the server 127.0.0.1:8000, it returned a permanent redirect to
>>> /catalog/. I'll save my user some time and just go directly to /catalog/".
>>>
>>> Now, if a URL returns a temporary redirect, the browser knows that this
>>> redirect is, well, temporary, so it might point to a different location the
>>> next time or there might be no redirect at all. Therefore, it must load the
>>> original URL.
>>>
>>> In the example of the tutorial, a permanent redirect should not be used,
>>> not only because it can lead to the problem you encountered.
>>>
>>> Imagine you use this software for your local library at
>>> http://smalltownlibrary.com/. After a while, you want to add another
>>> feature, e.g. a book shop under /shop/ where visitor can buy used books.
>>> You then want to add a homepage at / where users can select whether they
>>> want to access catalogue or the shop. It works fine for new users, but
>>> everyone who accessed the site http://smalltownlibrary.com/ before is
>>> not able to access the new homepage because their browser has cached the
>>> permanent redirect to the catalog.
>>>
>>> Permanent redirects definitely have their place, e.g. if you moved your
>>> website to a new URL and want to tell the search engines that they should
>>> only look at the new URL. But you have to be aware that they are indeed
>>> permanent.
>>>
>>> Hope that clarifies it a bit.
>>>
>>> Daniel
>>>
>>> On Sunday, January 21, 2018 at 7:26:39 PM UTC+1, Doug Nintzel wrote:

 That got it Daniel...thanks for the quick help. Was it
 " permanent=True" in particular that was the problem?
 Thanks again,
 Doug

 On Sunday, January 21, 2018 at 10:29:33 AM UTC-7, Daniel Hepper wrote:
>
> I realized that the Mozilla tutorial is a wiki, so I took the liberty
> to remove the "permant=True" from the redirect.
>
> On Sun, Jan 21, 2018 at 6:23 PM, Daniel Hepper 
> wrote:
>
>> It's not the new project referencing the old project, it is actually
>> your browser caching the redirect from http://127.0.0.1:8000/ to
>> http://127.0.0.1:8000/catalog/.
>> Because it is a permanent redirect, your browser won't access
>> http://127.0.0.1:8000/, it will go http://127.0.0.1:8000/catalog/.
>>
>> You can usually get rid of this redirect by clearing your browser
>> cache. How exactly that is done depends on the browser you are using.
>>
>> This also teaches an important lesson about permanent redirects. Only
>> use them when you are absolutely sure that you (and more importantly your
>> users) will never again want to access the old URL.
>>
>> Hope that helps,
>> Daniel
>>
>>
>>
>> On Sun, Jan 21, 2018 at 6:06 PM, Doug Nintzel 
>> wrote:
>>
>>> Hello,
>>>
>>> I am new to Django and followed this Mozilla Django