All Tickets

Priority
Status
Type
Category
Anonymous
asked 4 years, 7 months ago
Views 3842
Views 3842
Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label 

 Any advice would be tremendously appreciated.

I'm using Python 3.4 and Django …

Django
Low
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 1157
Views 1157

My template cannot display the image coming from my model.

src attribute comes with proper field but it does not …

Django
Medium
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 430
Views 430

Trying to define a constant with the value of model's class in the settings.py to provide a dynamically-defined FK for …

Django
Medium
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 1680
Views 1680

app.models.py

class ColorSet(models.Model):
    color = models.CharField(max_length=50, verbose_name='Color', default='', blank=True, null=True)
    code = models.CharField(max_length=50, verbose_name='Code of color', default='', blank=True, null=True)

    class …
Django
Medium
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 1889
Views 1889

My urlpatterns :

urlpatterns = [
    re_path(r'^dj-admin/', admin.site.urls),
    re_path(r'^admin/', include(wagtailadmin_urls)),
    re_path(r'^docs/', include(wagtaildocs_urls)),

    i18n_patterns(
        path(r'', include(wagtail_urls)),
        prefix_default_language = False
    )
] …
Django
Low
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 501
Views 501

Viewed 15k times

In the following django model:

class MyModel(models.Model):
    published = models.BooleanField(default=False)
    pub_date = models.DateTimeField('date published')

I want the pub_date …

Django
Low
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 749
Views 749

Trying to start a webpage using the Django framework. 

After creating the project, I tried to start an app that …

Django
Medium
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 911
Views 911

