Re: How to select the proper column when I use ForeignKey?

2017-11-27 Thread Matemática A3K
th the same key Django will raise an IntegrityError. > I'm talking about the unique_together case. > I don't understand you > > 27 Kasım 2017 Pazartesi 08:55:45 UTC+3 tarihinde Matemática A3K yazdı: >> >> What Django shows in that dropdown is the __str__() method of

Re: How to configure NGINX to run Django app in a subpath?

2017-11-27 Thread Matemática A3K
inx.org/read.php?2,275684,275706 >> Etienne >> >> Le 2017-11-26 à 15:41, Matemática A3K a écrit : >> >> I don't know / remember how to do it in Gunicorn, but here is an example >> with uWSGI: >> https://stackoverflow.com/questions/35792409/nginx-serving-

Re: How to select the proper column when I use ForeignKey?

2017-11-27 Thread Matemática A3K
On Mon, Nov 27, 2017 at 5:30 PM, Matemática A3K <matematica@gmail.com> wrote: > > > On Mon, Nov 27, 2017 at 10:50 AM, Kubilay Yazoğlu <kyazog...@gmail.com> > wrote: > >> Thanks for your answer. I have one more question. What if there are more >&

Re: NOT NULL constraint failed when trying to create form with initial values

2017-11-27 Thread Matemática A3K
You shouldn't give the PK of new objects, leave that to Django. If photo_id is the PK of Photo, don't set it, Django will on save. If the same goes for Contest, then do a "contest = Contest()" - create a new contest - and assign it to the photo "photo.contest = contest", then "photo.save" On

Re: NOT NULL constraint failed when trying to create form with initial values

2017-11-27 Thread Matemática A3K
On Mon, Nov 27, 2017 at 7:30 PM, Matemática A3K <matematica@gmail.com> wrote: > > > On Mon, Nov 27, 2017 at 7:18 PM, Kubilay Yazoğlu <kyazog...@gmail.com> > wrote: > >> Nice try but I'm still getting this error: IntegrityError at >> /photo/c

Re: Some newbie questions on CBVs and FBVs

2017-11-23 Thread Matemática A3K
On Thu, Nov 23, 2017 at 8:49 PM, 'Simon Connah' via Django users < django-users@googlegroups.com> wrote: > Hi everyone, > > First of all sorry for the newbie questions it has been a long time since > I used Django and I think I have forgotten just about everything I once > knew. > > I'm working

Re: How do I make Django show the "user already exists" message when someone tries to register with an existing username?

2017-11-23 Thread Matemática A3K
> `views.py` has this: > def login_register(request, template="pages/login_register.html"): > ''' > Display registration and login forms > ''' > registration_form= RegisterForm() > return render(request, template, {"registration_form": registration_form > }) > > > > > def register(request): >

Re: Run manage.py test app_name command from view

2017-11-26 Thread Matemática A3K
On Sun, Nov 26, 2017 at 11:03 AM, Joshua O. Morales < joshuao.morale...@gmail.com> wrote: > What I would like to do is to execute the tests.py by clicking a certain > button. I am trying to run the tests.py via views.py, but it gives me a > 400 Bad Request error. Is there any other solution? >

Re: How do I limit my login form to just email and password?

2017-11-26 Thread Matemática A3K
On Sun, Nov 26, 2017 at 12:55 AM, Tom Tanner wrote: > My `models.py` has this: > class MyUser(AbstractBaseUser): > email= models.CharField(max_length=254, unique=True) > USERNAME_FIELD= "email" > > My `forms.py` has this: > class LoginForm(AuthenticationForm): >

Re: How to configure NGINX to run Django app in a subpath?

2017-11-26 Thread Matemática A3K
I don't know / remember how to do it in Gunicorn, but here is an example with uWSGI: https://stackoverflow.com/questions/35792409/nginx-serving-django-in-a-subdirectory-through-uwsgi The main thing is that you will have to deal with "/pmapp" prefix in your routing / urls. You can deal with this

Re: How do I limit my login form to just email and password?

2017-11-26 Thread Matemática A3K
clude' > > On Sunday, November 26, 2017 at 2:44:44 PM UTC-5, Matemática A3K wrote: >> >> >> >> On Sun, Nov 26, 2017 at 12:55 AM, Tom Tanner <dontsende...@gmail.com> >> wrote: >> >>> My `models.py` has this: >>> class MyUser(AbstractBa

