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
I can't seem to be able to create a test database for my django project. I get this error: django.db.utils.ProgrammingError: (1146, "Table 'test_hopi_django.CurrentArticle' doesn't exist") I have full details at https://stackoverflow.com/questions/72521409/cant-create-django-test-database if

Looking for Recommendations for a Django Photo Gallery

2022-01-24 Thread Mark Phillips
I have been using a very old PHP based photo gallery called Gallery3 as a photo gallery with about 10 years of photos. Gallery3 is on life support, so I need to move to something else. I am looking for a simple photo gallery application that uses file system based storage for the photos. Gallery3

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 netcup. Linux is

How to modify messages displayed in Admin change page?

2020-04-17 Thread Mark Phillips
I have a model Document, and the admin can upload an image to a FileField. When a document/image is successfully uploaded, I also save a sha256 "fingerprint" of the image to test if an admin tries to upload a duplicate image. If a duplicate image is detected, I don't save the duplicate image and

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

2020-03-24 Thread Mark Phillips
I have three related models - Document, Collection, and CollectionDocument. A Collection object is made up of a group of documents. class Document(Model): document_id = models.AutoField(primary_key=True) class Collection(Model): collection_id = models.AutoField(primary_key=True)

Django 3.0 Admin CHange Page Not Displaying Selected Option Correctly

2020-03-24 Thread Mark Phillips
I am running Django 3.0 and using Chrome Version 80.0.3987.132 (Official Build) (64-bit) and Firefox version 74 (64-bit). I have a select box on an admin change page for a model, and the correct value from the database is shown this way on the html source page generated by django: Frank Sam Henry

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

2019-11-25 Thread Mark Phillips
Lucas, I have many documents that I have uploaded to my django app. The docs are stored in the file system, but the path is in my django model. The docs are either pdfs or png images. This is how I am displaying pdf images in my ModelAdmin change form: readonly_fields = ('get_image_3', )

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

2019-11-25 Thread Mark Phillips
Just curious as to the best practices for using save/delete in Model versus delete_model/save_model in ModelAdmin. Is one preferred over the other? In my particular case, I have a Document model with a JSON field that holds a bunch of metadata (name:value pairs) for Documents (photos, pdfs, etc).

Reverse loopup for admin_order_field?

