URL pattern problem

2023-03-13 Thread Mark McWiggins
But when the system sends in a URL like: *devices/show/a100038596* I get NoReverseMatch on the pattern above (which works for other URLs in the system, so just changing it doesn't work.) Can you provide an additional pattern that will work for this? Thanks. Mark McWiggins 425-369-8286 (cell)

ORA-00918 error (column ambiguously defined) Django 4.1

2023-03-07 Thread Mark McWiggins
We're getting this Oracle error from the Django line: File "/home/aotemp/myvenv/lib/python3.8/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) File "/home/aotemp/myvenv/lib/python3.8/site-packages/django/db/backends/oracle/base.py",

TabularInlineAdmin queries waaaaaayyyyyy too much.

2023-02-02 Thread Mark Jones
I have an admin with 1 row in the tabular inline. I have a custom queryset in class ExtensionTabularInlineFormSet(BaseInlineFormSet): def get_queryset(self) -> QuerySet[Extension]: qs = super().get_queryset() This gets called 20 times to display that one row. When you have more

Re: Forbidden (403) - CSRF verification failed. Request aborted.

2022-11-25 Thread Mark Gensler
Try adding your ngrok domain to the list of CSRF_TRUSTED_ORIGINS: https://docs.djangoproject.com/en/4.1/ref/settings/#csrf-trusted-origins E.g. assuming you're using https: CSRF_TRUSTED_ORIGINS = ["https://*.ngrok.io;] On Wednesday, November 23, 2022 at 2:22:14 PM UTC dhana...@gmail.com wrote:

Re:Thanks

2022-07-28 Thread Mark Odoyo
Thanks On Fri, Jul 22, 2022, 7:49 PM Gerardo Palazuelos Guerrero < gerardo.palazue...@gmail.com> wrote: > I'm watching this series, it might help you understand. > > Python & Django 3.2 Tutorial Series > > https://www.youtube.com/watch?v=SlHBNXW1rTk=PLEsfXFp6DpzRMby_cSoWTFw8zaMdTEXgL > > -- >

External Authentication with username in header

2022-07-15 Thread Mark Glass
I would like to change the link that opens a Django app. Currently the app is launched with GET http://localhost:8000. I would like to include a username and password in the header. The header would be intercepted somehow (Middleware?) and the user marked as authenticated. The app will then

Re: Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
Yes. All migrations have been done. On Tue, Jun 7, 2022, 9:01 AM Sebastian Jung wrote: > Do you have make manage.py migrate and afzer this manage.py makemigrations? > > Mark Phillips schrieb am Di., 7. Juni 2022, > 17:02: > >> I can't seem to be able to create a test d

Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
t-database if anyone can help. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discuss

Looking for Recommendations for a Django Photo Gallery

2022-01-24 Thread Mark Phillips
has all the albums and photos in named directories on the file system, so I would like, if possible, to have the new photo gallery use the same directory structure. There are so many django photo galleries that I am not sure what is good and what isn't. Thanks for your recommendations! Mark

Choosing label in Admin autocomplete_fields widget

2021-12-13 Thread Mark Rossetti
In Django 3.1, we were using autocomplete_fields on Admin edit pages with some foreign keys. To improve usability, we had overridden ModelAdmin.autocomplete_view so that it would provide us with human-readable labels. Very similar to the question and solution in this Stack Overflow post:

Re: Hiii Every one

2021-07-16 Thread Mark Phillips
I have had good success with Linode, https://www.linode.com/. Their support has always been helpful and quick. Mark On Thu, Jul 15, 2021 at 11:18 AM Sebastian Jung wrote: > Hello, > > In germany we have a provider where you get a root server for 7€ with 2 > cores. Name is n

How to modify messages displayed in Admin change page?

2020-04-17 Thread Mark Phillips
ument was saved properly and remove it from the messages list? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googl

How can I delete the parent object related through a many to many field?

2020-03-24 Thread Mark Phillips
all the associated Documents are deleted? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.co

Django 3.0 Admin CHange Page Not Displaying Selected Option Correctly

2020-03-24 Thread Mark Phillips
nge page. Not my page template, but plain vanilla django admin templates. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-use

Re: Install library from Github

2020-01-02 Thread Mark Ogilvie
e=footer> >>>> . >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-us

Re: Django- Display PDf document in an Iframe or Pdf VIewer

2019-11-25 Thread Mark Phillips
ge of the pdf and make a jpg thumbnail of that page. Then use similar code from the display_image above after the else (for displaying an image on the page in the admin). Hope that helps! Mark On Mon, Nov 25, 2019 at 7:46 AM 'Lucas Gärtner' via Django users < django-users@googlegroups.com> wrote

When to use Admin model_delete/model_save and Model delete/save?

2019-11-25 Thread Mark Phillips
nctionally, it does not matter as far as I can see. I am just wondering if there is a preferred way, or a more "django idiomatic" way to do this. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Reverse loopup for admin_order_field?

2019-11-21 Thread Mark Phillips
ocument_id field to the DocumentMetaData model (since admin_order_field needs a related model) so I can sort on the decade field in the DocumentAdmin? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Doesn't save data django Foreignkey model

2019-08-26 Thread Mark Ochieng
Are trying to save data for Customer that does not exist in your CustomerData table yet. Because I think the error is tries to inform you that Billing data can only be created for a customer that already exists on you CustomerData On Sunday, August 25, 2019 at 5:17:24 PM UTC+3, Asaduzzaman

Re: Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
lib On Sat, Jun 15, 2019 at 8:16 AM Simon Charette wrote: > I meant Django 2.0 -> 2.1. As long as you are using Django 2.2 with SQLite > 3.20+ > the slowdown I mentioned should be effective. > > Simon > > Le samedi 15 juin 2019 08:32:56 UTC-4, Mark Jones a écrit : >> &

Re: Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
ngo isn't getting slower as the version of python increases, it's getting slower as the version of Django increases. On Sat, Jun 15, 2019 at 7:20 AM Simon Charette wrote: > Hi Mark, > > It's hard to tell exactly what's going on without more details but > assuming you are running

Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
I was fixing up a Django app https://github.com/mark0978/django-softdelete and setting up tox to make sure it worked with all the listed versions because of issues opened on the original repo. While I was running tox locally I noticed that with every version of Django, the tests ran slower,

Redirect on POST

2019-06-07 Thread Mark Davies Tan
happens. Since I don't have access to my client's code, I've been testing it out on w3schools and jsfiddle. Any clues on this? Thanks, Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Convert JSON data into structured data in an SQL database using Django ORM

2019-02-02 Thread Mark Phillips
/9.3/functions-json.html JSON, Django, and MySQL docs https://django-mysql.readthedocs.io/en/latest/installation.html Mark Mark On Sat, Feb 2, 2019 at 2:04 PM Parth Sharma wrote: > I am building a chatbot using Django with a MySQL backend. > I have a `ChatSession` model which represen

Re: Looking for a Django Co-Founder.

2019-02-02 Thread Mark Phillips
This thread appears to be a scam. It seems the OP is not contacting any of the folks who say they are interested. Perhaps this thread should be removed? Mark On Sat, Feb 2, 2019 at 6:15 AM Anh Nguyen wrote: > Hi, it there are still able to join ? > > Sent from my iPhone > >

Re: hello i am developing online automated text classification so i need some help soon as possible.

2018-12-11 Thread Mark Phillips
http://www.catb.org/esr/faqs/smart-questions.html On Tue, Dec 11, 2018 at 3:10 AM Waqas Ali wrote: > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to

Re: left join with and condition

2018-12-05 Thread Mark Phillips
Take a look at 'Q objects' in the django documentation - https://docs.djangoproject.com/en/2.1/ref/models/querysets/#django.db.models.Q Perhaps F objects will help. https://docs.djangoproject.com/en/2.1/ref/models/expressions/#django.db.models.F Mark On Wed, Dec 5, 2018 at 9:12 AM Arnaldo Díaz

Re: How I can insert data into database automaticaly

2018-12-04 Thread Mark Phillips
. Depends on the situation, of course. Mark On Tue, Dec 4, 2018 at 10:51 AM Gerson David Vizquel Alemán < gvizq...@gmail.com> wrote: > Hola Jesus, la información que requieres cargar inicialmente en la base de > datos es información fake o real? > > El martes, 4 de diciembre

DELETE http method calls retreive function in ModelViewSet

2018-12-04 Thread Mark Dewey
I have a class defined as a subclass of viewsets.ModelViewSet which implements a destroy and retrieve function (among others). When calling the api endpoint associated with this using the DELETE http method, the retreive function is called rather than the delete function. The call looks

Celery/Redis Django 2.0 Design Question

2018-10-27 Thread Mark Phillips
as the transformations complete successfully. I looked at django-fsm for this, but I think it will be better to run the transformations as celery tasks than to block the site. Does this plan make sense, or am I missing something regarding django and celery/redis. Thanks! Mark -- You received

Re: I Suck

2018-10-27 Thread Mark Phillips
Take a look at this article...you aren't alone! Mark On Thu, Oct 25, 2018 at 4:50 AM Motaz Hejaze wrote: > Edson my Bro , > > all you need is to make simple thing , make just a traditional > Home/About/Contact website , i can walk you through it if you want .. > > On Thu, Oct

Weird messages in my console

2018-10-26 Thread Mark Phillips
ges. Thanks for any help you can provide! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to thi

Re: Django auto-deletes field related to MySQL Transactions

2018-10-24 Thread Mark Phillips
Just a wild guess - do you have a cascade delete in your models that is causing the deletion? Is a user deleting another object, and that is triggering a cascade delete on a different model? Mark On Wed, Oct 24, 2018 at 4:22 PM RyanW wrote: > Yes, it is. Are you referring to 'delete' met

Re: Adding crop and rotate to django image upload

2018-10-24 Thread Mark Phillips
many more projects/blogs on this topic. Good luck! Mark On Wed, Oct 24, 2018 at 3:55 PM <2012...@gmail.com> wrote: > Hello, > > I confess that I have no experience with django. > I have a project where the django app was written by developers and I want > to add a

Re: I Suck

2018-10-24 Thread Mark Phillips
! Mark On Wed, Oct 24, 2018 at 10:43 AM Ryan Gedwill wrote: > I felt the same as you while learning django, and I already had some > professional experience. > > It is extremely overwhelming to learn something like this on your own. > Even people who go to college and get interns

Re: Recreate all tables in mysql after dropping the database

2018-09-16 Thread Mark Phillips
://docs.djangoproject.com/en/2.1/howto/initial-data/, if you want to now add some initial data to your tables. Mark On Sun, Sep 16, 2018 at 9:46 AM, Joel Mathew wrote: > I tried to fix mysql problems in my database by dropping tables. When that > didnt work, I dropped the database. > I then

Re: y its not working

2018-09-12 Thread Mark Phillips
The Exception Type says the template does not exist. The Exception Value says the missing template is personal/home.html. The template personal/home.html does not exist or is not located where django is looking for it. Mark On Tue, Sep 11, 2018 at 9:55 PM, Mohamad Rumaiz wrote

Re:

2018-08-31 Thread Mark Phillips
Please read the footer of every message for instructions regarding how to unsubscribe. You have to do it yourself. Mark On Fri, Aug 31, 2018, 9:36 AM Nitesh Chaudhary wrote: > Please unsubscribe my account neety...@gmail.com. I got unnecessary mail. > > -- > You received this mes

Re: Searchable dropdown from models

2018-08-29 Thread Mark Phillips
ot; function withing the django framework. Hope this helps! Mark On Wed, Aug 29, 2018 at 1:02 PM, ah wrote: > Hi, > I am trying to create a searchable dropdown list based on Django's model. > I have a model M that has 6 objects [apple,orange,carrot,banana, > kiwi,peach]. > I want to cr

Re: Advice on Model Structures

2018-08-13 Thread Mark Phillips
complicated (ie simple case - some JavaScript, a special url, and a special view for that url to get the data - there are examples in github for this as well). Django does not do this for you out of the box. IMO, it all depends on how comfortable you are with JavaScript. Mark On Mon, Aug 13, 2018 at 9:57

Re: How to write api for sms intregartion in django I am new in django?

2018-08-01 Thread Mark Caglienzi
On Wed, 2018-08-01 at 00:26 -0700, im...@wsegames.com wrote: > Here is my code > > > class RegisterView(CreateView): > form_class = RegisterForm > template_name = 'accounts/register.html' > success_url = '/success-membership/' > > def form_valid(self, form): > url =

Re: What is the best route to take to build a general CMS using Django?

2018-07-11 Thread Mark Phillips
The point of my response was to let the original author know that he/she should do some basic research first and then ask a more specific question. A general question like the one in the subject line is pretty much a wast of everyone's time, imo. Mark On Wed, Jul 11, 2018 at 6:24 PM, mottaz

Re: What is the best route to take to build a general CMS using Django?

2018-07-11 Thread Mark Phillips
https://www.google.com/search?q=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F=chrome..69i57j69i60.948j0j9=chrome=UTF-8 On Wed, Jul 11, 2018 at 5:21 PM, afj afj wrote: > --- > > -- > You received this

Re: Why using manage.py command in CLI instead of using django-admin command? what's the difference between them?

2018-07-11 Thread Mark Phillips

Re: Makemigration not working.. Please help me

2018-07-03 Thread Mark Phillips
ython indentation rules" for more explanation. There may be other things wrong with your code, but start by fixing this one thing and try again! Mark On Mon, Jul 2, 2018 at 10:40 PM, Tamilvanan Anbalagan < tamilanbala...@gmail.com> wrote: > > When i execute the makemigrations comm

Re: Database

2018-06-30 Thread Mark Phillips
Mark On Sat, Jun 30, 2018 at 1:21 PM, Joshua Kayode wrote: > Use postgresql, but you can find reasons not to!, the choice between > MySQL and postgresql is more or less personal! Both have their strengths > and weakness! > > On Jun 30, 2018 14:05, "ABHISHEK P

Re: Django Admin

2018-06-29 Thread Mark Phillips
selects, django autocomplete, django ajax, and this page of projects - https://djangopackages.org/grids/g/auto-complete/. Good luck! Mark On Fri, Jun 29, 2018 at 7:27 AM, Teja Yerraballe < teja.yerraba...@aspiresys.com> wrote: > Hi Team, > > > I have created 4 models ( cl

Re: better way to create a dictionary in Django model?

2018-06-27 Thread Mark Phillips
n't post the code I use, but this outline should give you enough pointers to look in the Django docs and get some examples from Google. Good luck! Mark On Wed, Jun 27, 2018 at 6:23 AM, prateek gupta wrote: > It has some limit- The configuration object can only be changed, there's > no link for &qu

Re: Problems with list_filter and date_hierarchy in django2.05

2018-06-16 Thread Mark Phillips
reated on 6/15/2018, but all the rest of the OR clauses just select all the rest of the documents in the database, so no matter what date I query, I get all the documents in the database. Any ideas on how to get date_hierarchy to work? Thanks, Mark On Thu, Jun 14, 2018 at 6:17 PM, Mark Phillips

Re: Problems with list_filter and date_hierarchy in django2.05

2018-06-14 Thread Mark Phillips
-tzinfo-to-sql.html). I am not sure of the time zone issue is a red herring or not. Anyone have a suggestion on how to debug the problem? Thanks! Mark On Thu, Jun 14, 2018 at 2:02 PM, Mark Phillips wrote: > I have two related models, Document and DocumentMetaData, and two separate > Model

