I am getting following error while installing mod_wsgi using pip3. I downloaded it once mistakenly before installing Apache, then it threw error for Apache’s unavailability and didn’t install. Then I installed Apache using command brew install apache2 and then did pip3 install mod_wsgi –no-cache-dir so that it don’t take up the cached image, but it ..
Category : django
Hi I’m using Arvan cloud (arvancloud.com/en) cloud storage in my porject (very similar to S3 AWS). and aslo I’m using django-storages and boto3 libraries. my project is a online learning platform (like udemy). and I have courses and lessons. so I should authenticate the users who want to download or see the contents (video or ..
I have a django model that looks like this: class Character(models.Model): character_Name = models.CharField(max_length=50) user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) level = models.PositiveSmallIntegerField(validators=[MaxValueValidator(20), MinValueValidator(1)], default=1) def __str__(self): return self.character_Name with an html file(main.html) that looks like this: <!DOCTYPE html> <html lang="en"> <body> <h1>{{ characters.character_Name }}</h1> <h4>Level: {{ characters.level }}</h4> <button onclick="increase_level()"> + 1 </button> </body> a function ..
I am creating a Django backend where I am using Django Rest Framework for building REST API. I have nested serialization, and when I try to serialize the data I have to override the create function of the ModelSerializers. I’m a bit scared that this is going to cause a problem or a loophole in ..
Some time ago I started to learn python and I created commandline application that manages your home bar and cocktails recipes (you can add alcohol bottles to it, add recipes, check if you have ingredients to create given cocktail and so on) that uses sqlite3 database. Class called BarmanShell is kind of api of this ..
I’m getting Noreverse match error for sports_detail when i click on category, What i’m doing is when i click on category all posts related mapped to that category will get render on sport_category page using List view. What i’m not getting is why i’m getting Noreverse match error for sports_details. Same thing i did for ..
it was about 6 month ago that I started to learn programming . I started with Html, css, js, then sass and finally Django and Django rest framework . Now I wonder if I can get Hired as a junior developer with this level of understanding.I ask the guys in business to look at my ..
I created a website using Django and deployed it on Linode but I’m having a problem now that I am ready to change the website from using the Linode provided hostname to my own URL. I imported my domain into Linodes domain manager, set an A record to point to the IP address of the ..
I have model class TransHeader(models.Model): th_type = models.CharField(max_length=200) th_code = models.CharField(max_length=200) th_status=models.CharField(max_length=1,default=0) my view: class SalTransactions(TemplateView): template_name = "wstore/sales_transactions.html" def get_context_data(self, **kwargs): context = {} if kwargs[‘post’]==’UNPOSTED’: context[‘transactions’] = TransHeader.objects.filter(th_type=kwargs[‘transtype’]) .filter(th_status=’0′) else: context[‘transactions’] = TransHeader.objects.filter(th_type=kwargs[‘transtype’]) return context my url line: path(‘saltransactions/<str:transtype>/<str:post>’,views.SalTransactions.as_view(), name=’saltransactions’), my link through menu is working fine showing all records with given trans ..
I’m having an error(‘NoneType’ object has no attribute ‘city_set’) when I try to update my users profile if I log in with facebook account. I assume the problem caused by: there is no country and city selected at first. There is no problem with normal registation and updating the profile of the user but social_django ..
Recent Comments