Re: How do you access parent object values in an admin inline

2017-11-22 Thread Matemática A3K
nd show the appropriate inline according to the object. Here is sample (untested) code: https://stackoverflow.com/questions/8074161/how-to-show-different-inlines-depending-of-current-object-field-value > > On Wednesday, November 22, 2017 at 1:54:08 PM UTC-5, Matemática A3K wrote: >> &

Re: NOT NULL constraint failed when trying to create form with initial values

2017-11-28 Thread Matemática A3K
ny thanks. > :) I'm glad you solved it. > > 28 Kasım 2017 Salı 02:49:13 UTC+3 tarihinde Matemática A3K yazdı: >> >> >> >> On Mon, Nov 27, 2017 at 7:58 PM, Kubilay Yazoğlu . <kyaz...@gmail.com> >> wrote: >> >>> Oh, that's a life saver

Re: Permission for specific object in AdminPanel

2017-11-28 Thread Matemática A3K
Wow! That's a lot of code, please try to be more specific in order to get other people to help you. What are you trying to achieve? Autosearch of users in which context? I do not understand you :) On Tue, Nov 28, 2017 at 6:55 AM, Allan Nava wrote: > I have this

Re: Django admin pagination zero based?

2017-11-28 Thread Matemática A3K
On Tue, Nov 28, 2017 at 3:00 PM, Daniel Jewett wrote: > I just noticed that the URL get string in my admin app is off by one from > the auto generated pagination links. It appears that the pagination URLs > are zero based. > > For example if I'm on page 4 of results

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-28 Thread Matemática A3K
> class LoginForm(AuthenticationForm): > username= forms.EmailField(label=_("Email"), max_length=254) > > > class Meta: > model= User > > > fields= ("username",) > > If you use "fields = ("username")" you are restricting the fields to just that field, and the authentication form needs also

Re: ManyToMany widget in admin - the "user - permission way.."

2017-11-28 Thread Matemática A3K
> > I have this error: > > Unhandled exception in thread started by check_errors..wrapper at 0x7f2fa8d646a8> > > Traceback (most recent call last): > > File "/usr/local/lib/python3.5/dist-packages/django/utils/autoreload.py", > line 228, in wrapper > > fn(*args, **kwargs) > > File

Re: Admin many-to-many inlines - show editable fields from parent models

2017-11-28 Thread Matemática A3K
On Tue, Nov 28, 2017 at 9:12 AM, Jan Hartman wrote: > Hi, I'm having trouble with inlining models with a many-to-many > relationship through the intermediary model. My models are recipes and > categories (a category includes multiple recipes and a recipe can belong to >

Re: Admin many-to-many inlines - show editable fields from parent models

2017-11-29 Thread Matemática A3K
orking-with-many-to-many-models works as expected, seems that this is the case used for the fist one. I think we have hit a bug, can someone confirm? > Dne sreda, 29. november 2017 06.14.19 UTC+1 je oseba Matemática A3K > napisala: >> >> >> >> On Tue, Nov 28, 2

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-30 Thread Matemática A3K
Tom, - You shouldn't use Model=User (or the Meta) as it was a ModelForm, it is just a regular Form - AuthenticationForm takes request as its first parameter: def login_register(request, template="templates/login_register.html"): if request.method == "POST": login_form =

Re: NOT NULL constraint failed when trying to create form with initial values

2017-11-27 Thread Matemática A3K
tial" would not be useful. A workaround would be: if form.is_valid(): photo = form.save(commit=False) photo.contest = random_item photo.owner = 'SUMMERSON' photo.save() > > On Tue, Nov 28, 2017 at 1:32 AM, Matemática A3K <matematica@gmail.com> >

Re: NOT NULL constraint failed when trying to create form with initial values

2017-11-27 Thread Matemática A3K
> items = Contest.objects.all() > random_item = random.choice(items) > > if request.method =='POST': > data = {'contest': random_item, > 'ownername': 'SUMMERSON', > } > form=PhotoForm(request.POST, initial=data) > if form.is_valid(): > photo =

Re: NOT NULL constraint failed when trying to create form with initial values

2017-11-27 Thread Matemática A3K
ls and ORM), "object.foreign_key" gives you the object, while "object.foreign_key_id" gives you the id of that object (and is what it is stored in the database). You should name your field only "contest" for avoiding confusions. > > 28 Kasım 2017 Salı 01:03:5