Problems with list_filter and date_hierarchy in django2.05

2018-06-14 Thread Mark Phillips
, they just look pretty on the admin page. ;) I am not sure how to debug this, as there are no error messages on the console. How would you suggest I debug this? Thanks! Mark class Document(Model): document_id = models.AutoField(primary_key=True) # Document states PRIVATE = 1 PENDING

Re: Best way to add an image from a filefield to django 2.0 admin?

2018-06-06 Thread Mark Phillips
_file_name): image = ''.format(image_link = obj.document_id.storage_file_name.url, thumb_nail = obj.document_id.storage_file_name.url) return format_html(image) Thanks! Mark PS Still working on defining the 'extrapretty' CSS! On Wed, Jun 6, 2018 at 5:17 AM, Daniel Germano Travieso <

Best way to add an image from a filefield to django 2.0 admin?

2018-06-04 Thread Mark Phillips
admin. How do I do it? Do I have to override the admin/change_form.html for the DocumentMetaData model? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send

Re: Implementing a 'please wait' page

2018-06-01 Thread Mark Phillips
Have you looked at celery (http://www.celeryproject.org/) to handle the long running process? Perhaps in conjunction with redis (https://redis.io/)? If you passed the long running process to celery, then you could change the page to "say please wait....". Mark On Thu, May 31, 2018

Re: How to get the primary key of the underlying model in a ModelForm?

2018-05-30 Thread Mark Phillips
Mathew, Thanks! Mark On Tue, May 29, 2018 at 2:18 PM, Matthew Pava wrote: > You can access self.instance, which should have all the fields populated > for that model instance. So you can access it via self.instance.pk. > > > > Keep in mind, though, that if you are creating

How to get the primary key of the underlying model in a ModelForm?

2018-05-29 Thread Mark Phillips
the primary key, because one of the fields on the form belongs to another model (it is a JSON field), and I need to save that field in the other model when the DocumentForm is saved. How do I access the primary key of the underlying Model in a ModelForm? Thanks! Mark -- You received this message

How to update Django 2 JSON FIeld?

2018-05-27 Thread Mark Phillips
Individual', 'URL': ' http://sam.com', 'People': ['Tina Phillips Roderique'], 'Decade': '1990', 'a boolean': False} >>> I was able to change the key in the dictionary 'sam', but when I tried to replace the metadata dictionary in fred[0], it did not update. I must be missing something in how

Unit testing models.py

2018-05-13 Thread Mark Phillips
again assume django covers this in their unit tests? Anything else that I am missing? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to dj

Re: Django Queries

2018-05-11 Thread Mark Phillips
1 >>> d[0].storage_file_name >>> title, document_id, description, and storage_file_name are all fields defined in the model for Document (along with others). Read the django documentation about models and queries for more information. Mark On Fri, May 11, 2018 at 9:34 PM, Joseph M

How to make queries using Mysql JSON field and django 2

2018-05-11 Thread Mark Phillips
s" in the "Person" field, the query would return both that record and the record with the "Sam Smith" in the Person field. Either some sort of "or" condition within the query that would allow me to search for "Sam Smith" or "Sammy Jacobs"

Re: Add extra fields to a ModelAdmin form

2018-05-05 Thread Mark Phillips
this help! Mark On Wed, May 2, 2018 at 9:12 AM, 'James Foley' via Django users < django-users@googlegroups.com> wrote: > Hey Mark, > > I've not actually found a solution yet, I've just sort of put it at the > bottom of my pile of problems... > > Here is the post that I used

Re: Add extra fields to a ModelAdmin form

2018-05-02 Thread Mark Phillips
. Would you be willing to share your code with me? In particular, I am not sure where and how you are using self.form.declared_fields. I am running django 1.11. Thanks! Mark On Mon, Apr 30, 2018 at 1:41 AM, 'James Foley' via Django users < django-users@googlegroups.com> wrote: > S

Weirdness with Chained Selects in the Admin

2018-04-22 Thread Mark Phillips
al($("#id_documentmetadatavalue_set-0-metadataValue option:first").val()); $("#id_documentmetadatavalue_set-0-metadataValue").selectmenu('refresh'); } }); } }); }); Thanks for any insights you may have. Mark PS I know there are chained selects apps for d

