Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
graphene-django converts models.BigInteger() to graphene.Integer()
I'm using graphene-django. I'm trying to retrieve data from a models.BigInteger() field, but when I make the query in graphiQL I get the error { "errors": [ { "message": "Int cannot represent non 32-bit signed integer value: 2554208328" } ], "data": { "match": null } } Anyone know how I can force graphene to give me the data? -
top navigation resize when no side navigation
I'm having a problem with top navigation resizing. I have two layouts - one with side and top navigation and one just with top navigation. When I'm in template without side navigation, my top nav is resizing and it's slightly bigger then in the main layout with both navbars. I have no clue why this is happening, because both layouts use the same 'topnav.html' template and the css is also the same. I'm using bootstrap 3 and I'm wondering if maybe bootstrap grid is the one to blame. I've tried to add the same div structure in my layout_no_navbar.html as in layout.html template, but it didn't work. Please, help! Here is the part of my main layout with both navbars (layout.html): <div class="row"> <div class="col-md-3"> {% include 'portal/layout/navbar.html' %} </div> <div class="col-md-9"> <div class="content-container"> <!-- Navigation --> <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <!-- Brand and toggle get grouped for better mobile display --> {% include 'portal/layout/topnav.html' %} </nav> <div id="page-wrapper"> {% for message in messages %} <div class="alert {{ message.tags }} alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> {{ message }} </div> {% endfor %} {% block content %} {% endblock %} </div> <!-- /#page-wrapper content-container --> … -
Django How to make a custom contact form? In my index
I have in my index.html a custom contact form, like the following: <!-- FORM --> <form role="form"> <div class="row"> <div class="col-md-4"> <input type="text" class="form-control" id="name" placeholder="Nombre"> <input type="email" class="form-control" id="email" placeholder="Email"> <input type="text" class="form-control" id="subject" placeholder="Tema"> </div> <div class="col-md-8"> <textarea class="form-control" id="message" rows="25" cols="10" placeholder=" Texto de su mensaje..."></textarea> <button type="button" class="btn btn-default submit-btn form_submit">Enviar mensaje</button> </div> </div> </form> <!-- END FORM --> In the urls.py file I have the following: from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth import views as auth_views from django.contrib.auth.views import login from django.contrib.auth.views import logout from django.core.urlresolvers import reverse #import createview which is the generic view for forms + validation from django.views.generic.edit import CreateView #import the user creation form from django.contrib.auth.forms import UserCreationForm from cfdipanel import forms from . import views urlpatterns = [ url(r'^$', views.index), url(r'^suscripcion$', views.suscripcion), url(r'^escritorio$', views.report_list), url(r'^report/(?P<pk>[0-9]+)/$', views.report_detailh, name='report_detailh'), url(r'^login$', auth_views.login, {'template_name': 'cfdipanel/login.html'}, name='login'), url(r'^logout/$', auth_views.logout, {'next_page': '/login'}, name='logout'), url(r'^admin/', admin.site.urls), url(r'^profile$', views.profile), url(r'^registro$', views.registro, name='registro'), ] How can I make this same form work in my index? That just send me a javascript alert that was sent, thank you -
Connecting Django to remote MySQL database using Workbench
I am hosting my website on PythonAnywhere. I have two databases on the service: myusername$production and myusername$dev. The production db backs itself up every night and loads the dev database with the most recent batch of data. I am trying to connect my Django development environment to the dev database through ssh, which is possible as a paying PythonAnywhere customer. I followed their advice and downloaded MySQL Workbench, which connects without any issues. I then try and set up my dev.py settings as follows: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'myusername$dev', 'USER': 'myusername', 'PASSWORD': 'mypassword', 'HOST': '127.0.0.1', 'PORT': '3306', } } However this results in a `` error. I also tried replacing 127.0.0.1 with localhost, as well as leaving both host and port blank, but neither of these worked. I then tried the other two options on their website, aka accessing the db directly through python code, as well as using Putty (I'm a windows 10 user) however non of these worked. Any advice would be greatly appreciated. -
django url error when rendring a template
I am writing an application with django. everything has been working fine and I have been working in another page of the application then I decided to come back to the home page and I got this error. Reverse for 'more' with keyword arguments '{u'slug': u''}' not found. 1 pattern(s) tried: ['(?P<slug>[-\\w]+)/$'] Everything was working perfectly and I cant seen to understand why. If I change the template to another template lets say hello.html the whole url responds well but once I change it back to index.html I get that same error. any help would be appreciated form.py from django import forms from posts.models import Post class PostForm(forms.ModelForm): class Meta: model = Post fields = [ "title", "content", "image", "draft", "publish", ] views.py def index(request): results = Post.objects.all().filter(draft=False).filter(publish__lte=timezone.now()) que = request.GET.get("q") if que: results =results.filter( Q(title__icontains=que)| Q(content__icontains=que)).distinct() paginator = Paginator(results, 8) # Show 25 contacts per page pages ="page" page = request.GET.get('page') try: query = paginator.page(page) except PageNotAnInteger: # If page is not an integer, deliver first page. query = paginator.page(1) except EmptyPage: # If page is out of range (e.g. 9999), deliver last page of results. query = paginator.page(paginator.num_pages) context = { "objects": query, "pages": pages } template = … -
Error when installing django channels on Fedora 24
This is the error that comes up when installing django channels with pip install channels: error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/home/arunvm/Desktop/CleverHires/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-oisfgik6/twisted/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-689vby9j-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/arunvm/Desktop/CleverHires/include/site/python3.5/twisted" failed with error code 1 in /tmp/pip-build-oisfgik6/twisted/ -
Why search index is not updating in elasticsearch dsl?
In models.py class Topic(models.Model): """ Topic model """ user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='forum_topics', editable=False) category = models.ForeignKey(Category, verbose_name=_("category")) title = models.CharField(_("title"), max_length=255) description = models.TextField( _("description"), default=_("No descriptions"), blank=True) slug = AutoSlugField(populate_from="title", blank=True, unique=True) date = models.DateTimeField( _("date"), default=timezone.now, blank=True, editable=False) last_active = models.DateTimeField( _("last active"), default=timezone.now, blank=True, editable=False) is_pinned = models.BooleanField(_("pinned"), default=False) is_globally_pinned = models.BooleanField( _("globally pinned"), default=False, editable=False) is_closed = models.BooleanField(_("closed"), default=False) is_removed = models.BooleanField(default=False) is_archived = models.BooleanField(default=False) is_modified = models.BooleanField(default=False, editable=False) modified_count = models.PositiveIntegerField( _("modified count"), default=0, editable=False) view_count = models.PositiveIntegerField( _("views count"), default=0, editable=False) comment_count = models.PositiveIntegerField( _("comment count"), default=0, editable=False) In views.py class ForumTopicSearchView(generics.ListAPIView): serializer_class = ForumTopicSearchSerializer def do_search(self, search, query_value, field, page_size): query = Q( "multi_match", query=query_value, type="phrase_prefix", fields=[field] ) search = search.query(query)[:page_size] response = search.execute() return response def get_queryset(self): query_value = self.request.query_params.get('query', None) page_size = int(self.request.query_params.get('page_size', 10)) search = Search(using=client, index=settings.ES_INDEX, doc_type='forum_topic_document') if query_value is not None: search = self.do_search(search, query_value, 'title', page_size) return search search = search.query() search = search[:page_size] response = search.execute() return response In serializers.py class ForumTopicSearchSerializer(Serializer): title = CharField() slug = CharField() category = PresentableSlugRelatedField(queryset=Category.objects.all(), presentation_serializer=CategoryLiteSerializer, slug_field='slug') view_count = IntegerField() comment_count = IntegerField() In documment.py class ForumTopicDocument(DocType): category = fields.ObjectField(properties={ 'title': fields.StringField(), 'slug': fields.StringField() }) slug = fields.StringField() class Meta: … -
Django set set already existing field as a foreign key to other table
A have two model tables which contains data. class A(models.Model): id = models.PositiveIntegerField(primary_key=True) #some other fields other_id = models.IntegerField(default=0, null=True) And the second class class B(models.Model): id = models.PositiveIntegerField(primary_key=True) #some other fields Now i want field A.other_id to become a ForeignKey related to field B.id. I cannot use SQL. I know it is suposed to be something like: b = models.ForeignKey(B, db_column="other_id") but it seems to not work. Please help :( -
Django TemplateDoesNotExist and BASE_DIRS
I am trying to load a template in django. I created a text file called current_date.html and typed inside the file "It is now {{current_date}}." and put it inside a templates directory C:\Users\reza\env_mysite\lib\site-packages\django\contrib\admin\templates Then inside the view I wrote below block of code: from django.template.loader import get_template from django.template import Context from django.http import HttpResponse, Http404 import datetime def current_datetime(request): now = datetime.datetime.now() t = get_template('current_datetime.html') html = t.render(Context({'current_date':now})) return HttpResponse(html) and inside urlpatterns I typed: url(r'^time/$', current_datetime) In the settings.py file, inside DIRS in typed: TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR,'templates')], 'APP_DIRS': True, and next time I typed 'DIRS': ['C:\Users\reza\env_mysite\lib\site- packages\django\contrib\admin\templates'] but in both scenarios I received TemplateDoesNotExist error with below details Request Method: GET Request URL: http://127.0.0.1:8000/time/ Django Version: 1.11.2 Python Version: 3.6.1 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] Template loader postmortem Django tried loading these templates, in this order: Using engine django: * django.template.loaders.filesystem.Loader: C:\Users\reza\templates\current_datetime.html (Source does not exist) * django.template.loaders.app_directories.Loader: C:\Users\reza\env_mysite\lib\site-packages\django\contrib\admin\templates\current_datetime.html (Source does not exist) * django.template.loaders.app_directories.Loader: C:\Users\reza\env_mysite\lib\site-packages\django\contrib\auth\templates\current_datetime.html (Source does not exist) Could you please let me know what is wrong with my codes -
Static content not displaying after making django website live?
I hosted my website temporarily on pythonanywhere.com But I don't understand why the static content is not being displayed. My settings.py on pythonanywhere.com is: STATIC_ROOT = u'/home/baqir/ProgrammersForum/main/static/' STATIC_URL = '/static/' And on my localhost is: STATIC_URL = '/static/' Screenshot of pythonanywhere.com : Screenshot on localhost: The urls are correct. What am I doing wrong? PS: I also ran python manage.py collectstatic -
Saving first name as username while adding user in django admin
I am trying to save username as firstname while adding a user from django admin. Currently it saves None in the username field as I have excluded username in the custom model. admin.py-- from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from .models import UserProfile from .forms import SignUpForm class ProfileInline(admin.StackedInline): model = UserProfile can_delete = False verbose_name_plural = 'Profile' fk_name = 'user' class CustomUserAdmin(UserAdmin): inlines = (ProfileInline, ) list_display = ('email', 'first_name', 'last_name', 'is_staff') list_select_related = ( 'profile', ) exclude = ('username',) fieldsets = ( ('Personal information', {'fields': ('first_name', 'last_name', 'email', 'password')}), ('Permissions', {'fields': ('is_active', 'is_staff', 'is_superuser', 'groups', 'user_permissions')}), ('Important dates', {'fields': ('last_login', 'date_joined')}), ) add_fieldsets = ( ('None', { 'classes': ('wide',), 'fields': ('first_name','last_name', 'email', 'password1', 'password2')} ), ) def get_inline_instances(self, request, obj=None): if not obj: return list() return super(CustomUserAdmin, self).get_inline_instances(request, obj) admin.site.unregister(User) admin.site.register(User, CustomUserAdmin) How can I insert username as firstname and make the custom field ie email 'required'. Now the password1 & password2 fields are mandatory. Any help/link is highly appreciated. -
How to create short uuid with Django
I have a model and UUID as primary key field. UUID id is way too long. I'd like to have it short similar to YouTube. class Video(models.Model): id = models.UUIDField( primary_key=True, default=uuid.uuid4, editable=False, ) Instead of this UUID('b39596dd-10c9-42c9-91ee-9e45b78ce3c1') I want to have just this UUID('b39596dd') How can I achieve above? -
Django response context using pytest-django client is always None
I'm using pytest-django to test some Django views. I want to test that the response context contains certain values, but it's always None. My view: from django.views.generic import TemplateView class MyView(TemplateView): template_name = 'my_template.html' def get_context_data(self, **kwargs): context = super(MyView, self).get_context_data(**kwargs) context['hello'] = 'hi' return context My test: def test_context(client): response = client.get('/test/') print('status', response.status_code) print('content', response.content) print('context', response.context) If I run this with the -s flag to see the print statements, the status code is 200, and content contains the rendered template, including the "hi" that's in the context. But context is None. I thought this client was the same as django.test.Client which should let me see the context... so what am I missing? I've tried this answer but get RuntimeError: setup_test_environment() was already called and can't be called again without first calling teardown_test_environment(). -
i want to delete and caption from database when user enter adult content in image as well as in caption
def Post_view(request): user=check_validation(request) if user: if request.method=="POST": form=PostForm(request.POST,request.FILES) if form.is_valid(): image=form.cleaned_data.get('image') caption=form.cleaned_data.get('caption') user=Postmodal(user=user,image=image,caption=caption) user.save() path=os.path.join(BASE_DIR,user.image.url) client=ImgurClient(USER_CLIENT_ID,USER_CLIENT_SECRET) user.image_url=client.upload_from_path(path,anon=True)['link'] #using clarifai api app = ClarifaiApp(api_key="aa14b38a0332430789ff7aebdcdd466b") model = app.models.get("nsfw-v1.0") response=model.predict_by_url(url=user.image_url) i=len(response["outputs"]) if response: if response["outputs"][0]["data"]["concepts"][1] > response["outputs"][0]["data"]["concepts"][0]: ctypes.windll.user32.MessageBoxW(0, u"Warning!! you are uploading adult content",u"Error", 0) user.image.delete() return redirect('/post/') else: ctypes.windll.user32.MessageBoxW(0, u"Valid content", u"Error", 0) # using paralleldots api for abusive content in caption url = "http://apis.paralleldots.com/abuse" r = requests.post(url, params={"apikey":PARALLELDOTS_KEY, "text": caption}) caption_text = r.text if 'Abusive' in caption_text: ctypes.windll.user32.MessageBoxW(0, u"Warning!! caption containing abusive content",u"Error", 0) user.caption.delete() return redirect('/post/') else: ctypes.windll.user32.MessageBoxW(0, u"caption is valid", u"Error", 0) return redirect('/feed/') elif request.method=="GET": form=PostForm() return render(request,'post.html',{'form':form}) else: redirect('/login/') -
Wagtail : costume user profile
How to make profiles system that show to the user his own information with his own posts ? i know that i didn't write details but it is better to keep the wagtail cms interface or to create another view with the main modules and query ?? thanks for help in advance and if you have any qs for any detail ask for it -
Django REST Framework documentation not displaying certain methods
I wonder why Django REST Framework build-in documentation doesn't display methods for a User. I have only available list, create, read, update for these URLs: url(r'^users$', views.UserList.as_view()), url(r'^users/(?P<user_id>\w+)$', views.UserDetail.as_view()), views.py: @permission_classes([CustomPermission]) class UserList(GenericAPIView): """ get: Return all users. post: Create a user. """ serializer_class = UserSerializer def get(self, request): users = User.objects.all() serializer = UserSerializer(users, many=True) return Response(serializer.data) def post(self, request): serializer = UserSerializer(data=request.data) if serializer.is_valid(): serializer.save() return Response(serializer.data, status=status.HTTP_201_CREATED) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) @permission_classes([UserPermission]) class UserDetail(GenericAPIView): """ get: Return user by ID. put: Update user by ID. delete: Delete user by ID. """ serializer_class = UserSerializer def get(self, request, user_id): try: user = User.objects.get(id=user_id) except User.DoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) serializer = UserSerializer(user) return Response(serializer.data) def put(self, request, user_id): try: user = User.objects.get(id=user_id) except User.DoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) serializer = UserSerializer(user, data=request.data) if serializer.is_valid(): serializer.save() return Response(serializer.data) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) def delete(self, request, user_id): try: user = User.objects.get(id=user_id) except User.DoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) user.delete() return Response(status=status.HTTP_204_NO_CONTENT) However example shown below is not visible in build-in documentation. I have also Swagger documentation in the project and everything is displayed properly. urls.py: url(r'^users/(?P<user_id>[0-9]+)/object$', views.UserObject.as_view()), views.py: @permission_classes([UserPermission]) class UserObject(GenericAPIView): """ post: Create a user object by his ID. get: Return a user object by his ID. put: … -
Html form input in place of python django forms
I am writing an application with django. I know how to implement the django forms but what I want to do really is to have an html input input with type text or email or password and save the input to database or link it to the form.py form.py class PostForm(forms.ModelForm): publish = forms.DateField(widget= forms.SelectDateWidget) class Meta: model = Post fields = [ "title", "content", ] views.py def create(request): form = PostForm(request.POST or None, request.FILES or None) if form.is_valid(): instance = form.save(commit=False) instance.save() messages.success(request, "Post created") return HttpResponseRedirect(instance.get_absolute_url()) context = { "form": form, } template = 'create.html' return render(request,template,context) html <form method="POST" action="" enctype="multipart/form-data">{% csrf_token %} {{ form.as_p }} <p> <input type="checkbox" id="test5" /> <label for="test5">Red</label> </p> <input type="submit" name="submit" value="submit post"> </form> -
Django: How can I add meta tags for social media?
I'm working on a Django template that I want to add social media meta tags (like meta property="go:title", meta property="og:description"..). I want to add these meta tags in the head of this template's page. This template however extends the base.html which already has meta tags in it's head. So in the first line of this template there is: {% extends 'base.html' %} I have all the social media meta tags in a partial called meta-tags-social-share.html Is there a way to just extend the head of this page with my partial, so that the social media tags are in the head? -
What is EOL Error in my code? i am using python and django
Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line utility.execute() File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 307, in execute settings.INSTALLED_APPS File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__ self._setup(name) File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 41, in _setup self._wrapped = Settings(settings_module) File "/Library/Python/2.7/site-packages/django/conf/__init__.py", line 110, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/Users/reddykumarasimha/Desktop/titanic/titanic/settings.py", line 1 " ^ SyntaxError: EOL while scanning string literal -
Failing to test POST in Django
Using Python3, Django, and Django Rest Frameworks. Previously I had a test case that was making a POST to an endpoint. The payload was a dictionary: mock_data = {some data here} In order to send the data over the POST I was doing: mock_data = base64.b64encode(json.dumps(mock_data).encode('utf-8')) When doing the POST: response = self.client.post( '/some/path/here/', { ..., 'params': mock_data.decode('utf-8'), }, ) And on the receiving end, in validate() method I was doing: params = data['params'] try: params_str = base64.b64decode(params).decode('utf-8') app_data = json.loads(params_str) except (UnicodeDecodeError, ValueError): app_data = None That was all fine, but now I need to use some hmac validation, and the json I am passing can no longer be a dict - its ordering would change each time, so hmac.new(secret, payload, algorithm) would be different. I was trying to use a string: payload = """{data in json format}""" But when I am doing: str_payload = payload.encode('utf-8') b64_payload = base64.b64encode(str_payload) I cannot POST it, and getting an error: raise TypeError(repr(o) + " is not JSON serializable") TypeError: b'ewog...Cn0=' is not JSON serializable even if I do b64_payload.decode('utf-8') like before, still getting similar error: raise TypeError(repr(o) + " is not JSON serializable") TypeError: b'\xa2\x19...\xff' is not JSON serializable Some python in … -
How to access a site hosted on apache django over the internet
I have a site that is setup on an apache server using django on a linux VM. Here is the conf file: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/sharan/myproject ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /static /home/sharan/myproject/proj_VivRx1/app_match/static <Directory /home/sharan/myproject/proj_VivRx1/app_match/static> Require all granted </Directory> <Directory /home/sharan/myproject/proj_VivRx1/proj_VivRx1> <Files wsgi.py> Require all granted </Files> </Directory> <Directory /home/sharan/myproject/proj_VivRx1/proj_VivRx1> Require all granted </Directory> <Directory /home/sharan/myproject/proj_VivRx1> Require all granted </Directory> <Directory /home/sharan/myproject/myprojectenv> Require all granted </Directory> WSGIDaemonProcess myproject python-path=/home/sharan/myproject/proj_VivRx1 python-home=/home/sharan/myproject/myprojectenv WSGIProcessGroup myproject WSGIScriptAlias / /home/sharan/myproject/proj_VivRx1/proj_VivRx1/wsgi.py </VirtualHost> I can go to the server ip address in the local machine browser and the site works perfectly. How can I access the site from another machine over the internet for testing? I tried using the ip address but the "site can't be reached" -
Django Include Template shows blank page if the for loop is inserted
I'm new to Django but am stumped on this one. When I include a page that has a for loop in it, it is showing a blank page. I'm trying to add services.html to the home.html page with the include option. Here is the views.py Here is the home.html page where I'm including the services.html page And here is the services.html page. I do have the endfor code at the bottom. On this page. When the loop is added to this page it shows blank on the home.html page Please Help :) -
Django - How to allow access to read one model objects from another django site hosted in other server
(First sorry for my bad English) Like i say in the title, i need to know how can i allow access to the objects of one model of a django app from another django app. for example, i have a django App in one VPS, and the other in other VPS and in the first one i public daily news about cience, i like to put a div in the other django app landing page that show the news that i publish in the first app. I know that i don't put code, but is because i don't know how to start, then i need the first push to help me figure how to make this and then i'm pretty sure that i going to came back to make specific questions. Thanks! -
In Django, invalid block tag url. Where am I getting this?
My main urls.py, urlpatterns = [ url(r'^semi_restful/', include('apps.semi_restful.urls', namespace='restful')), My app's urls.py, urlpatterns = [ url(r'^$', views.index, name="index"), url(r'new^$', views.new, name="new"), ] My app's html, <a href="{% url'restful:new'%}">Add New User</a> has the above link tag. I keep getting Invalid block tag on line 41: 'url'restful:new' I thought I did everything right by assigning namespace and name in urls.py. Does anybody know what could be wrong?? Thanks in advance. -
Incorrect string value
OperationalError at /admin/catalog/product/656/ (1366, "Incorrect string value: '\xD0\xA1\xD1\x82\xD1\x80...' for column 'title' at row 1") Try save 'title' in django admin panel