Re: How to select the proper column when I use ForeignKey?

2017-11-26 Thread Matemática A3K
What Django shows in that dropdown is the __str__() method of the object, define it to your needs in A :) On Sun, Nov 26, 2017 at 7:49 PM, Kubilay Yazoğlu wrote: > Hello. I have two models. In one of them, I declared a foreign key to the > other one. Since this is done in

Re: Run manage.py test app_name command from view

2017-11-26 Thread Matemática A3K
mapp/selenium.html') > > On Monday, November 27, 2017 at 3:40:58 AM UTC+8, Matemática A3K wrote: >> >> >> >> On Sun, Nov 26, 2017 at 11:03 AM, Joshua O. Morales < >> joshuao@gmail.com> wrote: >> >>> What I would like to do is to exe

Re: How to configure NGINX to run Django app in a subpath?

2017-11-27 Thread Matemática A3K
<tkad...@yandex.com> wrote: > I have not been able to solve this problem with uWSGI. Apparently, uWSGI > is not using the same internal routing semantics than FastCGI. > > See: https://forum.nginx.org/read.php?2,275684,275706 > Etienne > > > Le 2017-11-26 à 15:41, Matemá

Re: How do you access parent object values in an admin inline

2017-11-22 Thread Matemática A3K
On Wed, Nov 22, 2017 at 3:21 PM, test wrote: > For example: > > class AnswerInLine(admin.TabularInline): > model = Answers > > class QuestionAdmin(admin.ModelAdmin): > inlines = [AnswerInLine] > > > I want to change the model in the AnswerInLine depending on what the >

Re: How do I make my form send a POST request to a specified view?

2017-11-23 Thread Matemática A3K
Because you are missing the form action, then the browser POSTs to the current url as default, see: https://docs.djangoproject.com/en/1.11/intro/tutorial04/#write-a-simple-form > `pages/login_register.html`: > # For this example, I only include the registration form's HTML > Register > > {%

Re: Why does Django say my login form is invalid? How can I find out why Django thinks it is?

2017-11-29 Thread Matemática A3K
> or... > fields= ("email",) > > Nothing seemed to change. the `login_form.is_valid()` still is `False`. > > Sorry if the question is dumb, I'm still learning Django thru working with > it. > > Try not using fields at all, that will use the fields in AuthenticationForm > > &g

Re: confusion in models in django

2017-12-18 Thread Matemática A3K
By registering an app you take full advantage of the framework: https://docs.djangoproject.com/en/2.0/ref/applications/#application-registry You can import "things" (modules, functions, etc.) from any python module in the path, that's why you are able to import any python code from your project

Re: Search results in template

2017-12-19 Thread Matemática A3K
On Tue, Dec 19, 2017 at 10:12 PM, Malik Rumi wrote: > I am implementing search on a local Django project: Django 1.11.5, Python > 3.6.3, Ubuntu 16.04. My issue is getting the search results onto the > template. > > I am using standard CBV for everything else in the site,

Re: Single-page app with dynamic filtering - 2 options to proceed

2017-12-18 Thread Matemática A3K
On Mon, Dec 18, 2017 at 5:36 PM, Jack wrote: > I am building a real estate listings map, which dynamically refreshes its > filter whenever the user moves the map. The page never refreshes when a > change is made. Think Zillow/Trulia >

Re: Model Design Questions

2017-12-16 Thread Matemática A3K
I use https://github.com/dmkoch/django-jsonfield for storing metadata and works very well, the only problem that I see in using one jsonfield for all the metadata you have for a document is searching (which I don't need). 3k, 6k or 9k of rows is "nothing" for MySQL or Postgres, a bottleneck won't

Introducing django-ai: Artificial Intelligence for Django

2017-11-13 Thread Matemática A3K
I'm very happy to announce the first release of django-ai: Artificial Intelligence for Django!! ``django-ai`` is a collection of apps for integrating statistical models into your Django project so you can implement machine learning conveniently. It aims to integrate several libraries and engines

Re: Please explain "TypeError: handle_404() got an unexpected keyword argument 'exception'"

2017-12-11 Thread Matemática A3K
On Mon, Dec 11, 2017 at 10:23 PM, Chris Seberino wrote: > I'm trying to get a 404 page to show instead of a 500 error when Django > app sees a nonexistent URL. > > I'm still getting 500 errors with this clue in logs but I don't know what > it means > > Please explain

