Re: Dynamic creation of pages

2023-10-26 Thread Bayo Izekor
# models.py
from django.db import models

class Title(models.Model):
name = models.CharField(max_length=100, unique=True)
# Add other fields as needed

# views.py
from django.shortcuts import render, get_object_or_404
from .models import Title

def title_page(request, title_id):
title = get_object_or_404(Title, pk=title_id)
# Retrieve and display data associated with the title
# Render a template to display the data
return render(request, 'title_page.html', {'title': title})





Home

Titles

{% for title in titles %}
{{ title.name 
}}
{% endfor %}





On Thursday, October 26, 2023 at 2:10:09 PM UTC+1 AAnnoo khan wrote:

> Give the same statement to ChatGPT and it will give you a very good 
> explanation of this problem.
> I did it before with ChatGPT 
>
> On Wed, Oct 25, 2023, 10:25 PM Raymond N  wrote:
>
>> Am working on a website using django and i want to create a dropdown list 
>> on the navigation bar such that when i add a title in the admin its added 
>> here.
>>
>> This title should also automatically be a link to a page populated with 
>> data attached to that specific title
>>
>> Does anyone know how i can do this??
>>
>> Thanks, 
>> Raymond
>>
>> -- 
>>
> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAJpDcBRHUKy9V_g-n_o5cd71LKqUPAEfjJxD041%3DEqeaRPmqyA%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/4dc7a2a4-7299-43b9-9389-ae71d28ebfebn%40googlegroups.com.


Re: Dynamic creation of pages

2023-10-26 Thread AAnnoo khan
Give the same statement to ChatGPT and it will give you a very good
explanation of this problem.
I did it before with ChatGPT

On Wed, Oct 25, 2023, 10:25 PM Raymond N  wrote:

> Am working on a website using django and i want to create a dropdown list
> on the navigation bar such that when i add a title in the admin its added
> here.
>
> This title should also automatically be a link to a page populated with
> data attached to that specific title
>
> Does anyone know how i can do this??
>
> Thanks,
> Raymond
>
> --
> 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/CAJpDcBRHUKy9V_g-n_o5cd71LKqUPAEfjJxD041%3DEqeaRPmqyA%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/CA%2BEU9cf22-kv3UC%3DBGM0-9fuf_AbJ1RdWEViOhqcNQkmN6hN8w%40mail.gmail.com.


Re: Dynamic creation of pages

2023-10-26 Thread LaVie
it is possible to share the repo url?

On Wednesday, 25 October 2023 at 18:25:45 UTC+1 Raymond N wrote:

> Am working on a website using django and i want to create a dropdown list 
> on the navigation bar such that when i add a title in the admin its added 
> here.
>
> This title should also automatically be a link to a page populated with 
> data attached to that specific title
>
> Does anyone know how i can do this??
>
> Thanks, 
> Raymond
>

-- 
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/ef9eb3f9-b078-4e2c-a91f-750b699694c9n%40googlegroups.com.


Re: Dynamic creation of pages

2023-10-26 Thread Percy Masekwameng
With the help of bootstrap, then you just make queryset and loop the titles
in the dropdown list,




On Wed, 25 Oct 2023, 19:25 Raymond N,  wrote:

> Am working on a website using django and i want to create a dropdown list
> on the navigation bar such that when i add a title in the admin its added
> here.
>
> This title should also automatically be a link to a page populated with
> data attached to that specific title
>
> Does anyone know how i can do this??
>
> Thanks,
> Raymond
>
> --
> 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/CAJpDcBRHUKy9V_g-n_o5cd71LKqUPAEfjJxD041%3DEqeaRPmqyA%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/CANfc-pAhDOgpChiw0iMTDvOkudOhz5pUb3H5LgPCg8mqSrqiHw%40mail.gmail.com.


Dynamic creation of pages

2023-10-25 Thread Raymond N
Am working on a website using django and i want to create a dropdown list
on the navigation bar such that when i add a title in the admin its added
here.

This title should also automatically be a link to a page populated with
data attached to that specific title

Does anyone know how i can do this??

Thanks,
Raymond

-- 
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/CAJpDcBRHUKy9V_g-n_o5cd71LKqUPAEfjJxD041%3DEqeaRPmqyA%40mail.gmail.com.