After updating a Django 1.7 project to Django 1.8 and now get errors when I run the tests (that are …

Django
Medium
Problem
Closed
Anonymous
asked 4 years, 7 months ago
Views 367
Views 367

In a Django project where I need to create a form for inputs. I tried to import reverse from django.core.urlresolvers …

Python
Medium
Problem
Closed
me
asked 4 years, 7 months ago
Views 952
$10
Views 952

Hi everyone,

I have a simple form with checkboxes and a submit button upon clicking, the results show up fine …

Django
Urgent
Problem
Closed
Soudhamini
asked 4 years, 7 months ago
Views 308
Views 308
Java
Medium
Question
Closed
Star
asked 4 years, 7 months ago
Views 319
Views 319

 I tried this code extend method , some how my code is not working

my_array = array('i', [1,2,3,4,5]) 
my_extnd_array = …
Python
Low
Question
Closed
Star
asked 4 years, 7 months ago
Views 353
Views 353

can any one explain details . could you please help me

Python
Low
Question
Closed
Soudhamini
asked 4 years, 7 months ago
Views 347
Views 347

I want to know what is different between these abstract class and interface...

Answer  from anyone will help me a …

Java
Medium
Question
Closed
Soudhamini
asked 4 years, 7 months ago
Views 291
$5
Views 291

Consider two lists like:

L1=[13,12,0,29,5]
L2=[19,23,1,29,10]

Now I want the output as:

L3=[(13,19),(12,23),(0,1),(29,29),(5,10)]

How can I get that........

Python
High
Problem
Closed
Soudhamini
asked 4 years, 7 months ago
Views 396
Views 396
Python
Low
Question
Closed
Soudhamini
asked 4 years, 7 months ago
Views 309
Views 309
public class Main
{
	public static void main(String[] args) {for (int i=0; i<6; i++)
  {
  for (int j=0; j<i; j++) …
Java
Medium
Task
Closed
Vengat
asked 4 years, 7 months ago
Views 403
Views 403

I have a requirement to read the 

{{ request.user.username }}

in Javascript to pass the value to Django backend. But …

Django
Medium
Question
Closed
Soudhamini
asked 4 years, 7 months ago
Views 369
Views 369
<span style="background-colour:red; @media (max-width:300px){background-colour:yellow;}"></span>

Is this possible?

Help me out.......

CSS
Medium
Question
Closed
Soudhamini
asked 4 years, 7 months ago
Views 330
$5
Views 330

I have the following code:

class ClassA(object):
    def __init__(self):
        self.var1 = 5
        self.var2 = 2

    def methodA(self):
        self.var1 = self.var1 …
Python
High
Question
Closed
p789ahm
asked 4 years, 7 months ago
Views 364
Views 364

I have a python function that I want to check if a certain field is present in the json that …

Python
Low
Question
Closed
Soudhamini
asked 4 years, 7 months ago
Views 320
Views 320
l1=[20,30,10.5]

I have the following list I want the output as:

[30,40,20.5]

I want the most efficient way of answer

Python
Medium
Problem
Closed
Soudhamini
asked 4 years, 7 months ago
Views 1242
Views 1242
s = [1,20, 67, 21, 56, 13]
print(*s, sep = '\n')

this is the list I have 

I want this …

Python
Low
Problem
Closed
Soudhamini
asked 4 years, 7 months ago
Views 312
Views 312

I have the following code

def fun1(par):
    print('Hi this is a function without filling the parameter')
    return True

fun1()

And …

Python
Medium
Question
Closed
Soudhamini
asked 4 years, 7 months ago
Views 339
Views 339
def isPrime(x):
    if x > 1:
        for i in range(2, x):
            if x % i == 0:
                return False

        return …
Python
Medium
Problem
Closed
ashutoshmishra333
asked 4 years, 7 months ago
Views 394
Views 394

Suppose there are 7 choices ,e.g 7 days

I want all the name of 7 days in a list

I …

Django
Medium
Task
Closed
Vengat
asked 4 years, 7 months ago
Views 354
Views 354

I am facing some challenge to formatting the Float data type in Postgresql DB.

I have order table after I …

Postgresql
Medium
Problem
Closed
Soudhamini
asked 4 years, 8 months ago
Views 309
Views 309

I have a list of characters like 

a = ['he','ll','o','  ','good','mo','rni','n','g']

I want te final output as

hello  goodmorning

could …

Python
Low
Problem
Closed
Vengat
asked 4 years, 8 months ago
Views 407
Views 407

I am trying to pass the CHOICE field value in Django Template in a tag, like below,

<a href="{% url …
Django
Medium
Problem
Closed
meena
asked 4 years, 8 months ago
Views 1034
Views 1034

I require to sftp files from one linux server to another using password authentication. I need to call this script …

Unix
Medium
Question
Closed
ashutoshmishra333
asked 4 years, 8 months ago
Views 485
$5
Views 485

How to delete token of the recently logged in user.

#models.py

class MyUserManager(BaseUserManager):

def create_user(self, email, password=None, **extra_fields):

if not …

Django
High
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 682
Views 682

I have a small Django app with a form, wich saves some data to the DB.

Here's the form:

class …
Django
Medium
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 4775
Views 4775

I am using openpyxl library to write in existing Excel file in separate cells.

How do I write some text …

Python
Low
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 383
Views 383

I have this function that I want to read a single byte from a large file. The only problem is …

Python
Medium
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 457
Views 457

I am new to DRF and I am having trouble with overriding its methods.

I would like to allow a …

Django
Medium
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 1271
Views 1271

I'm succeeded logging in sites using Selenium in Python 3.4 The login process is like below:

browser = webdriver.PhantomJS()
browser.get('url') …
Python
Medium
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 334
Views 334

Background:

I'm using py.test together with pytest-selenium, now I would like to take a screenshot of page when assertion fails. …

Python
Low
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 599
Views 599

Using https://github.com/jpwatts/django-positions,

I have a few models that inherit from a parent one, for example:

class ContentItem(models.Model):

    class Meta: …
Django
Medium
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 1740
Views 1740

I have admin view with tabular inline:

class AddressInline(admin.TabularInline):
    model = Address
    can_delete = False
    readonly_fields = ['kind']
    max_num = …
Django
Medium
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 324
Views 324

I'm writing data to a CSV file, then once that's done, I copy the file to another directory.

This is …

Python
Medium
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 365
Views 365

is there an older version of pip that doesn't check SSL certificates?

my corporate proxy replaces the cert from pypi …

Python
Low
Question
Closed
Anonymous
asked 4 years, 8 months ago
Views 358
Views 358

I'm writing a library in Python which makes calls to a REST API, receives results in JSON, and returns Python …

Python
Medium
Question
Closed
Vengat
asked 4 years, 8 months ago
Views 339
Views 339

I have added the logo for my website as a title one.

So I have used link shortcut icon set …

Html
Low
Problem
Closed
Soudhamini
asked 4 years, 8 months ago
Views 325
Views 325

I have two lists

​
L1=['NAME','AGE','EMAIL','GENDER']
L2=['SOUMYA','22','soumya22@gmail.com','female']

​

I want the output as :

{'NAME':'SOUMYA','AGE':'22','EMAIL':'soumya22@gmail.com','GENDER':'FEMALE'}

Python
Low
Problem
Closed
bhanupriyakuchana123
asked 4 years, 8 months ago
Views 542
Views 542

I'm tyring to test the Python Selenium and I have this code:

from selenium import webdriver
url = 'https://www.youtube.com/channel/UC8tgRQ7DOzAbn9L7zDL8mLg/videos'
driver …
Python
Medium
Problem
Closed
Soudhamini
asked 4 years, 8 months ago
Views 319
Views 319

I want a function like

​
d = dict(p1=1, p2=2)
def f2(p1, p2):
    print(p1, p2)
f2(d)

​

which returns output …

Python
Medium
Task
Closed
Soudhamini
asked 4 years, 8 months ago
Views 328
Views 328

I want a code which compares multiple integer values for one value and therefore it returns a list as an output …

Python
Medium
Problem
Closed
Anonymous
asked 4 years, 8 months ago
Views 357
Views 357

[....'1', '2937', '0', '0', 'Sep 10 20:34:44 2020', 'Sep 10 20:35:41 2020', '1', '2978', '0', '0', 'Sep 10 20:34:44 2020', …

Python
Medium
Problem
Closed
Anonymous
asked 4 years, 8 months ago
Views 1815
Views 1815

I check my code using mypy. I got these errors:

  1. I have an object names: List[str], for len(names) …

Python
Medium
Problem
Closed
Anonymous
asked 4 years, 8 months ago
Views 397
Views 397

I have a dataframe with the patient's diagnosis in a column and using pandas I want to dichotomize the diagnosis …

Python
Medium
Question
Closed
First Previous 3 4 5 6 7 Next Last