Re: Possible bug: OutputWrapper: TypeError: write() argument must be str, not bytes

2017-12-29 Thread Matemática A3K
On Fri, Dec 29, 2017 at 5:59 AM, emi wrote: > Hello all! > I'm new to the list and mostly new to Django. > > I am adding django-encrypted-model-fields to my Django project and one of > the steps to install it is to generate a key using a ./manage.py command: > $ ./manage.py

Re: [SOS] Django-Oscar Front end(theme) replacement

2017-12-29 Thread Matemática A3K
On Fri, Dec 29, 2017 at 5:14 AM, Fred Grey wrote: > Hi, > Hi! > > Does anybody use django-oscar to build a commerce website? I have done > most of the things to make it online. But the default theme is ugly and not > matched with the commodity's style. > > We are a startup

Re: 404 for some matching urls too (Version 2)

2017-12-29 Thread Matemática A3K
Please post your urls.py, this looks strange: admin/ [name='index'] > admin/ login/ [name='login'] > admin/ logout/ [name='logout'] > admin/ r/// [name='view_on_site'] > admin/ ^(?Prsi|auth)/$ [name='app_list'] > login/ [name='login'] > logout/ [name='logout'] > authissue [name='authissue'] > --

Re: Issue with Python 3.6 and Django 2.0 App Deployment on Shared Hosting

2018-01-05 Thread Matemática A3K
On Mon, Dec 25, 2017 at 7:14 PM, Alok Vaidya wrote: > HI All, > > I'm a very new into web development as well as very recently started with > Python 3.6.4 and Django 2.0 and built my first web application > successfully. Currently I'm in the process of deploying the

Re: Django 2.0.1 admin

2018-01-05 Thread Matemática A3K
On Fri, Jan 5, 2018 at 7:26 PM, Matthew Pava wrote: > No. I even uninstalled Django and reinstalled Django, but the issue > persists. > > > Seems like the admin's template tags are not being loaded correctly. Are you using custom template tags? Did you restart your dev

Re: Trapping underlying exceptions

2018-01-05 Thread Matemática A3K
On Fri, Jan 5, 2018 at 1:45 PM, Stephan Doliov wrote: > Hi, > I am diving ever deeper into Django and I came upon some behavior that > frustrated me but perhaps I am just misunderstanding what should happen and > why. > > In writing unit tests for code, I wanted to

Re: Handling Celery Connection Lost Problem

2018-01-05 Thread Matemática A3K
On Fri, Jan 5, 2018 at 9:01 PM, Jason wrote: > To reinforce on what Jani Tianen said, this is not a django or python > issue, nor really a Celery issue. What you should research and investigate > is high availability rabbitmq clusters, if this is such a concern for you. >

Re: Error following django's documentation 2.0

2018-01-05 Thread Matemática A3K
On Fri, Jan 5, 2018 at 8:32 PM, FernandoJMM wrote: > Hello everyone, > > I'm learning django. I am in the official documentation of django link: > > *https://docs.djangoproject.com/en/2.0/intro/overview/ > * > >

Re: Links to files

2018-01-05 Thread Matemática A3K
On Fri, Jan 5, 2018 at 1:50 PM, Karl Ritchie wrote: > Hi I'm very new to Django. I tried searching for this but the answers I > found aren't very clear. I'm wanting to create links to PDF documents. > I've created an app called writing with a static folder with PDF files.

Re: Django User module extend

2018-01-05 Thread Matemática A3K
On Fri, Jan 5, 2018 at 1:52 PM, Ketul Suthar wrote: > class Profile(models.Model): > user = models.OneToOneField(User, on_delete=models.CASCADE) > is_manager = models.BooleanField(default=False) > manager =

Re: I want to display my restaurant list for which i used a function based view and it is working fine but when i import generic list view then it's not displaying that list