2019-11-21 Thread Mark Phillips
I have two models class Document(Model): document_id = models.AutoField(primary_key=True) ... other fields class DocumentMetaData(Model): documentMetaData_id = models.AutoField(primary_key=True) document_id = models.ForeignKey(Document, on_delete=models.CASCADE,

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

2019-02-02 Thread Mark Phillips
MySQL and Postgres both support JSON fields directly, and have some searching capability built in for those fields. I don't think you have to use the django-jsonfield anymore. Check the MySQL and/or Postgres docs - https://dev.mysql.com/doc/refman/8.0/en/json.html

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 > > On Jan 31, 2019, at

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
James, Take a look at this page - https://docs.djangoproject.com/en/2.1/howto/initial-data/ Be sure to backup your database before you migrate just in case. Also, sometimes it is faster and easier to just drop the project's database and restore from a backup than to fiddle with the initial

Celery/Redis Django 2.0 Design Question

2018-10-27 Thread Mark Phillips
I am building a django 2.x site to: * upload documents (images, pdfs, and videos) * apply metadata to the documents (JSON metadata field) * transform the documents (thumbnails, OCR, language translations, image conversion, facial recognition, image blurring, etc.) based on some of the metadata

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 25, 2018 at 12:10

Weird messages in my console

2018-10-26 Thread Mark Phillips
I am building a django 2.0 application, and I have noticed some strange output in my console when I use runserver. I use logging a lot to follow what is happening in my code as I write it, so there are a lot of logging messages in the console. However, these weird messages do not have the same

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' method in

Re: Adding crop and rotate to django image upload

2018-10-24 Thread Mark Phillips
You could look at this project for ideas on how to accomplish your crop and rotate actions - https://github.com/matthewwithanm/django-imagekit However, if you want the user to manually crop and rotate the image on your site while looking at a Django view, then you will have to use some Javascript

Re: I Suck

2018-10-24 Thread Mark Phillips
Are you working on a project now? What is the project, and where are you stuck? What specifically are you trying to get to work with django? Let us know the specifics of your project and where you are stuck so we can help! You aren't alone in this - the purpose of this list is to help each

Re: Recreate all tables in mysql after dropping the database

2018-09-16 Thread Mark Phillips
This is how I do it: 1. drop the database 2. create the database. 4. make sure the user identified in your settings.py can still access the database 5. delete the migrations 6. run all migrations Your new db should be populated with all the initial tables. Take a look at this,

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 message because

Re: Searchable dropdown from models

2018-08-29 Thread Mark Phillips
If I understand your question, there are many different django projects that offer a solution to "autocomplete" in a form. https://djangopackages.org/grids/g/auto-complete/ Or, you can roll your own with the addition of some Javascript. Autocomplete is not a "built-in" function withing the

Re: Advice on Model Structures

2018-08-13 Thread Mark Phillips
dtdave, Basically, the model structure is how you indicated. To achieve changing the content of a select once the page is loaded, you will have to do some JavaScript magic. Django-select2 will do that for you, and there are other django packages, or you can roll your own if it is not too

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

2018-07-11 Thread Mark Phillips
hejaze wrote: > i think we can all use google mark . thanks for the good knowledge > > On Thu, 12 Jul 2018, 02:48 Mark Phillips, > wrote: > >> https://www.google.com/search?q=What+is+the+best+route+to+ >> take+to+build+a+general+CMS+using+Django%3F=What+is+ >>

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
To start with, in your Post class, you need to indent the post= and user= lines. Like this: class Post(models.Model): post = models.CharField( user = models. ForeignKey(.. Python depends on indentation - https://www.python-course.eu/python3_blocks.php. You can Google "Python

Re: Database

2018-06-30 Thread Mark Phillips
Use whichever one you are more familiar with, unless there is a technical reason for your specific project to pick one over the other. Familiarity is important if you are just learning django, as you don't need too many learning curves at the same time. Sometimes, it is helpful to look at the

Re: Django Admin

2018-06-29 Thread Mark Phillips
Teja, First, let me suggest you just copy and paste your models from models.py. People who use Django a lot may find it easier to read the code (because they are familiar with the syntax and layout) than your typed summary of the classes. Second, Django by itself cannot do what you want it to

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

2018-06-27 Thread Mark Phillips
The way I work with json data in the admin is rather complicated. Here are a the steps I use - check the django documentation and Google for details. As an example, assume you have a table Documents with a JSON field called metadata and other "normal" django fields. The metadata is a dictionary

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
I have two related models, Document and DocumentMetaData, and two separate ModelAdmins (DocumentAdmin, DocumentMetaDataAdmin) where I can't seem to get list_filter or date_hierarchy to work. All the other aspects of the admins work. When I say list_filter or date_hierarchy don't work, I mean they

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

2018-06-06 Thread Mark Phillips
danielgtravi...@gmail.com> wrote: > Hello Mark. > > You can just override the Model Admin for your model and insert an Inline > Form for example. > > Check the documentation for customizing the model admin! > > Hope it helps! > > > On Mon, Jun 4, 2018, 18:02 Mar

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

2018-06-04 Thread Mark Phillips
I have a Document model that uploads an image. I have a DocumentMetaData model with a JSON field where I "crud" metadata for the documents in the Document model. I would like to add the image of the document in the Document model to the change form of the DocumentMetaData model in the admin. How

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 at 4:35 PM,

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

2018-05-30 Thread Mark Phillips
the Document, you will not > have a pk until after the save is committed, so it won’t be accessible in > the clean method. If you are updating a document, then pk will populated. > > > > *From:* django-users@googlegroups.com [mailto:django-users@ > googlegroups.com] *On Beh

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

2018-05-29 Thread Mark Phillips
I have a model, Document, and an associated DocumentForm(forms. ModelForm), and a DocumentAdmin(admin.ModelAdmin). In the clean method of the DocumentForm, I need to get the document_id (ie primary key) of the underlying Document, but it is not included in the field set for that form. I need the

How to update Django 2 JSON FIeld?

2018-05-27 Thread Mark Phillips
I have a model called Document with a field called metadata defined as JSONField(blank=True). I want to be able to search the Document model for a certain key in the metadata field, and change that key. For example, there is a key 'People' in some of the Document objects, and I want to change

Unit testing models.py

2018-05-13 Thread Mark Phillips
What should be unit tested in models.py? I assume the storing of data and retrieving of data from the database does not need to be tested, as I further assume django has a full set of tests for those operations. I can see testing these parts of models.py * All custom methods * Labels for all

Re: Django Queries

2018-05-11 Thread Mark Phillips
Please provide the exact output you are seeing. It may be that the output has been truncated, which is correct behavior. For example, when I run this query on the command line for my model Document, >>> Document.objects.all() , , , ]> I get a QuerySet with 4 entries, as there are 4 rows/records

How to make queries using Mysql JSON field and django 2

2018-05-11 Thread Mark Phillips
I have a model Document that has a json field "metadata" containing a dictionary of different values. One example: {"Orientation": "Landscape", "Address": "Bethany Home Road", "Photo Type": "Many People", "a boolean": false, "Person": ["Sam Smith", "Hank Jones"], "Date": "05/13/2018", "Location":

Re: Add extra fields to a ModelAdmin form

2018-05-05 Thread Mark Phillips
James, I was finally able to add extra fields to a ModelForm dynamically! Check out the answer to this post - https://stackoverflow.com/questions/32335349/how-do-i-create-and-save-dynamic-fields-in-django-modeladmin It worked for me in django 2. I have not tried it in django 1.11. I hope this

Re: Add extra fields to a ModelAdmin form

2018-05-02 Thread Mark Phillips
James, Did you ever get a response to this issue? I am having a devil of a time adding some extra non-model fields to an admin inline form. My added complication is that the fields are only defined at run time, so I have to have a loop that creates them based on a different model in my app.

Weirdness with Chained Selects in the Admin

2018-04-22 Thread Mark Phillips
I have two chained selects in an inline form in my admin page. I wrote a short javascript script to pull the data from the database for the second select when a selection is made in the first select. It all seems to work - the scrip fires when a selection is made in the first select, the correct

How to Make a Custom Inline Form for Admin

2018-04-17 Thread Mark Phillips
I am using django 1.11. I have these models (among others): models.py:# MetaDataclass MetaData(models.Model): metadata_id = models.AutoField(primary_key = True) name = models.CharField('metadata name', max_length=200, unique=True) description = models.TextField('description')

Re: How to formulate a query over two models?

2018-04-11 Thread Mark Phillips
wrote: > > > On Apr 11, 2018, at 16:05, Mark Phillips <m...@phillipsmarketing.biz> > wrote: > > > > I have two models: > > > > # MetaData > > # MetaData Value > > First, you might want to make sure this is *really* the best way of > representin

How to formulate a query over two models?

2018-04-11 Thread Mark Phillips
I have two models: # MetaData class MetaData(models.Model): metadata_id = models.AutoField(primary_key = True) name = models.CharField('metadata name', max_length=200, unique=True) description = models.TextField('description') def __str__(self): return self.name #

MongoDB and Django

2018-01-06 Thread Mark Phillips
Is anyone on the list using MongoDB with Django? I see the MongoDB-django engine is no longer in active development, so I am not sure if I want to start using it as no one is supporting it. There are other python mongodb options, and some django rest mongo options. I am curious what, if

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
Is there any downside to creating a through table in a many to many relationship when there isn't any "extra" related data, but there might be in the future? I have read that migrating from a simple m2m relationship to a m2m with a through table takes some jumping through hurdles, so I am

Model Design Questions

2017-12-16 Thread Mark Phillips
I am building an electronic document management system using django and mysql. The purpose of this system is to catalog and retrieve electronic documents. There is no inventory of the physical documents. There are about 3,000 documents (photos, pdfs, videos) now, and that number could double in

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
for more references about values_list, check following documentation > page: > https://docs.djangoproject.com/en/2.0/ref/models/querysets/#values-list > > Regards, > Constantine C. > > On Sat, Dec 9, 2017 at 12:41 AM, Mark Phillips <m...@phillipsmarketing.biz > > wrot

Need Help with Many to Many Fields

2017-12-08 Thread Mark Phillips
I have two models - class Document(models.Model): document_id = models.AutoField(primary_key=True) title = models.CharField('title', max_length=200) class Meta: ordering = ['title'] def __str__(self): return "%s" % (self.title) class Collection(models.Model):

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
I have a model called Document that has a FileField for uploading files. class Document(models.Model): document_id = models.AutoField(primary_key=True) title = models.CharField('title', max_length=200) description = models.TextField('description') storage_file_name =

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

2017-11-13 Thread Mark Phillips
I am using ImageMagick 6.7.7-10 2017-07-31 Q16 on Ubuntu 14.04, through Wand 0.4.4, Python 3.4.3 and Django 1.11. I am trying to create a jpg thumbnail of a pdf file. On the command line, I can do this with no errors: convert -thumbnail x300 -background white -alpha remove Lucy.pdf[0]

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 wrote: > > > On Oct 22, 2017 12:29 PM, "Andréas Kühne" > wrote: > > Hi, > > I think you are correct with

Re: How to pre-load model data?

2017-09-09 Thread Mark Phillips
mes Schneider <jrschneide...@gmail.com> wrote: > > > On Sep 8, 2017 12:12 PM, "Mark Phillips" <m...@phillipsmarketing.biz> > wrote: > > Thanks for all your replies and helpful suggestions. To answer some of > your questions - > > 1. Where is the data comin

Re: How to pre-load model data?

2017-09-08 Thread Mark Phillips
from spreadsheet put it to > modelform for validation and save. > > There are pretty good libraries to read spreadsheets directly. > > 8.9.2017 22.13 "Mark Phillips" <m...@phillipsmarketing.biz> kirjoitti: > >> Thanks for all your replies and helpful sugg

Re: How to pre-load model data?

2017-09-08 Thread Mark Phillips
Thanks for all your replies and helpful suggestions. To answer some of your questions - 1. Where is the data coming from? - It is textual data in a spec/spreadsheet. The data is a lot of meta data (name and one or more values) for describing attributes of scanned documents. There is what I would

How to pre-load model data?

2017-09-07 Thread Mark Phillips
I have a several classes in models.py, and I would like to load some data into these models (or tables in the db), as well as add more data over time through the admin panel. I googled for some ideas on how to pre-populate the db tables, and found references to RunSQL (

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

2017-09-04 Thread Mark Phillips
I replied to your StackOverflow question. An error in your through model caused the no such table error. Keep in mind that web pages are only generated once, and then presented to the user. If you want the page to display the cost of the course based on the university you pick on this page in the

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 wrote: > > > On Aug 29, 2017 5:18 PM, "Thomas Campion" wrote: > > I tried following vendor

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
I am trying to create a form for a django-viewflow workflow. I have 2 models, Document and DocumentOCR as shown: class Document(models.Model): document_id = models.AutoField(primary_key=True) document_category = models.IntegerField(category=DOCUMENT_CATEGORY) document_state =

Re: failed of installing MySLQ

2017-07-31 Thread Mark Phillips
I don't completely agree with Antonis. If you want MySQL in production, you will have to learn how to install it an use it at sometime. With that said, you will probably get more help with installing MySQL in a MySQL forum. Check these out - https://forums.mysql.com/. The Newbie forum or the

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

2017-07-29 Thread Mark Phillips
You might find one of these helpful - https://github.com/digi604/django-smart-selects https://github.com/yourlabs/django-autocomplete-light Basically, you want a "chained select" that is populated after a value is entered by the user, if I understand the problem. If you want to roll your own,

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

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

2017-07-02 Thread Mark Phillips
I need to chain some select boxes in my admin forms to make data input less error-prone and easier. There are quite a few projects like django-smart-selects out there, but django-smart-selects seems to be quite easy to implement. However, I don't understand the implications of the warning for

Re: Retrieve field values from ManyToMany field in model

2017-06-28 Thread Mark Phillips
n 26, 2017 at 12:19 AM, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote: > On Sunday 25 June 2017 15:08:25 Mark Phillips wrote: > > > I have this class > > > > > > class DocumentMetaData(models.Model): > > > document = models.ManyToManyField(Doc

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
and Mary, Document 3 can have values Mary, John, and Fred, and Document 4 may not have MetaData People assigned to it. > Regards, > Constantine C. > > On Sun, Jun 25, 2017 at 6:20 PM, Mark Phillips <m...@phillipsmarketing.biz > > wrote: > >> I have a cla

Model design question

2017-06-25 Thread Mark Phillips
I have a class Document that uploads a document. I have a class MetaData that is the name for some metadata for that document. Since a MetaData can have one or more values, there is another class called MetaDataValue that has a ForeignKey to MetaData. Finally, there is a class

Retrieve field values from ManyToMany field in model

2017-06-25 Thread Mark Phillips
I have this class class DocumentMetaData(models.Model): document = models.ManyToManyField(Document) metadata = models.ManyToManyField(MetaData) metadatavalue = models.ManyToManyField(MetaDataValue) def __str__(self): return "%s - %s" % (self.document, self.metadata) The

Re: Django Internship

2017-05-17 Thread Mark Phillips
A couple of comments.. 1. This list is not for job hunting. Learn how to post correctly on email lists. In this instance, you need an OT (Off Topic) at the start of your subject line as this is a list for asking technical questions about Django. More people will want to help you if you respect

Re: i dont know from where to start my first project on django

2017-05-09 Thread Mark Phillips
Start with the model layer. Use the admin interface to add some dummy data and think about how you want the front facing pages/forms to look and operate. Repeat as needed. Mark On Tue, May 9, 2017 at 9:03 AM, wrote: > Hi everyone, > My project consists of a web site which

Re: Django feedback

2017-05-01 Thread Mark Phillips
Can you successfully send an email from the command line on your server? You need to be able to do that in order to send email from django. Mark On Mon, May 1, 2017 at 1:52 PM, Melvyn Sopacua wrote: > On Monday 01 May 2017 13:47:10 goskoomer tarasenko wrote: > > > The

Re: How to get a mentor

2017-04-04 Thread Mark Phillips
Joe, It is not clear from your post if you just need a django mentor for technical questions, or if you need a business mentor to flesh out your idea. There are hundreds (thousands??) of expert django mentors on this list all willing to give you free advice. Learn how to ask direct questions

Re: django sample projects

2017-03-27 Thread Mark Phillips
Try "2 Scoops of Django" book. Shows uou how to set up a project. Mark On Mar 27, 2017 6:28 AM, "Shahab Emami" wrote: > hello > > i have question: > where can i find a few django sample projects? > i have seen a few tutorials and courses but i

Re: Python / Django newbie looking for mentorship

2017-03-19 Thread Mark Phillips
Feria, Start here if you are comfortable with Python https://docs.djangoproject.com/en/1.10/intro/tutorial01/ Start here if you are new to Python... https://www.codecademy.com/learn/python Both are hands on. Good luck! Mark On Sun, Mar 19, 2017 at 6:52 PM, Feria Científica <

Re: Request for advice on refactoring a big Django project

2017-03-06 Thread Mark Phillips
I echo Vijay's comment. Lists like this are really great for very specific questions and short code segments or error message that a more experienced person can answer off the top of their head. Your question is very broad and requires a large time commitment from the reader to respond. With that

Re: Need a Tutorial

2015-12-05 Thread Mark Phillips
Try this - http://lmgtfy.com/?q=python+tutorial Mark On Sat, Dec 5, 2015 at 12:49 AM, Davron wrote: > HI! > Could any python's gurus give me a some links, > which leads to for a real comprehensive python-tutorial, Please. > Thanks in advance! > > -- > You received

Re: Re. My Django Book.

2015-07-31 Thread Mark Phillips
The django docs are excellent. However, if you are more of a book person, then try Try Two Scoops of Django (http://twoscoopspress.org/) - well written and updated. Mark On Fri, Jul 31, 2015 at 6:33 AM, rmschne wrote: > I'm no way an advanced user, but I found the book

Re: Installation OPEN VOLUNTEERS

2015-05-23 Thread Mark Phillips
First, you may want to check out the django web site, https://www.djangoproject.com/, and learn how django projects are made and deployed. The tutorial is a good place to start. After that, you should be able to download the project and get it running on your PC. However, note that the project is

Re: Rearding django

2015-01-09 Thread Mark Phillips
Start with the tutorial. Mark On Fri, Jan 9, 2015 at 4:57 AM, Siddharth Singh wrote: > Hi > > I am new in django. I want to develop a website using django framework. > so, can anyone suggest me how will i approach which will fruitful for. > And which tools should i

Re: Recommendations for hosting service?

2015-01-06 Thread Mark Phillips
+1 for Linode and Digital Ocean. Also, you can get 2 Virtual Private Servers on AWS EC2 for free for the first year. http://aws.amazon.com/free/ Mark On Tue, Jan 6, 2015 at 7:21 AM, claudiomet wrote: > I have digitalocean and no problems > > 2015-01-06 11:05 GMT-03:00

Re: malicious requests?

2014-12-22 Thread Mark Phillips
Alex, The trailing period could be from online promotional materials for your site. Someone may have written your URL with the trailing period inside the URL by mistake when the promotional materials were created. It may not be an attack vector from a malicious hacker, but instead, valid users

Re: how to learn django and I don't kill in the attempt,

2014-12-15 Thread Mark Phillips
After you go through the django tutorial (really the best place to start), check out Two Scoops of Django (book). I think it is only up to version 1.6, so some things may have changed or look a little different. Mark On Mon, Dec 15, 2014 at 8:44 AM, Shazwi Suwandi wrote:

Re: rapidsms

2014-10-29 Thread Mark Phillips
1. Perhaps reading the RapidSMS tutorial will help http://rapidsms.readthedocs.org/en/develop/tutorial/index.html. 2. Join the RapidSMS Google group and ask questions there. Mark On Wed, Oct 29, 2014 at 6:27 AM, ngangsia akumbo wrote: > I just got a new project to

Re: Django hosting

2014-10-15 Thread Mark Phillips
Sabine, Hit send before I was done please see below On Wed, Oct 15, 2014 at 5:21 PM, Mark Phillips <m...@phillipsmarketing.biz> wrote: > Sabine, > > Another free hosting option - Ohava.com. 512 MB RAM, 1 VCPU, 20 GB storage > for free. You also get ssh and root access. It

Re: Django hosting

2014-10-15 Thread Mark Phillips
s for them to enable my free system. You can sign up here - https://www.ohava.com/#signup. Still playing with it to see what it can do. YMMV Mark Phillips On Wed, Sep 24, 2014 at 11:55 PM, Sabine Maennel <sabine.maen...@gmail.com> wrote: > Thank you very much for your advice Marc, it is

Re: I need some help to find a deployment strategy

2014-10-05 Thread Mark Phillips
Sabine, How I deploy a django app...ymmv and I won't say this is the best way to do it;) I have two machines - one for development (my laptop) and one for production (a hosted site) on Linode. The development machine uses virtualenv and runserver to test etc. The production machine uses

Re: Django hosting

2014-09-24 Thread Mark Phillips
Sabine, I am in the US, so take my advice with a large grain of salt. I usually use Linode and Digital Ocean as a benchmarks for hosting services. There prices are very reasonable and they give you all that you need - root shell access to your own private virtual server. They have great up-time,

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Mark Phillips
Gedit works well with syntax highlighting. I like the console widow in the bottom pain to restart the server when needed, see error messages, etc. Don't have to go to another terminal window. http://www.micahcarrick.com/gedit-as-a-django-ide-for-linux.html Mark On Wed, Sep 24, 2014 at 10:24 AM,

  1   2   >