How to Make a Custom Inline Form for Admin

2018-04-17 Thread Mark Phillips
to work. Is it possible to do what I want to do? How can I build this custom inline form? Is there a better way? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: How to formulate a query over two models?

2018-04-11 Thread Mark Phillips
Thanks for the link - I have read it before. I need to stay with these models, so is there a simple query to get my result, or do I have to make multiple queries and combine the data in python? Thanks, Mark On Wed, Apr 11, 2018 at 4:14 PM, Christophe Pettus <x...@thebuild.com>

How to formulate a query over two models?

2018-04-11 Thread Mark Phillips
models and get something close to what I want. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.co

Can I test for count of a many to many field, in a Q query, along with other filters?

2018-01-16 Thread Mark London
a Q query? If not, can I make 2 separate queries, and combine them, and eliminate duplicates? Thanks! - Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, sen

MongoDB and Django

2018-01-06 Thread Mark Phillips
, the group is using. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

Re: Model Design Questions

2017-12-22 Thread Mark Phillips
ith django and mysql and bite the bullet if I need to do some fancy db manipulations down the road. Thanks again! Mark On Sun, Dec 17, 2017 at 5:04 AM, James Schneider <jrschneide...@gmail.com> wrote: > > > On Dec 16, 2017 4:46 PM, "Mark Phillips" <m...@phillipsmar

