Thank you David I will try again. Can I contact you if the problem
persists.
On Mon, Feb 20, 2023, 8:39 PM David Nugent wrote:
> You appear to half only half asked your question and have provided no
> context.
>
> Do you have a route named 'register'? [ URL(, name="register") ] (I
> am gues
contact me on my contact, which u will find on afrqweb.herokuapp.com
(website still under development)
best regards
scientist
On Fri, Jul 15, 2022 at 4:29 PM Abhilash Singh Chauhan <
abhilashaan...@hau.ac.in> wrote:
> Hii Everyone
>
>
>
> I have a Django App which I want to deploy on a Centos L
lol yea we should be patient with reading i agree wit u.
On Tue, Feb 22, 2022 at 11:55 AM Antonis Christofides <
anto...@antonischristofides.com> wrote:
> Hello Loic,
>
> Please how to turn a picture into a LEGO version?
> A project that does this will be welcome.
>
> Not sure what you mean
an you refresh
> the django server?
>
> On Thu, Feb 17, 2022, 22:10 kuda ronnie wrote:
>
>> i think its something to do with caching, refresh error i guess. u see
>> after u connected the internet. the glitch was resolved.
>>
>>
>>
>> On Wed, Feb 16
i think its something to do with caching, refresh error i guess. u see
after u connected the internet. the glitch was resolved.
On Wed, Feb 16, 2022 at 4:03 PM Heman Okumbo wrote:
> I was running manage.py runserver without internet connection on my
> machine and getting the above error.After
Thanks!
On Tue, Mar 16, 2021 at 5:01 PM Joel Goldstick
wrote:
>
>
> On Tue, Mar 16, 2021 at 9:11 AM Ronnie Atuhaire
> wrote:
>
>> Hello everyone, I joined this platform like a week ago not because I am
>> experienced but because I am new to Django and would l
olls/34/vote/” too – these will display the placeholder results and
voting pages""".
I have been trying to figure it out but seems I have failed so far, tried
stack overflow but no help so far. Any one who is interested in helping me
out please let me know.
[image: image.png]
I just like how the thread ended
--
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 vi
Here's a view that works, in case someone in the future wants cares about
this
def random_post(request):
post_count = Post.objects.all().count()
random_val = random.randint(0, post_count-1)
post_id = Post.objects.values_list('post_id',
flat=True)[random_val]
*You can't change the of a user from a view unless you do a redirect. You
can issue a redirect to /post/ where the id is what you picked at
random at the "random_post" view*
I can't change the *what *of a user from the view? Also, what user? I've
tried putting in there and it causes errors. I'
Thanks - for clarification. Yes! good advice on remaining calm. Apologies
if I seemed intense.
If I use this urlpattern, it takes me to the correct template.
*path('post/random/', views.random_post, name='random_post'),*
But there is no data. I really wanted to include the pk in the URL, to see
Please give me code. Sorry, I can't decipher plain language in forums very
well, when talking about code.
My urlpattern:
path('post//', views.PostDetailView.as_view(), name='post_detail'),
path('post/*random*/*???*', views.random_post, name='random_post'), *###
What do I put here?*
My vi
Ugh. Sorry for the confusion. Here again are the pieces where I need
suggestions. Please suggest actual code. I can't decipher things written in
plain language on forums. Code is key for me.
path('post//', views.PostDetailView.as_view(),
name='post_detail'),
path('post/*random/???*', vi
Also, would something like this work, and would it be a way to create the
view?
class RandomDetailView(DetailView):
model = Post
def random_post(request):
post_ids = Post.objects.all().values_list('post_id', flat=True)
random_obj = Post.objects.get(id=random.choice(post_id
Thanks Mat-A3K
Here's what I have so far...
*models.py*
class Post(models.Model):
post_id = models.AutoField(primary_key=True)
all the other fields...
*views.py*
#Normal (not random) post detail view
class PostDetailView(DetailView):
model = Post
template_name = 'blog/post_
def random_post(request):
posts_ids = Post.objects.all().values_list("id", flat=True)
random_obj = Post.objects.get(id=random.choice(posts_ids))
context = {'random_obj': random_obj,}
return render(request, 'blog/random_post.html', context)
Is “”id”” actually post_id in my case?
Th
I am familiar with this from searching all over for a solution. The
accepted solution is to create a manager.
from django.db.models.aggregates import Count
>
> from random import randint
>
>
> class PaintingManager(models.Manager):
> def random(self):
> count = self.aggregate(count
If I understand you, you suggest using my existing DetailView url which shows
the detailed Post, but create a view which selects a random pk.
I thought of this but I don’t know how to go about creeating a view that
selects a random pk, then applies to the existing urlpattern.
My guess is to cou
Greetings! My first time using this forum. Using Django 2.0 for a project.
I'm a beginner so I appreciate your patience.
I have a type of blog app, but I don't want the routing/url to be
traditional. I want the user to be able to hit a button that says "Random
Post" which takes them to a rando
I have installed Microsoft visual c++ 14.0 then also it is showing error as
Microsoft visual c++ 14.0 is required. Please help me.I need a solution...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop recei
This might be called offtopic here, but the django-haystack group seems to
be extremely quiet...
I am trying to find some complete documentation to setup django-haystack
with faceted search with Solr. I already have the search up and running,
and indexed the facets I need. Testing this in the
Being a newbie myself, I find this much more appealing.
I'm grateful this is being considered, having read ESR's version as well.
I'll also try to be very careful to follow these guidelines as I appreciate
the time everyone here takes to help people like me. Thanks a bunch!
On Thursday, June 2
> Have you tried the obvious - do what the Exception tells you and add a
> "get_absolute_url" method to the model of the objects published on the
> feed, or an item_link in your Feed class?
Well, duh.
This teaches me not to be reading documentation at 2 am while I'm sleepy.
I somehow looked straig
23 matches
Mail list logo