Hi all,
I have been battling with this issue for quite a long time and I haven't
been able to find a solution to fix it.
So, I have an E-commerce Project and The issue is related to the product
Variations and the quantity related to it in the order summary page.
Example with the sequence for
I am creating a project where there are Posts and Items, 2 different models
in 2 different apps and each has a user who can be the same.
I have created a page for each user to post all related posts called
Userpost List view, and I want to add an if statement or a queryset to show
a button to
I was working on a comment section for post and was getting an
AttributeError when I return return '{}-{}'.format(self.post.title,
str(self.user.username)) in the comment model
I am trying to link users and posts to the comment I am getting the same
error
Here is the Models.py
class Comment
here is the link
https://groups.google.com/forum/#!topic/django-users/5SckOumQLQM
On Sunday, May 24, 2020 at 10:38:18 PM UTC-4, Ahmed Khairy wrote:
>
> Helloo,
>
> Check my views in this question link, it might be useful
>
> On Saturday, May 23, 2020 at 1:35:32 AM UTC-4, oldti
Helloo,
Check my views in this question link, it might be useful
On Saturday, May 23, 2020 at 1:35:32 AM UTC-4, oldtimer wrote:
>
> I cannot get variations or I tried model forms for options as well and
> cannot get either to add to the cart. I can get both to display as options
> on the produ
Helloo,
I have a problem with the variations and the quantity related to it in the
order summary page.
It was working perfectly and all of a sudden (this is an example to
simplify):
when I add to the cart 2 items:
- Item X with a size small
- Item X with a size medium
When I change the qua
{{ item.name }} option>
> {% endfor %}
>
> {% endif %}
>
> On Tuesday, May 5, 2020 at 5:12:15 PM UTC-6, Ahmed Khairy wrote:
>>
>> Hello all,
>>
>> I have made a variation to an Item class in models.py and I think i got
>>
Do you mean that this line should be changed?
No ! Don't Print it
On Tuesday, May 19, 2020 at 11:11:12 PM UTC-4, Hella Nick wrote:
>
> button标签中的type属性设置为button,
>
> Ahmed Khairy > 于2020年5月20日周三 上午1:54写道:
>
>
I am trying to use Ajax to submit a like button, I believe everything is in
order but I keep getting django.urls.exceptions.NoReverseMatch: Reverse for
'like_post' with arguments '('',)' not found. 1 pattern(s) tried:
['score/like/(?P[0-9]+)$']
I am not sure what is the reason. Need help to
020, 3:53 am Ahmed Khairy, > wrote:
>
>> Hi Motaz,
>>
>> When I added your code it disabled the function of the button nothing
>> happened
>>
>> On Sunday, May 17, 2020 at 9:30:38 PM UTC-4, Motaz Hejaze wrote:
>>>
>>> In your like button
le to get that functionality in Django". No one could demostrate with
>> example code.
>> If you find something, please send me the code.
>>
>> Thanks
>>
>>
>> Gabriel Araya Garcia
>> GMI - Desarrollo de Sistemas Informáticos
>>
>
Hi all,
I need some help writing the ajax for a like button instead of refreshing
every time a like is posted
here is the template:
{% csrf_token %}
{% if user.is_authenticated %}
{% if liked
Did you try pip install -r requirements.txt?
On Friday, May 15, 2020 at 10:16:52 AM UTC-4, Akorede Habeebullah wrote:
>
> Hi guys, I need help with my pip. It was working fine until I upgraded it.
> now its not working fine anymore. I tried running all pip commands that I
> know its still not wo
lf.request.user) & Q(
On Thursday, May 14, 2020 at 10:07:25 PM UTC-4, Motaz Hejaze wrote:
>
> Where does this exception happen ?
> In which file , which line ?
>
> On Fri, 15 May 2020, 12:51 am Ahmed Khairy, > wrote:
>
>> Hi all
>>
>> I am addin
Hi all
I am adding a like/unlike button for Posts in a Listview, I am getting an
error:
Exception Value: Related Field got invalid lookup: value
here is the Model:
class Post(models.Model):
designer = models.ForeignKey(User, on_delete=models.CASCADE)
title = models.CharField(max_len
Hi,
I have the following context and I am trying to write it correctly in a
function
This is context data :
def post_view(request):
qs= Post.objects.all()
user= request.user
context= {
'qs':qs,
'user':user,
}
I am trying to define it in a class PostListView(L
iked = post.likes.filter(user=request.user).exists()
>
>
> Le mer. 13 mai 2020 à 19:22, Ahmed Khairy > a écrit :
>
>> Hi There,
>>
>> I have rewritten the get_context_data method to be like this but I am
>> getting name 'user' is not defined:
&
ml"%} {% block content %} {% for post in posts %}
> {{post.title}}
>
> {% csrf_token %}
> {% if is_like %}type="submit">Unlike
>
> {% else %}
> Like
> {% endif %}{% endfor %} {% endblock content %}
>
> Something like this should give you the function
trying to get the absolut url for your post, but aren't showing
> any post detail view.
>
> Regards,
>
> Andréas
>
>
> Den ons 13 maj 2020 kl 06:46 skrev Ahmed Khairy >:
>
>> I am currently trying to create a like button for my posts in Django
>>
>
I am currently trying to create a like button for my posts in Django
I have reached to the part where I can add a like but I am facing
difficulty writing the code related to the view which linking the
PostListView if there is user who liked it or not. I am getting an error:
page Error 404 alt
I have created this code for defining a default everytime I create a new
product,
It is working fine and whenever I create a new Item a new variable (size)
is create
I want to check whether this code is correct or not as I have had help from
someone and I think we could have created an easie
I created an app called marketing app which customizes messages to be written
on top of website page. My problem is that these messages are not showing when
everything is configured and I don't know why is that might be the template
because {{ marketing_message.message}} is only not showing
Thi
Hi am looking for resources to create variables such as size and color to
an e-commerce website
--
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+un
Hello all,
I have made a variation to an Item class in models.py and I think i got the
template syntax right but apparently there are something wrong which i
can't figure it out
Here is the model
class Item(models.Model):
title = models.CharField(max_length=100)
description = models.
I am using Django 2.2 to make a project where designers upload designs and
when I want to post them from admin, I want to choose their names and after
I choose their names only their designs appear in the drop down list. So
far I have reach the reach the designer name in a drop down list but I
I am making a project for an online payment e-commerce
I think I got everything right as am following a Tutorial
Keep getting this Error: Not Authenticated Error I used the testing CC
Numbers for testing purposes
My question is the following codes correct and I'm getting Not
Authenticated Er
I added the new app urls to the main project URLs I think this was the
mistake but now I have to change the URLs location as I'm getting 404 error
score/score/
Thank you, your first question is what made me find the issue
On Saturday, April 25, 2020 at 1:13:08 AM UTC-4, Ahmed Khairy
Yes i tried other urls from other models it worked but anything related to
the new app is not linked
On Saturday, April 25, 2020 at 12:42:14 AM UTC-4, Motaz Hejaze wrote:
>
> did you try to change the name 'post-create' to something else ?
>
> On Sat, Apr 25, 2020 a
> did you add your new app to installed apps in settings.py
>
> On Sat, Apr 25, 2020 at 6:29 AM Motaz Hejaze > wrote:
>
>> you don't need the include part because you already copied the class to
>> the new app
>>
>> On Sat, Apr 25, 2020 at 6:16 AM Ahmed
I tried to include the urls
originally it was
path('score/new/', PostCreateView.as_view(), name='post-create'),
but both didn't work
On Friday, April 24, 2020 at 11:29:41 PM UTC-4, Ahmed Khairy wrote:
>
> I have created a new app in a project and moved one
de(('post-create.urls', 'post-create'
> ), PostCreateView.as_view(), name='post-create'),
>
> explain this line ?
>
> On Sat, Apr 25, 2020 at 5:30 AM Ahmed Khairy > wrote:
>
>> I have created a new app in a project and moved one of the classes from
I have created a new app in a project and moved one of the classes from one
app to the new app
I checked every step but I keep getting No Reverse match I wrote the name
of the app before the namespace but still
HTML :
Upload Designs
URLS
from django.urls import include, path
from
> model = Post
> fields = ['caption', 'design']
> template_name = "post_form.html"
> success_url = '/score'
> success_message = "Your Design has been submitted for Review"
>
>
>
> it will work
>
>
I have created this class with the success message but I am not receiving
the success message I requested, other pages are showing them but this one
is not
What might be wrong?
In the views:
class PostCreateView(LoginRequiredMixin, CreateView):
model = Post
fields = ['caption', 'desig
Thank you so much it is realyy helpfull. Fixed it
On Tuesday, April 21, 2020 at 11:23:10 PM UTC-4, Motaz Hejaze wrote:
>
> check this out
>
> https://wsvincent.com/django-allauth-tutorial-custom-user-model/
>
> On Wed, Apr 22, 2020 at 5:18 AM Ahmed Khairy > wrote:
Thank you so much it realyy helpfull. Fixed it
On Tuesday, April 21, 2020 at 11:23:10 PM UTC-4, Motaz Hejaze wrote:
>
> check this out
>
> https://wsvincent.com/django-allauth-tutorial-custom-user-model/
>
> On Wed, Apr 22, 2020 at 5:18 AM Ahmed Khairy > wrote:
What do you mean ?
On Tuesday, April 21, 2020 at 11:13:16 PM UTC-4, Motaz Hejaze wrote:
>
> did you define managers ?
>
> On Wed, Apr 22, 2020 at 5:06 AM Ahmed Khairy > wrote:
>
>> Model Form
>>
>> UserCreationForm
>>
>> On Tuesday, April 2
Model Form
UserCreationForm
On Tuesday, April 21, 2020 at 11:02:13 PM UTC-4, Motaz Hejaze wrote:
>
> what kind of forms is this ? regular form or model form ?
>
>
> On Wed, Apr 22, 2020 at 4:57 AM Ahmed Khairy > wrote:
>
>> Hi all,
>>
>> Got this unexp
Hi all,
Got this unexpected error all of a sudden, how to fix it.
save() got an unexpected keyword argument 'force_insert'
def register(request):
if request.method == 'POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
form.save()
use
Hi all,
I have made a blog as a project and I have set users to submit posts for
the blog directly but i want to direct this post to the admin first for
approval before showing on the website. here is the Post Create View Class.
class PostCreateView(CreateView):
model = Post
fields =
I have used UserCreationForm and got this result below with no validations
regarding the password while there are other Usercreationforms with
password validations.
I am using Django 2.2
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
For this project, I have made 2 applications: Core and Users
Creating a new user is the 2nd application.
I am trying to direct the new user after registration to 'home'
I keep getting NoReverse Match Error
This is the view.py this is the code:
def register(request):
if request.method == 'PO
42 matches
Mail list logo