Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
django ManifestStaticFilesStorage 500 error
django 11.5 python 3.5.2 I would like to attach MD5 to the file, but there will be error 500 information, opened the debug, I can not see where the error appears. (English is not my native language; please excuse typing errors.) settings.py STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') templates <!-- Favicons --> {% load static %} <link rel="icon" type="image/x-icon" href="{% static "favicon/favicon.ico" %}"> <link rel="apple-touch-icon" href="{% static "favicon/apple-touch-icon-precomposed.png" %}"> <!-- Bootstrap --> <link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet"> <link href="{% static "css/style.css" %}" rel="stylesheet"> python3 manage.py collectstatic You have requested to collect static files at the destination location as specified in your settings: /data/mysite/static This will overwrite existing files! Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes Post-processed 'admin/css/login.css' as 'admin/css/login.a846c0e2ef65.css' Post-processed 'admin/css/base.css' as 'admin/css/base.31652d31b392.css' Post-processed 'admin/css/fonts.css' as 'admin/css/fonts.494e4ec545c9.css' Post-processed 'admin/css/changelists.css' as 'admin/css/changelists.f6dc691f8d62.css' Post-processed 'admin/css/rtl.css' as 'admin/css/rtl.4c867197b256.css' Post-processed 'admin/css/forms.css' as 'admin/css/forms.15ebfebbeb3d.css' Post-processed 'admin/css/dashboard.css' as 'admin/css/dashboard.7ac78187c567.css' Post-processed 'admin/css/widgets.css' as 'admin/css/widgets.5e372b41c483.css' Post-processed 'css/style.css' as 'css/style.476c9dc9ef58.css' Post-processed 'css/bootstrap.min.css' as 'css/bootstrap.min.5c7070ef655a.css' Post-processed 'admin/css/dashboard.css' as 'admin/css/dashboard.7ac78187c567.css' Post-processed 'admin/css/changelists.css' as 'admin/css/changelists.f6dc691f8d62.css' Post-processed 'admin/css/base.css' as 'admin/css/base.6b517d0d5813.css' Post-processed 'admin/css/fonts.css' as 'admin/css/fonts.494e4ec545c9.css' Post-processed 'admin/css/rtl.css' as 'admin/css/rtl.4c867197b256.css' Post-processed 'admin/css/forms.css' as 'admin/css/forms.2003a066ae02.css' Post-processed 'admin/css/widgets.css' as 'admin/css/widgets.5e372b41c483.css' Post-processed 'admin/css/login.css' … -
how to avoid increasing url in django
I am new to Django and learning it by developing small projects. Currently i am creating login app.I am facing below issue, i have written on form tag in one template: <form method="GET" action="login_page/"> {% csrf_token %} <button type ="submit"> Login</button> </form> after clicking submit button i goes to login/page url. And in the other template i have written below form tag, <form method="GET" action= "Welcome/"> {% csrf_token %} <button type ="submit"> Sign Up</button> </form> and my urls are: urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^login_page/', include('login.urls')) ] urlpatterns=[ #url(r'^$',TemplateView.as_view(template_name='base.html'),name='base'), url(r'^$',views.HomeView.as_view(),name='home'), url(r'^Welcome/$', views.WelcomeView.as_view(), name='Welcome'), #url(r'^Welcome/$',TemplateView.as_view(template_name='Welcome.html'),name='Welcome'), url(r'^logout/$',TemplateView.as_view(template_name='Logout.html'),name='Logout'), url(r'^home/$',views.HomeView.as_view(),name='home') ] but the issue is as i goes on and click submit buttons url keeps increasing, like http://localhost:8000/login_page/ localhost:8000/login_page/Welcome/ localhost:8000/login_page/Welcome/login_page and hence it gives error as it can not find 3rd url. how to correct it. ? can we go to views for action in form tag? -
django-filter - show only relevant filter values
I am using django-filters and can't figure out how to display only relevant to my queryset filter values. From code below I am displaying products by specific category but I receive all filter values that might not be applicable to that category. How do I display only relevant filter values? models.py Class Product(models.Model): name = models.CharField(max_length=512, unique=True, db_index=True) slug = models.SlugField(max_length=512, unique=True, db_index=True) categories = models.ManyToManyField(Category, related_name='products') description = models.TextField() status = models.BooleanField(default=True) manufacturer = models.CharField(max_length=64) common_attributes = JSONField(blank=True, null=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateField(auto_now=True) Class ProductFilter(django_filters.FilterSet): manufacturer = django_filters.AllValuesMultipleFilter(name='manufacturer', widget=forms.CheckboxSelectMultiple) Class Meta: model = Product fields = ['manufacturer'] views.py def show_category(request, category_slug): category = get_object_or_404(Category, slug=category_slug) subcategories = Category.objects.filter(parent_id=category.id) products = ProductFilter(request.GET, queryset=Product.objects.filter(categories=category).annotate(starting_price=Min('variant__price'))) breadcrumbs = Category.get_parents(category.id) return render(request, 'catalog/category.html', {'category' : category, 'subcategories' : subcategories, 'breadcrumbs' : breadcrumbs, 'products' : products}) -
How do I separate user accounts in Django ?
I am using Django to create an app that allows recording of medical information however I am having problems with seperating the user accounts so currently all users see the same information entered. Anyone familiar with django knows how to set the proper permissions and roles and is willing to help a newby out? I want the user to only access to the account the user creates and the records that the user create. This is my github link If you are able to to help I would really appreciate it. -
Digital Ocean 502 Bad Gateway
I just setup my Digital Ocean droplet and and have been following a tutorial to get Django setup. However, upon restarting gunicorn my site now just has an error page: 502 Bad Gateway nginx/1.10.3 (Ubuntu) I am new to this stuff so I have no idea what the problem, please help! From my Nginx error logs I see this: 2017/09/25 22:23:51 [error] 2140#2140: *10 upstream prematurely closed connection while reading response header from upstream, client: 110.72.37.75, server: _, request: "GET / HTTP/1.0", upstream: "http://unix:/home/django/gunicorn.socket:/" 2017/09/25 22:24:02 [error] 2140#2140: *12 upstream prematurely closed connection while reading response header from upstream, client: 110.72.37.75, server: _, request: "GET / HTTP/1.0", upstream: "http://unix:/home/django/gunicorn.socket:/" 2017/09/25 22:24:13 [error] 2140#2140: *16 upstream prematurely closed connection while reading response header from upstream, client: 110.72.37.75, server: _, request: "HEAD /manager/html HTTP/1.0", upstream: "http://unix:/home/django/gunicorn.socket:/manager/html" 2017/09/25 23:38:16 [error] 2140#2140: *25 connect() to unix:/home/django/gunicorn.socket failed (111: Connection refused) while connecting to upstream, client: 68.81.142.218, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/home/django/gunicorn.socket:/", host: "104.236.213.167" 2017/09/25 23:38:17 [error] 2140#2140: *25 connect() to unix:/home/django/gunicorn.socket failed (111: Connection refused) while connecting to upstream, client: 68.81.142.218, server: _, request: "GET / HTTP/1.1", upstream: "http://unix:/home/django/gunicorn.socket:/", host: "104.236.213.167" -
Django login error: “attempt to write a readonly database” in IIS
I have a Django web app installed in IIS 10 and I applied some models into the db.sqlite3 but when I tried to log into the django/admin/login I encountered the error: OperationalError at /admin/login/attempt to write a readonly database. I have found solutions to this problem in sqlite3 error attempt to write a read only database, Django admin backend, attempt-to-write-a-readonly-database-django and all of them mention to change the permissions of the database folder. I changed the permissions of that folder by deselecting the option Read-only (Only applies to files in folder) but it seems that when I hit the Apply button it does not make any change because I check again the folder and it has the Read-only option activated. Questions: Is there any way to change this permission by any command terminal in powershell? Do I have to do any extra step in IIS to make the db.sqlite3 working? Any help is welcome! -
Django models: Inherit from variable abstract base class
I'm hoping to inherit to a child class from a variable abstract base class. So a child class would not have to inherit from a pre-defined base class and would instead be able to inherit from any one class of multiple base classes. Ideally, the models would be setup like so: class Orders(models.Model): order_number = models.IntegerField() # Orders metrics class Meta: abstract = True class Fees(models.Model): fee_number = models.IntegerField() # Fee metrics class Meta: abstract = True class Transactions(Inherit from either Orders or Fees): transaction_number = models.IntegerField() # Transaction metrics Transactions would be able to inherit from either orders or fees as they could both be a source of a transaction. Generic foreign keys could be implemented to allow for variable foreign key reference within the Orders model and Fees model but I am curious if there is a way to do this without using generic foreign keys. Is there a specific arrangement, mixin, decorator, property, or method that will allow for association of a child class with a variable abstract parent class? -
Django how to make a url that looks like 'a/main' or 'b/main' or 'c/main'?
I am trying to create a url that can either be a/main b/main c/main The url should look something like this: url(r'^(a|b|c)/main$', view.as_view()) Then I should be able to get which value it(a, b or c) is from the args to the view. -
Insert One to One field value in django
I have the following models. class PatientInfo(models.Model): lastname = models.CharField('Last Name', max_length=200) firstname = models.CharField('First Name',max_length=200) middlename = models.CharField('Middle Name',max_length=200) ... def get_absolute_url(self): return reverse('patient:medical-add', kwargs={'pk': self.pk}) class MedicalHistory(models.Model): patient = models.OneToOneField(PatientInfo, on_delete=models.CASCADE, primary_key=True,) ... and upon submitting PatientInfo form it will go to another form which supply the MedicalHistory Details. I can see my PatientInfo data as well as MedicalHistory data but not linked to each other. Below is my MedicalCreateView which process my MedicalHistory form. class MedicalCreateView(CreateView): template_name = 'patient/medical_create.html' model = MedicalHistory form_class = MedicalForm def post(self, request, pk): form = self.form_class(request.POST) if form.is_valid(): patiente = form.save(commit=False) physician_name = form.cleaned_data['physician_name'] # do not delete patient = PatientInfo.objects.all(id=self.kwargs['pk']) MedicalHistory.patient = self.kwargs['pk'] patiente.save() messages.success(request, "%s is added to patient list" % physician_name ) return redirect('index') else: print(form.errors) This is how I set MedicalHistory.patient field using the PatientInfo.pk MedicalHistory.patient = self.kwargs['pk'] -
Override Django User Model
I'm writing a Django app. I wanted to override the Django User Model for the following reasons: 1) I want to use LDAP for authentication. Therefore, Django authentication is not necessary for me. 2) I already have a user table and I want to reuse that table. I do not want Django to create a dup table for me. Also the table structure doesn't "fit" Django User model very well. Therefore, I'd like to override the Django User class. Does anyone have any good example good that I can learn from? -
Django / making clone of reddit comment system
I try to make clone of reddit. For now I can get comments and sub comments. I couldn't make comment/subcomment/sub_sub_comment. How should I get the comment and childrens with tree structure without using mptt or any library. I want to make with generic relations. models.py class Comment(models.Model): entry_comment = models.TextField(max_length=160) content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) object_id = models.PositiveIntegerField() content_object = GenericForeignKey('content_type', 'object_id') def __str__(self): return self.entry_comment def descendants_comments(self): ct = ContentType.objects.get_for_model(self) childs = Comment.objects.filter(content_type=ct, object_id=self.pk) result = [] for child in childs: result.append(child) result.append(child.descendants_comments()) return result post_detail.html <section> <h1>Comments</h1> <div class="comments-bg"> {% for comment in comments %} <div class="comment-per-style"> <div class="comment-style">{{ comment.entry_comment }}</div> <ul> {% for subcomment in comment.descendants_comments %} <li>{{ subcomment.entry_comment }}</li> {% endfor %} </ul> </div> <button type="button" class="btn btn-success btn-sm reply-button">Reply</button> <form class="comment-form" action="{% url 'sub-comment' comment.id %}" method="post"> {% csrf_token %} <input id="entry_comment" class="form-input" type="text" name="entry_comment" maxlength="100" required /> <input type="submit" value="Submit comment"> </form> {% endfor %} </div> -
Django template doesn't load
Am following the Django Website's tutorial, currently on Pt3(https://docs.djangoproject.com/en/1.11/intro/tutorial03/) Tutorial states: "This code should create a bulleted-list containing the “What’s up” question from Tutorial 2. The link points to the question’s detail page." After adding the template and running the server I still only see this previous page and no updated template , what's wrong here? Thanks for your help! django_proj/mysite/polls/urls.py from django.conf.urls import url from . import views urlpatterns = [ #ex: /polls/ url(r'^$', views.index, name='index'), # ex: /polls/5/ url(r'^(?P<question_id>[0-9]+)/$', views.detail, name='detail'), # ex: /polls/5/results/ url(r'^(?P<question_id>[0-9]+)/results/$', views.results, name='results'), # ex: /polls/5/vote/ url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'), ] django_proj/mysite/polls/views.py from django.shortcuts import render from django.http import HttpResponse from .models import Question def index(request): latest_question_list = Question.objects.order_by('-pub_date')[:5] template = loader.get_template('polls/index.html') context = { 'latest_question_list': latest_question_list, } return HttpResponse(template.render(context, request)) def detail(request, question_id): return HttpResponse("You're looking at question %s." % question_id) def results(request, question_id): response = "You're looking at the results of question %s." return HttpResponse(response % question_id) def vote(request, question_id): return HttpResponse("You're voting on question %s." % question_id) def index(request): return HttpResponse("At Polls Index") /django_proj/mysite/polls/templates/polls/index.html {% if latest_question_list %} <ul> {% for question in latest_question_list %} <li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li> {% endfor %} </ul> {% else %} <p>No polls are available.</p> … -
Sync App-Backend user table with wordpress login
I programmed a Backend for an app. In the Backend is of course the login/registration endpoint. The problem is that my client had the new idea of synchronizing his Wordpress Blog with the app. And now he wants that when an user registers himself in the App, then he can log in the Wordpress and when an user registers himself in the Wordpress Blog, he can log in the App. My problem is that I'm not specialized either in Wordpress nor in PHP. I was watching the wp-login.php file, but didn't find a good result. I'm thinking of using the Backend Endpoint with Wordpress, I can guess that Wordpress could work as a client. Then I could use the same Login-Backend-Function with the App and with Wordpress and it should work. I was reading this kind of post in Internet, but is not that way, I don't want to register an user in Wordpress from the app, but the other way, I would like to register an user in the App or in Wordpress and log him in the App or Wordpress, but using the Django Endpoints of the Backend. I did't think that it would be so complicated. Maybe … -
object that was saved with commit=False, still saved
I have a very big model, with steps form. So I decided on each page get previous object and update his attributes in form. In first form I do: def save(self, commit=False): obj = super(FirstForm, self).save(commit=False) obj.id = 999999999 self.request.session['obj'] = pickle.dumps(obj) self.request.session.save() return obj Id is requires for mtm. So I set default one. Then on last step in view I do: obj = self.request.session.get('obj') obj = pickle.loads(obj) obj.id = None # remove temporary id obj.save() But Django save two objects. One normal object and one empty with id 999999999 . Why ? I tried do: obj = super(FirstForm, self).save(commit=False) obj.id = 999999999 self.request.session['obj'] = pickle.dumps(obj) self.request.session.save() obj.delete() But it didn't help. -
how does django-rest-framework- javascript web token work with django to auth users?
How does the Django-rest-framework-jwt work with django? It seems that the token is not part of the database which doesn't make sense. What is the behind the scenes when we add JWT to our settings? -
data labels stacked diagram d3
I am creating charts with D3 in Django and I would like to include data labels in one of my stacked bar diagrams. This is the code for the data labels that I have so far: bars.append("text") .text(function(d) { return d3.format(".2s")(d.y1-d.y0); }) .attr("x", function(d) { return x(d.y1)+(x(d.y0) - x(d.y1))/2; }) .attr("y", y.rangeBand()/3) .style("fill", '#ffffff'); I found this in a similar thread but it does not seem to work for my case. The whole code for the diagram is here: https://www.dropbox.com/s/y5v5z7ism39ibyo/stacked%20diagram%20code.rtf?dl=0 And this is the result: https://www.dropbox.com/s/w26ui3pqkwdkr3k/stacked%20bar%20chart.png?dl=0 As you can see, it displays "NaN" instead of the data. I would like to have 3 data labels per chart for each part of the bars. The data that I'm using is in csv format and looks like this: country,1 year prevalence ,3 year prevalence ,5 year prevalence Albania,4.3,11.9,18.2 ... Any suggestions? Thanks in advance! -
adding an extra context while passing data to serializer
I am trying to add an extra field auth_token in my table with the request.data but it is giving errors. THe error is -- "data['auth_token_id'] = auth_token TypeError: list indices must be integers or slices, not str " my code is given below: serializers.py class AppSerializer(serializers.ModelSerializer): class Meta: model = ThirdPartyApps fields = ('app_name', 'package_name', 'auth_token_id') views.py @api_view(['POST']) def add_apps(request): data = request.data auth_token = request.META.get('HTTP_AUTHTOKEN', '') data['auth_token_id'] = auth_token serializer = AppSerializer(data=data, many=True) if serializer.is_valid(): serializer.save() return Response(serializer.data, status=status.HTTP_200_OK) else: return Response(serializer.errors) I am looking for a way to pass extra data through the serializer. I just want to add auth_token to my model like the request.data nut it is giving this error --- data['auth_token_id'] = auth_token TypeError: list indices must be integers or slices, not str -
Listing Tags of a Post in Django CMS and Aldryn NewsBlog
I am trying to figure out how to display tags belonging to an article created within Aldryn NewsBlog plugin. Unfortunately, I cannot find any documentation on how do it. I was able to display categories using the following code. <span style="margin: 0; display: block"> <h4 style="display:inline-flex">Categories:</h4> {% for category in article.categories.all %} <a href="/articles/category/{{category.name|lower}}">{{ category.name }} {% if not forloop.last %}, {% endif %}</a> {% endfor %} </span> For tags, I am using this code: <span style="margin: 0; padding-bottom: 0; display: block"> <h4 style="display:inline-flex">Tags:</h4> {% for tag in article.tag %} <a href="/articles/tag/{{tag.name|lower}}">{{ tag.name }} {% if not forloop.last %}, {% endif %}</a> {% endfor %} </span> What am I doing wrong? Could anyone tell me how to display tags? -
ModuleNotFoundError: No module named 'django'
I'm trying make online a project but there is an error i can't solve myself. I already installed django but the server give me this error. Virtualenv is also active. 2017-09-25 20:10:27,471: *************************************************** 2017-09-25 20:10:30,892: Error running WSGI application 2017-09-25 20:10:30,893: ModuleNotFoundError: No module named 'django' 2017-09-25 20:10:30,893: File "/var/www/asd1_pythonanywhere_com_wsgi.py", line 17, in <module> 2017-09-25 20:10:30,893: from django.core.wsgi import get_wsgi_application 2017-09-25 20:10:30,893: *************************************************** 2017-09-25 20:10:30,893: If you're seeing an import error and don't know why, 2017-09-25 20:10:30,894: we have a dedicated help page to help you debug: 2017-09-25 20:10:30,894: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2017-09-25 20:10:30,894: *************************************************** Wsgi file is it: import os import sys path = '/home/asd1/mysite' if path not in sys.path: sys.path.append(path) os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' from django.core.wsgi import get_wsgi_application application = get_wsgi_application() Hosting is pythonanywhere.com -
custom user auth in django how to hook up
So the django docs are great but I am confused, it would be great to have a mentor right now. I want to create a custom user model and authentication system the user model will have -name -password -email -JWT (javascript web token) a permissions and a venue (place of entertainment) will be connected to this user model via a many to many relation via an association table. Here is the problem, even with the docs I am confused how I override the current out of box implementation for authorization. Additionally I'd like to use https://github.com/GetBlimp/django-rest-framework-jwt for the token auth but I have no idea how to hook it up. I guess I am looking for a walk through. -
django-filter | updating search results without refreshing the page
I'm using django-filter to allow users to search and filter through my blog posts. I have a search form with the method=GET and a couple of filters set up. It works by refreshing the entire page. I don't want that. I want it to refresh only the div that contains my results. Doing some research I found out I may need to use AJAX for that. Problem is, I don't know JS. I'll provide snippets of my code to show you what I would need. If anyone would be so kind to help me out, it would be apprecaited. filters.py class ClassFilter(django_filters.FilterSet): title = django_filters.CharFilter( lookup_expr='icontains', widget=forms.TextInput(attrs={'class': 'list_of_class_search', 'placeholder': 'Search by Class or University', 'id': 'list_of_post_search_box_id'}), ) category = django_filters.ModelChoiceFilter( queryset=Category.objects.all(), widget=forms.RadioSelect(attrs={'class': 'list_of_class_university_filter_btn_input'}), empty_label=None ) class Meta: model = Post fields = ['title', 'category',] views.py def list_of_post(request): post = Post.objects.filter(status='published') categories = Category.objects.all() class_filter = ClassFilter(request.GET, queryset=post) search_template = 'blog/category/list_of_post_by_category.html' template = 'blog/post/list_of_post.html' context = { 'posts': posts, 'categories': categories, 'search_template': search_template, 'filter': class_filter, [...] } return render(request, template, context) template <form id="list_of_post_search_form" method='GET' action='/blog/' autocomplete="off" /> <div class="col-xs-12 col-md-4 col-md-offset-4"> {% for radio in filter.form.category %} <!-- Shows my category filters --> {% endfor %} </div> </form> <div id="list_of_post_search_results_id"> … -
Get the logged in user when there is request is not defined
I am having trouble to find a way to make it work; I need to get the queryset with a list of the team created by the current logged in user. My form look the following : from django import forms from django.contrib.auth.models import User from registration.models import MyUser from .models import Project, Team from django.contrib.auth import get_user_model User = get_user_model() class EditSelectTeam(forms.Form): team_choice = forms.ModelChoiceField(widget=forms.RadioSelect, queryset=Team.objects.all().filter(team_hr_admin=request.User)) #team_id = forms.ChoiceField(queryset = Team.objects.filter(team_hr_admin= MyUser)) def team_select(self): data = self.cleaned_data['team_choice'] return data I get the error that request is not define -
Sending Data between Django and HTML using AJAX
Im new to AJAX and am having difficulty in understanding how the code works. Im trying to request a string containing a player name from a Database in Django called Game. Once it gets the name i would like it to return to the HTML, then repeat the process so that as players join their name is appended to the list and shown on the screen. Below is the code i currently have in views.py: # Host Client class HostGame(View): template_name = 'mainsite/hostclient.html' def get(self, request, gameCode, gamePassCode): if str(request.user) == "AnonymousUser": return(redirect(index)) return render(request, self.template_name, {'user': request.user, 'gameCode': gameCode, 'gamePassCode': gamePassCode}) def post(self, request,gameCode, gamePassCode): # Return the Player String from DB(Game) player = Game.objects.all().filter(hostPlayer=request.user).values('command') return render(request, self.template_name, {'user': request.user, 'gameCode': gameCode, 'gamePassCode': gamePassCode}) Below is the code i currently have in mainsite/hostclient.html: {% extends 'basicSet.html' %} {% block content %} <body> <div class="container"> <div class="page-header"> <h1 align="center">Join the Game Now!</h1> </div> <h4 align="center" class="break">Game Code: {{ gameCode }}<br>Game Pass Code: {{ gamePassCode }}</h4><hr width=90%><br> <div class="well"> <p>Insert Player Usernames</p> </div> </div> </body> {% endblock %} Any help would be greatly appreciated :) -
How to run Flask function that triggers on user's action and add content to the page?
The idea is that user push the button and Flask should add some content on the page. In my case python and Flask is not an aleatory choice, because python make a lot of backdoor work (that for example js can't). And perfectly it should be just one page without redirection on another page. So my question is: 1) How to get the moment when user push the button and run the function I want 2) How to make this function add some generated content on the page without reloading. -
Django migration returns unexpected name
I am trying to migrate a database, but every time I try it returns the error below. My app name is 'helloservice', but the table is 'customer' in the database 'pulse'. How do I tell Django not to use the helloservice prefix? If needed I followed a tutorial here, and am now trying to adapt the results to my own needs. django.db.utils.ProgrammingError: (1146, "Table 'pulse.helloservice_customer' doesn't exist")