Many to Many fields and through table

2017-12-19 Thread Mark Phillips
s, so I am considering creating the through table now in case "the powers that be" (ie end users!) decide we need some extra data for the relationship in the future. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group.

Model Design Questions

2017-12-16 Thread Mark Phillips
provide! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to dj

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
should have been class CollectionAdmin(admin.ModelAdmin) in the above post. Mark On Sat, Dec 9, 2017 at 9:16 AM, Mark Phillips <m...@phillipsmarketing.biz> wrote: > Hit send by accident... > > Constantine, > > Thanks for the link and update! However, I am not sure how

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
tempstr = tempstr + d.field_2 return tempstr Mark On Sat, Dec 9, 2017 at 9:14 AM, Mark Phillips <m...@phillipsmarketing.biz> wrote: > Constantine, > > Thanks for the link and update! However, I am not sure how to make two > columns in the CollectionsAdmin table without tw

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
> Hi Mark, > > You should not create 2 methods. > Just change that first to be like: > > return obj.document.all().values_list('field_1', 'field_2') > > With this you will get QuerySet of tuples, like > > > I believe it should solve your problem. > > Also

Need Help with Many to Many Fields

2017-12-08 Thread Mark Phillips
ent fields directly, or do I have to make two queries as I am doing? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr

Re: Need Help with Field Validation

