Data dodania Pytanie
2017-09-20 11:09 Django: Uploading multiple files. List of files needed in cleaned_data['file'] »
I followed the pattern of the docs, to upload several files with one forms.FileField: https://docs.djangoproject.com/en/1.11/topics/http/file-uploads...
(2) odpowiedzi
2017-09-20 03:09 How do I create and submit a form from a model inside a modal? »
In my app I have a page called products. In this page I display records form my database in a table. Every row of the table has two buttons, to add a...
(1) odpowiedzi
2017-09-19 18:09 Django - What is different {% static %} and /static/? »
I am studying Django. In my settings.py : STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') and when I try to add an image in ...
(1) odpowiedzi
2017-09-19 08:09 Error running django local server: `__init__() got an unexpected keyword argument 'tcp_nodelay'` »
Everything was fine and always run without problem. Now I get the error when I load the app from the browser. Seems not something related to the code ...
(0) odpowiedzi
2017-09-19 04:09 RelatedObjectDoesNotExist at /profile »
I have created the user profile model. I migrated the model to syn with the database. However I am getting an error of User has no profile when I rout...
(2) odpowiedzi
2017-09-18 22:09 Include a menu to several templates in Django »
I'm trying NOT to write same code twice on different templates. Real hassle when changing something. So when I go to a section of the webpage, I want...
(1) odpowiedzi
2017-09-18 15:09 Installing requirements.txt »
I am new to the Wagtail cms and am taking over a friend's project for his site. I have downloaded his repo and am trying to get it to run locally. I...
(2) odpowiedzi
2017-09-18 13:09 Copy static files to volume on deployment? »
How can I ensure that the most recent static files created during deployment of a Django application are copied to a volume? My web container defines...
(2) odpowiedzi
2017-09-17 22:09 Structuring Django Project »
I know that you're supposed to have a templates folder within each app folder, how I have two questions clarify further. 1, Should I have 2 base.html ...
(1) odpowiedzi
2017-09-17 20:09 How do I pass a dictionary from one view to another in Django using session? »
I have used session to pass dict from one view to another. But it shows this error. I want to create multiple templates submit form. my views.py d...
(2) odpowiedzi
2017-09-17 16:09 eventlet.monkey_patch() throws an exception: The SECRET_KEY setting must not be empty »
I have a Django project. The packages I use: Django 1.11, Eventlet 0.21.0. Python version is 3.4.3. There are the following configuration files: 1) T...
(2) odpowiedzi
2017-09-16 22:09 Cannot include urls from my app in django »
I am following the TDD web development with Python to learn Django. It is based on Django 1.8 but I am trying to follow it on Django 1.11. There seem ...
(2) odpowiedzi
2017-09-16 10:09 How can i call a html template without any view in django »
I want to call index.html template to particular URL without calling any view. is it possible in django? ...
(1) odpowiedzi
2017-09-16 04:09 VueJS props are undefined in component »
I am trying to integrate VueJS with my frontend for my Django applications. I have the following Vue code in a javascript file: window.onload = funct...
(3) odpowiedzi
2017-09-16 02:09 Why does opening the Chrome Console solve long wait issue? »
My colleagues & I are building an Angular 4 app with a Django back-end. Periodically we have to wait a long time for a request to go out from the...
(0) odpowiedzi
2017-09-15 19:09 django annotate models with an aggregate value based on query »
Let's say I have the following model structure: Parent(): Child(): parent = ForeignKey(Parent) GrandChild(): child = ForeignKey(Child) state = Bool...
(2) odpowiedzi
2017-09-15 15:09 Iterating through json list in Django template »
I am passing the following context in my Django template : context = {'test': custom_json_list} And the output of custom_json_list is this : {'p...
(1) odpowiedzi
2017-09-15 01:09 Django template Module Import Error »
Using Django version 1.9.5 and Python 3. Upon navigation to the url, I am getting the following error: ImportError at /music/ No module named 'djan...
(2) odpowiedzi
2017-09-14 13:09 How to remove an object from another object in django? - python »
I have a queryset that created by Profile.objects.all(). I want to print it in template except just one of its rows. How can I do it in template? or i...
(2) odpowiedzi
2017-09-14 07:09 Django: select_related to a table vs table's field »
I have 2 models class A(models.Model): val = models.IntegerField() class B(models.Model): val2 = models.IntegerField() a = models.Foreig...
(1) odpowiedzi
2017-09-14 02:09 Django .get() returns a tuple and not the object »
I have a simple function which looks like this: parent_key = SeoKeys.objects.get(view_id=view_id, key_nbr=key_nbr) if parent_key.status != 'activ...
(1) odpowiedzi
2017-09-13 22:09 Django on mod_wsgi syntaxError »
I installed Django 1.11.5 with Virtualenv on mod_wsgi. python version is 2.7.13. I get this error in /var/log/httpd/error_log: [Wed Sep 13 16:41:00...
(0) odpowiedzi
2017-09-13 21:09 Django - access class attributes of a class-based view in middleware »
I have a couple of views and each of them must be accesed by no more than one user at a time. Therefore I use a locking service for this. My idea is a...
(1) odpowiedzi
2017-09-13 17:09 Jinja2 Multi-level template inheritance issue »
I have the following three files in a Django App, with the template engine being Jinja2 skeleton.html <head> {% block head_content %} ...
(1) odpowiedzi
2017-09-12 21:09 How to reverse_lazy to a view/url with variable? »
I've got a DeleteView I use for removing objects from a model. It is launched via a button in a table. It works fine. class DeleteAssignment(DeleteVi...
(2) odpowiedzi
2017-09-12 17:09 Django - Custom save method in model »
(Using Django 1.11.5) Traditionally, I've always created a model like so: class Animal(models.Model): is_hungry = models.BooleanField(default=Tr...
(2) odpowiedzi
2017-09-12 15:09 Django : Can't import 'module'. Check that module AppConfig.name is correct »
Might look like an already answered question, actually here you have the same problem (kind of) i had. My problem is, it's just a trick, one line, no ...
(1) odpowiedzi
2017-09-11 23:09 Passing URL params from the database »
I am trying to build a full stack web application. In my database, I have a table with lots of data that looks something like: SHOWS ID show...
(1) odpowiedzi
2017-09-11 22:09 How do I test Django views when they don't return values »
I'm new to Django. I've worked through some tutorials, written some models, views, forms etc. but I don't understand how they can be tested since eit...
(3) odpowiedzi
2017-09-11 16:09 How to store datasets and databases from quandl using quandl Python API/module in postgresql or mongodb? »
Does anybody know how to use quandl module/API for Python to store datasets and databases into a single database using postgresql or mongodb. Any help...
(1) odpowiedzi
2017-09-10 14:09 Django query group by month and year »
I have a Django model like this: class EVENT(models.Model): user = models.CharField(max_length=255) pay_time = models.DateTimeField(default...
(1) odpowiedzi
2017-09-10 04:09 How to enforce character length for asian languages such as chinese? »
Using Django v1.10 and Postgres there's a datafield which may contain a mixture of symbols (such as \|?), numbers, alphabetical letters, as well as A...
(1) odpowiedzi
2017-09-10 01:09 Python/Django Standalone Script - Import by filename is not supported »
I have the following script and it's meant to be a standalone Django script so I can run python my_script.py from the command line. It used to work wi...
(5) odpowiedzi
2017-09-09 07:09 Am I using get_or_create correctly? »
Trying to use a single view for update and create operations. I employ two different urls: url(r'^update/(?P<pk>[0-9]+)/$', BoardUpdateView.as...
(1) odpowiedzi
2017-09-09 01:09 XML submitted just fine to Amazon MWS but price not being updated »
I created my own repricer of sorts but the price isn't being updated on Amazon's side. My code seems to work just fine based off the response from Am...
(3) odpowiedzi