2017-12-21 Thread Matemática A3K
On Thu, Dec 21, 2017 at 3:05 PM, Ruhail Ahmad wrote: > def resturant_listview(request): > template_name = 'resturants/resturants_list.html' > queryset = ResturantLocation.objects.all() > context= { >"obj_list": queryset >

Re: Envío de formulario con una tabla dinámica

2017-12-21 Thread Matemática A3K
Antonio, Tu duda / problema corresponde a jQuery más que a Django, en una lista enfocada en Javascript en Español podrás encontrar mas ayuda. También te recomiendo que uses sitios como jsfiddle para postear tu código en estos casos, así le va a ser mas fácil para quienes pueden ayudarte el

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-07 Thread Matemática A3K
def random_post(request): posts_ids = Post.objects.all().values_list("id", flat=True) random_obj = Post.objects.get(id=random.choice(posts_ids)) context = {'random_obj': random_obj,} return render(request, 'blog/random_post.html', context) -- You received this message because you

Re: Django local development server hangs after calling pandas df.plot a second time

2018-01-07 Thread Matemática A3K
Hi! This may be better suited for the django-pandas community, as it involves its internals. It is also very hard to debug without errors or stack traces. HTH On Sun, Jan 7, 2018 at 3:51 PM, asilver wrote: > I'm trying to build a small website, using django, that stores

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-07 Thread Matemática A3K
On Sun, Jan 7, 2018 at 7:44 PM, Ronnie Raney wrote: > > def random_post(request): > posts_ids = Post.objects.all().values_list("id", flat=True) > random_obj = Post.objects.get(id=random.choice(posts_ids)) > context = {'random_obj': random_obj,} > return

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 2:11 PM, Ronnie Raney wrote: > Thanks - for clarification. Yes! good advice on remaining calm. Apologies > if I seemed intense. > > If I use this urlpattern, it takes me to the correct template. > > *path('post/random/', views.random_post,

Re: Managing a process from Django

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 2:41 PM, Kasper Laudrup <laud...@stacktrace.dk> wrote: > Hi Matemática A3K, > > On 2018-01-08 17:58, Matemática A3K wrote: > >> >> With this https://stackoverflow.com/questions/89228/calling-an-externa >> l-command-in-python >> yo

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 2:51 PM, Ronnie Raney wrote: > *You can't change the of a user from a view unless you do a redirect. You > can issue a redirect to /post/ where the id is what you picked at > random at the "random_post" view* > > I can't change the *what *of a user

Re: Simple file uploading app

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 9:16 AM, guettli wrote: > Just for the records: Since I found no matching solution I wrote a generic > http upload tool: https://pypi.python.org/pypi/tbzuploader/ > > For ftp there are thousands of clients, for automated upload via http I > found none.

Re: Django local development server hangs after calling pandas df.plot a second time

2018-01-08 Thread Matemática A3K
andas and I don't use Windows, so I can't help you. Why don't you try opening an issue in https://github.com/chrisdev/django-pandas or contacting the listed contributors? I don't think they are reading this list... HTH > > > On Sunday, January 7, 2018 at 2:53:45 PM UTC-5, Matemática A3K

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 11:30 AM, Ronnie Raney wrote: > Thanks Mat-A3K > > Here's what I have so far... > > *models.py* > class Post(models.Model): > post_id = models.AutoField(primary_key=True) > all the other fields... > > *views.py* > > #Normal (not random)

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 11:50 AM, Ronnie Raney wrote: > Also, would something like this work, and would it be a way to create the > view? > No, it won't work, you should read https://docs.djangoproject.com/en/2.0/topics/class-based-views/intro/ > > class

Re: Select random blog post Object from "Post" Model and render In View/Template

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 1:37 PM, Ronnie Raney wrote: > Ugh. Sorry for the confusion. Here again are the pieces where I need > suggestions. Please suggest actual code. I can't decipher things written in > plain language on forums. Code is key for me. > OK, first, calm down,

Re: Managing a process from Django

2018-01-08 Thread Matemática A3K
On Mon, Jan 8, 2018 at 12:48 PM, Kasper Laudrup wrote: > Hi fellow Django users, > > I'm working on creating a Django application for managing DHCP leases and > DNS entries and for that I would like to be able to (re)start the DHCP > daemon from Djano. > > I think it would

Re: Issues with image.path being reported wrong causing failing of a Celery task

2018-01-17 Thread Matemática A3K
b On Wed, Jan 17, 2018 at 12:17 PM, Paul wrote: > I have the following model: > > > class Image(models.Model): image = models.ImageField(upload_to=fi > le_upload_to) > > > I have a dynamic file_upload function: > > > def file_upload_to(instance, filename): > base =

Re: Let users either upload a file or provide an URL to a file

2018-01-17 Thread Matemática A3K
On Wed, Jan 17, 2018 at 11:53 AM, Tony wrote: > I would like to let users either upload a video file(to AWS S3) or provide > an URL to a video, e.g. Youtube/Vimeo. > > > I found a similar question for Rails: Rails: upload a file OR store a url >

Re: Using the ModelAdmin.inlines class, there is no DELETE button

2018-01-16 Thread Matemática A3K
On Tue, Jan 16, 2018 at 6:15 PM, Matemática A3K <matematica@gmail.com> wrote: > According to https://code.djangoproject.com/ticket/15910: > "When adding a form to an inline formset in the admin interface it has a > nice "Remove" link added automatically. These li

Re: Using the ModelAdmin.inlines class, there is no DELETE button

2018-01-16 Thread Matemática A3K
According to https://code.djangoproject.com/ticket/15910: "When adding a form to an inline formset in the admin interface it has a nice "Remove" link added automatically. These links are however missing from empty rows that have been created as a result from the "extra" option. They are also

New release of django-ai: Spam Filtering systems

2018-01-15 Thread Matemática A3K
I’m very happy of announcing the second release of django-ai: Artificial Intelligence for Django. https://github.com/math-a3k/django-ai https://django-ai.readthedocs.io/en/latest/readme.html The main exciting features of this version are Spam Filtering systems and Classification with Support

Re: Simple file uploading app

2018-01-16 Thread Matemática A3K
https://codereview.stackexchange.com/questions/124699/multi-threading-upload-tool On Wed, Jan 10, 2018 at 11:46 AM, guettli wrote: > > > Am Dienstag, 9. Januar 2018 01:08:48 UTC+1 schrieb Mike Morris: >> >> Though it is not a Drupal app, there is an excellent drop box type

Re: I want to update records, I use View instated of UpdateView, is this right way ? can anyone tell me, is this right way or wrong?

2018-01-16 Thread Matemática A3K
Does it work? On Mon, Jan 15, 2018 at 5:05 AM, Amitkumar Satpute < satpute.amitku...@gmail.com> wrote: > >1. >2. >3. >4. views.py >5. --- >6. class UpdateUser(View): >7. def post(self,request,pk): >8.

Re: Django http request to api error

2018-01-16 Thread Matemática A3K
On Wed, Jan 17, 2018 at 1:42 AM, wrote: > As this is the first time I'm trying this out, I do not know what is wrong > with the problem. So it would be great if someone can help me solve this > problem > > > The code I'm using is at the bottom page of this website: >

Re: Django view not working for practice project

2018-01-16 Thread Matemática A3K
views.py > def index(request): > latest_comic = Comic.objects.order_by('-comic_pub_date')[:2] > > This has an implicit .all(), it's the same than doing Comic.objects.all().order_by('-comic_pub_date')[:2] Then you are slicing it for the first 2 records, that's why you see 2 records. Use

Re: Get request, has PK, how do I access the PK data with in the model

2018-01-27 Thread Matemática A3K
https://docs.djangoproject.com/en/2.0/intro/tutorial01/ On Sat, Jan 27, 2018 at 8:19 AM, Travis Pickle wrote: > Andy, > > Do you have a link for this? Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To

Re: Customizable Invoice

2018-02-05 Thread Matemática A3K
On Thu, Feb 1, 2018 at 7:46 AM, Rakhee Menon wrote: > Hi Andreas, > > Yeah you are right I want to create a backend solution for storing the > information about the invoices once any changes are done in the invoice > format. > For instance a customer might change the

Re: import error

2018-02-05 Thread Matemática A3K
On Mon, Feb 5, 2018 at 10:59 AM, sarvit sarvit wrote: > is not app > views.py > from django.http import HttpRequest > > def index(request): >return HttpRequest("Hello World.") > > urls.py > > from django.shortcuts import render > from django.conf.urls import url >

Re: Django Login Popup forms.

2018-02-05 Thread Matemática A3K
On Wed, Jan 31, 2018 at 8:36 PM, Udit Vashisht wrote: > Hi, I want to create a popup form for login. I have implemented the same > for signup by creating jsonresponse from signup view. But i could not do > the same for the login form. Can anyone help. > > Popus are

Re: Django 2.0.2 not work with Jinja 2 (admin side)

2018-02-05 Thread Matemática A3K
You have to provide a traceback in order to get some help On Sat, Feb 3, 2018 at 9:26 PM, Николай Инкогнито wrote: > /admin/ > - raise error > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this

Re: In the Admin, Is it possible to make filters on foreign keys usable with lots of related objects?

2018-02-05 Thread Matemática A3K
On Fri, Feb 2, 2018 at 3:23 PM, Paul Tiplady wrote: > Currently it's simple to configure a filter on a foreign key in the admin: > > `list_filter = ['theforeignkeyfield']` > > However in practice this is barely usable in most cases that I've > encountered, since the admin uses

Re: Travis Problem

2018-02-05 Thread Matemática A3K
On Thu, Feb 1, 2018 at 9:58 AM, Andy wrote: > Hi, > > im trying to convince Travis to test my app: > https://github.com/kakulukia/django-secrets > > But its failing for all python3 versions. Because my system python 3 is > 3.6.4 i just installed pyenv, created a 3.6.3

Re: javascript transpilers

2018-02-05 Thread Matemática A3K
On Thu, Feb 1, 2018 at 8:27 PM, Mike Dewhirst wrote: > On 2/02/2018 12:54 AM, Jason wrote: > >> https://caniuse.com/#feat=wasm >> >> >> IIRC wasm is not polyfillable or transpilable, so if you're targeting >> users on any of those red cells, then wasm is not for you. >> >

Re: Travis Problem

2018-02-05 Thread Matemática A3K
e' object has no attribute 'SECOND_SECRET' > > > Am Montag, 5. Februar 2018 15:50:14 UTC+1 schrieb Matemática A3K: >> >> >> >> On Thu, Feb 1, 2018 at 9:58 AM, Andy <kaku...@gmail.com> wrote: >> >>> Hi, >>> >>> im trying to c

Re: Travis Problem

2018-02-05 Thread Matemática A3K
; should. > > If you have some minutes to spare, please test it and tell me if you can > reproduce the problem. > > > > Am Montag, 5. Februar 2018 16:30:21 UTC+1 schrieb Matemática A3K: >> >> >> >> On Mon, Feb 5, 2018 at 12:23 PM, Andy <kaku...@gma

Re: Travis Problem

2018-02-05 Thread Matemática A3K
$ On Mon, Feb 5, 2018 at 1:50 PM, Andy <kakulu...@gmail.com> wrote: > which python version did you use and which operating system? > > > Am Montag, 5. Februar 2018 16:49:26 UTC+1 schrieb Matemática A3K: > >> rodrigo@enoch:~/code$ git clone g...@github.com:kakulukia/djang

Re: wsgi error

2018-01-29 Thread Matemática A3K
On Sat, Jan 27, 2018 at 12:05 AM, tango ward wrote: > Hi Team, > > Not sure if this issue covered here but I am getting an error uploading my > pet project in Heroku. > > ModuleNotFoundError: No module named 'animals.wsgi' > > 2018-01-27T02:59:26.637953+00:00 app[web.1]:

Re: Django development -

2018-01-29 Thread Matemática A3K
On Thu, Jan 25, 2018 at 10:27 AM, Matt wrote: > Hi all, > > First time poster - so hi! & hope I'm asking things here in the right > way. I've used django, on and off, for a while for personal little > projects, and found it fun to use. But I'm, no pro, and its not my day

Re: I hope to increase OneToOne mode GenericForeignKey

2018-02-06 Thread Matemática A3K
On Mon, Feb 5, 2018 at 6:57 PM, Ma Mars wrote: > I hope to increase OneToOne mode GenericForeignKey, > For example, a passport (one user has only one passport, but there are > many user roles, such as staff, drivers, customers, but they are one to one) > It's hard to

Re: Please support Django Girls Fundraising Campaign (sorry for irrelevant topic in this group)

2018-02-06 Thread Matemática A3K
On Tue, Feb 6, 2018 at 8:46 AM, Anna Makarudze wrote: > Hello all, > > > My name is Anna Makarudze. I am the Django Girls Foundation Fundraising > Coordinator. > > > I would like to take this opportunity to inform you about the crowdfunding > project we launched this week

Re: Dynamic creation of models

2018-02-06 Thread Matemática A3K
On Tue, Feb 6, 2018 at 8:35 AM, Marc wrote: > Hello > > > > Currently working on a project to allow researchers to upload data files > into a repository. The system will only handle the import, validation and > transformation of the data, so that it meets the required

Re: Preventing apps installing duplicate models

2018-02-06 Thread Matemática A3K
On Tue, Feb 6, 2018 at 1:23 PM, Murat Sert wrote: > Hi, > > I'm working on a project upgrade from Django 1.8 to 1.11. They've used a > custom registration app which is inheriting from Django Registration Redux > package. > Both packages are listed on installed_apps list.

Re: Please support Django Girls Fundraising Campaign (sorry for irrelevant topic in this group)

2018-02-06 Thread Matemática A3K
On Tue, Feb 6, 2018 at 4:12 PM, Etienne Robillard wrote: > > > Le 2018-02-06 à 13:55, Gerardo Palazuelos Guerrero a écrit : > > the django girls project was my introduction to django, and it was a good > one. > > I don't know man. > Basically I guess programming Django/Python

Re: Handling Celery Connection Lost Problem

2018-01-03 Thread Matemática A3K
On Tue, Jan 2, 2018 at 11:14 PM, Mukul Mantosh wrote: > I am not using result backend my question is that when the broker > connection is lost it throws a connection refused exception which i could > normally catch through the following given below code. > > *try:* > *

Re: Handling Celery Connection Lost Problem

2018-01-03 Thread Matemática A3K
simply want if connection lost try for 10 seconds if connected > its good otherwise just move on don't get stuck. > > Even if i tried add.apply_async((2, 2), retry=False) but it is still not > working and the page is not giving back the HTTP Response. > > I think i have cleared ev

Re: Update View not updating table when Rendering fields manually

2018-01-03 Thread Matemática A3K
On Wed, Jan 3, 2018 at 1:53 AM, Sumit Kumar wrote: > When I am using simply this > > > {% block content %} >{% csrf_token %} >{{ form }} > > {%

Re: Static/constant dictionary for get_initial or get_form_kwargs

2018-02-28 Thread Matemática A3K
On Tue, Feb 27, 2018 at 9:10 PM, Bob Glassett wrote: > Hello, > > Trying to bring a django app into production, and I ran into a real > headscratcher. > > I have a Class based view inherited from create. When the page reloads, > after validation, I check the initial

Re: What happened to CollapsedFieldsets.js?

2018-02-28 Thread Matemática A3K
On Tue, Feb 27, 2018 at 1:28 PM, Alan wrote: > Hi there, > > Well, I used that like 8 years ago. Just wondering what's the current > solution for Django 2.0 if one want to collapse fields in forms. > > AFAIK is to write your own javascript (or use a third-party library /

Re: Is there a way to make a field both foreignKey or allow user to fill it in themself?

2018-02-28 Thread Matemática A3K
On Wed, Feb 28, 2018 at 12:46 AM, Mike Dewhirst wrote: > On 28/02/2018 1:58 PM, Alexander Joseph wrote: > >> Sorry, I think my question was confusing. What I want to do is allow the >> user to either select a user from a drop down list of users from the >> ForeignKey in

Re: Industrial Analytics

2018-02-26 Thread Matemática A3K
On Sun, Feb 25, 2018 at 12:12 PM, Raj wrote: > Dear All, > > Can we use Django for Industrial Analytics ? . Where data volume is huge > & with frequency in Mill seconds. > Yes :) > > Can someone name some examples of such industrial analytics application >

Re: Trying to use tooltips in django 2.0 form

2018-02-26 Thread Matemática A3K
On Mon, Feb 26, 2018 at 9:16 AM, Alan wrote: > Hi there, > > I have this in my forms.py: > > class SubmissionForm(forms.Form): > > > molecule_file = > forms.FileField(validators=[FileExtensionValidator(settings.CONTENT_TYPES), > file_size], help_text="Required: Select

[ANN] The covid-ht project

2021-01-15 Thread Matemática A3K
>From https://covid-ht.herokuapp.com/about: According to Dr. Eugenia Barrientos[1], an ongoing viral infection can be detected from the results of an hemogram test, and, given the current COVID19 pandemic, all viral infections with cold and flu symptoms should be treated as COVID19 cases. The

New FOSS project built with Django: tradero

2023-06-30 Thread Matemática A3K
tradero is a tool for achieving self-funding via trading. Self-funding means generating the means independently to cover a budget in order to opt by the value it produces rather than out of economic necessity. It tracks Symbols in an Exchange with a time resolution, calculates indicators and