2017-12-04 Thread Mark Phillips
fields in the returned data. No idea why, but it works now! Can someone explain the difference between self.cleaned_data and self.instance in a ModelForm? Thanks! Mark On Sun, Dec 3, 2017 at 7:43 PM, Mark Phillips <m...@phillipsmarketing.biz> wrote: > I have a model called Document th

Need Help with Field Validation

2017-12-03 Thread Mark Phillips
d (the id of the document found in the search). I can't figure out why the current_document_id is always None. What am I missing here? How else can I block the ValidationError when I am merely updating another Document field, because that also returns a duplicate image based on the computed_sha

Anyone Having Success with Wand to Create Thumbnails from PDF files?

2017-11-13 Thread Mark Phillips
] output_thumbnail.jpg But when I try to use wand on the same image I get this error: Traceback (most recent call last): File "/home/mark/python-projects/memorabilia-project/memorabilia/models.py", line 24, in make_thumb pages = Image(blob = b) File "/home/mark/.virtualenvs/memorabili

Re: Generating a unique 10 digit ID for each model instance

2017-10-22 Thread Mark Phillips
I thought python's uuid.uuid4 guaranteed a unique value. Am I missing something? Mark On Sun, Oct 22, 2017 at 3:58 PM, James Schneider <jrschneide...@gmail.com> wrote: > > > On Oct 22, 2017 12:29 PM, "Andréas Kühne" <andreas.ku...@hypercode.se> > wrote: &

Re: How to pre-load model data?

2017-09-09 Thread Mark Phillips
seems the easiest way to keep a list of the metadata names and metadata values for now. I am also looking at a csv -> json converter to use with "manage.py loaddata". Still open to other suggestions to simplify this problem! Thanks again, Mark On Fri, Sep 8, 2017 at 9:31 PM, Ja

Re: How to pre-load model data?

2017-09-08 Thread Mark Phillips
Brilliant idea! Did not know these importers existed. Thanks! Mark On Fri, Sep 8, 2017 at 3:11 PM, Jani Tiainen <rede...@gmail.com> wrote: > Hi. > > We actually implemented spreadsheet importer for one of our clients. > > It was relatively trivial. Just read the row

Re: How to pre-load model data?

2017-09-08 Thread Mark Phillips
the spreadsheet to the database. I am open to other suggestions! Thanks! Mark On Thu, Sep 7, 2017 at 10:29 PM, <callsamle...@gmail.com> wrote: > hi, > think about problem, you mean initial data? see this(https://docs. > djangoproject.com/en/1.11/howto/initial-data/) > django way suggesti

How to pre-load model data?

2017-09-07 Thread Mark Phillips
with some data, or is there another way the more closely ties the data to the models? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to d

Re: How to add more fields to each ManyToMany Field in Django?

2017-09-04 Thread Mark Phillips
in the select box, then you need some javascript to perform a real-time update to your admin page before to display the correct price. There are frameworks available as django apps for doing this. Mark On Mon, Sep 4, 2017 at 10:19 AM, Omer Iqbal <omeriqba...@gmail.com> wrote:

Re: Having issue getting django working on shared hosting account

2017-08-29 Thread Mark Phillips
Linode is a better buy (more ram for the buck) than Digital Ocean. Both are good hosting companies. Mark On Tue, Aug 29, 2017 at 9:18 PM, James Schneider <jrschneide...@gmail.com> wrote: > > > On Aug 29, 2017 5:18 PM, "Thomas Campion" <tc1...@gmail.com> wrot

Re: Python and Django traing

2017-08-26 Thread Mark Phillips
correction - https://www.obeythetestinggoat.com/ On Sat, Aug 26, 2017 at 5:55 PM, Gerardo Palazuelos Guerrero < gerardo.palazue...@gmail.com> wrote: > Hi, > I'm on the same situation, still learning. > > Besides the ones mentioned (I specially liked a lot the DjangoGirls > tutorial), there quite

Questions About ModelForm

2017-08-20 Thread Mark Phillips
. Is that the appropriate way to do something like this? Thanks, Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.co

if user double-clicks form submit with csrf token, even with redirect on POST browser shows 403 FORBIDDEN and csrf failed message

2017-08-02 Thread Mark Mikofski
okay, this is weird. If a user double-clicks the form submit button, even tho POST should redirect, they still get 403 FORBIDDEN with csrf failed message. I think this is like a web developer question, is this some latency issue with my browser, network or web server? I use Apache-2 httpd with

Re: failed of installing MySLQ

2017-07-31 Thread Mark Phillips
installing MySQL requires visual C++, but I am not an expert. Mark On Mon, Jul 31, 2017 at 2:35 AM, Antonis Christofides < anto...@djangodeployment.com> wrote: > Hello, > > since you aren't experience, start easier and use SQLite. Mostly everyone > (even the experienced people)

Re: Need help modifying form on intermediate page of admin action

2017-07-29 Thread Mark Phillips
nal coding outside of django. Good luck! Mark On Sat, Jul 29, 2017 at 8:57 PM, Jack Twilley <math...@gmail.com> wrote: > I have a Django app which keeps inventory. There are two relevant classes > here, one named Jar and another named Crate. The Jar class has an > attribute cra

Re: Django beginner

2017-07-14 Thread Mark Aydelotte
I would think you have a advantage by knowing Python. I just started learning both and i am not finding Django that hard. On Thursday, July 13, 2017 at 7:51:50 PM UTC-4, Amir Pirmoradian wrote: > > Hey Guys, i'm a absolute beginner at Django. I started to learn django > from

Re: django webframework

2017-07-04 Thread Mark Phillips
Hi Arun! If tomcat is required for this project, then are you supposed to code the project in java? If so, then python and django are not what you need. Maybe Ruby, or Wicket is better suited for your project. Mark On Tue, Jul 4, 2017 at 7:26 AM, Vivek Shrivastava <vivshrivast...@gmail.

Django Smart Selects - What does 'models world readable' mean??

2017-07-02 Thread Mark Phillips
with a world readable model? In what situations would it be irrelevant and in what situations would it be a huge security risk? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Retrieve field values from ManyToMany field in model

2017-06-28 Thread Mark Phillips
adatavalue = models.ManyToManyField(MetaDataValue) The problem I am having is that when I add data to the DocumentMetaData screen in the admin portal, the model does not maintain the relationship between the MetaData and the MetaDataName. For example, I can create the metadata entry People with values Mark,

Re: Retrieve field values from ManyToMany field in model

2017-06-25 Thread Mark Phillips
If you want a particular DocumentMetaData to only refer to a single > document and a single metadata then change the ManyToManyField for a > ForeignKey > That is not what I want. > > If you do that then you can do self.document.title and > self.metadata.name to access thos

Re: Model design question

2017-06-25 Thread Mark Phillips
On Sun, Jun 25, 2017 at 6:56 PM, Constantine Covtushenko < constantine@gmail.com> wrote: > Hi Mark, > > I have some questions to you. > 1. Does any of MetaData have predefined list of MetaDataValues? > No, I want to add them in real time as Documents are uploaded. &

Model design question

2017-06-25 Thread Mark Phillips
from a drop down list (good). However, the bad news is that the relationship between the MetaData and MetaDataValue is not preserved. For example, say I have MetaData 'people' with values John, Mark, Allison, and 'events' with values birthday, wedding, funeral. When I add a DocumentMetaData, I want

Retrieve field values from ManyToMany field in model

2017-06-25 Thread Mark Phillips
f.metadata) The Document class has a field called 'title' and the Metadata class has a field called 'name'. How do I accesses these two fields from the class DocumentMetaData so the string output is something like - < metadata.name>? Thanks! Mark -- You received this message because yo

Re: how to combine views in one template

2017-06-17 Thread Mark Alan Jones
On Sunday, June 18, 2017 at 12:51:00 AM UTC+1, Mark Alan Jones wrote: > > Thank you very much for the help Matthew, that is absolutely spot on, and > greatly appreciated. > > My view now looks like this: > def builddetails(request, id): > if request.method == 'POST': >

Re: how to combine views in one template

2017-06-17 Thread Mark Alan Jones
at /builds/8 NOT NULL constraint failed: app_build.requested_by_id I want to use this form to update records in the database - do I need to do something special in the view so that it knows which record to update? Thanks again, Mark On Friday, June 16, 2017 at 2:27:31 PM UTC+1, Matthew Pava wrote

  1   2   3   4   5   6   >